Define candidate key
The minimal set of attribute(s) whose value(s) uniquely identify each tuple
- Primary key (selected)
- Alternate key (not selected)
Define foreign key
An attribute, or set of attributes, within one relation that matches the primary key of another relation
Properties of Relations
a relation name is district
What is Relation schema
a named relation defined by the relation name (table name) and attributes.
What is Relation instance/state
a set of tuples from a relation schema.
Define Integrity Constraints
restrictions placed on the values of attributes
Explain Entity Integrity
― Uniqueness: No two tuples can have identical values for candidate keys.
― Not-Null: No attribute of a candidate key can be a NULL.
* Null: A value of an attribute is currently unknown or not applicable for this tuple.
Explain Referential integrity
If a foreign key exists in a relation,
― either the foreign key value matches a primary key value in its home relation
― or the foreign key value is NULL.
Define Domain
the set of allowable values for one or more attributes
Explain Domain Contrasts
enables the RDBMS to carry out checks on data errors and to determine the range of operations that can be carried out on the domain
― E.g., if the attribute Age is specified to be in the range16-30, any number outside would give an error
― E.g., If the attribute Name is to hold a set of characters, then any multiplication or division operations on the attribute values are illegal
Define views
a subset of base relation(s)
define base relation
A named relation corresponding to an entity in the conceptual schema, whose tuples are physically stored in the database
What are the features of views
What are the purpose of views