dev

DB - Relational Database Concepts

/wrote/note-bak/dev/db/relational/

Relational Database Concepts

View

视图是一种虚拟的表,具有和物理表相同的功能。对视图的修改不影响基本表。

Schema

A database schema is a way to logically group objects such as tables, views, stored procedures etc.

Package

A package is a schema object that groups logically related PL/SQL types, variables, constants, subprograms, cursors, and exceptions.

Trigger

A trigger is a special kind of stored procedure that automatically executes when an event occurs in the database server. DML triggers execute when a user tries to modify data through INSERT, UPDATE, or DELETE statements.

Sequence

Sequence will allow you to populate primary key with a unique, serialized number.

Synonym

A synonym is an alias or alternate name for a table, view, sequence, or other schema object.

Null

  • Null表示的是未知,不确定
  • Null的比较需要用IS/IS NOT,不能用=/!=
  • 将Null值转化为其它值: NVL(value,0)