Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
UPTC - 2011
Integrity constraints are defined with a table
and are stored as part of the table’s definition
in the data dictionary, so that all database
applications adhere to the same set of rules.
When a rule changes, it only needs be
changed once at the database level and not
many times for each application.
NOT NULL: Disallows nulls (empty entries) in
a table’s column.
UNIQUE KEY: Disallows duplicate values in a
column or set of columns.
PRIMARY KEY: Disallows duplicate values
and nulls in a column or set of columns.
FOREIGN KEY: Requires each value in a
column or set of columns to match a value in
a related table’s UNIQUE or PRIMARY KEY.
FOREIGN KEY.
CHECK: Disallows values that do not satisfy
the logical expression of the constraint.
Key is used in the definitions of several types of
integrity constraints. A key is the column or
set of columns included in the definition of
certain types of integrity constraints. Keys
describe the relationships between the
different tables and columns of a relational
database.
Primary key: A primary key’s values uniquely
identify the rows in a table. Only one primary
key can be defined for each table.
Unique key: The column or set of columns
included in the definition of a UNIQUE
constraint.
Foreign key: The column or set of columns
included in the definition of a referential
integrity constraint.
Referenced key: The unique key or primary key
of the same or a different table referenced by a
foreign key.
SQL (pronounced SEQUEL) is the
programming language that defines and
manipulates the database. SQL databases
are relational databases, which means that
data is stored in a set of simple relations.
All operations on the information in an database are
performed using SQL statements. A SQL statement is
a string of SQL text. A statement must be the
equivalent of a complete SQL sentence, as in: