Optional Attributes

From InterBase

You have the option to specify:

  • A default value for the column.
  • Integrity constraints. Constraints can be applied to a set of columns (a table-level constraint), or to a single column (a column-level constraint). Integrity constraints include:
  • The PRIMARY KEY column constraint, if the column is a PRIMARY KEY, and the PRIMARY KEY constraint is not defined at the table level. Creating a PRIMARY KEY requires exclusive database access.
  • The UNIQUE constraint, if the column is not a PRIMARY KEY, but should still disallow duplicate and NULL values.
  • The FOREIGN KEY constraint, if the column references a PRIMARY KEY in another table. Creating a FOREIGN KEY requires exclusive database access. The foreign key constraint includes the ON UPDATE and ON DELETE mechanisms for specifying what happens to the foreign key when the primary key is updated (cascading referential integrity).
  • A NOT NULL attribute does not allow NULL values. This attribute is required if the column is a PRIMARY KEY or UNIQUE key.
  • A CHECK constraint for the column. A CHECK constraint enforces a condition that must be true before an insert or an update to a column or group of columns is allowed.
  • A CHARACTER SET can be specified for a single column when you define the data type. If you do not specify a character set, the column assumes the database character set as a default.