Intro to Relational Model Flashcards
Relational Model
organizes data into tables (relations) consisting of row (tuples) and columns (attributes)
Relational model does NOT
provide explicit relationships or links
Integrity constraints
conditions that every db state must satisfy
Examples of constraints
not null, primary key constraint, foreign key constraint
Primary Key
unique identifier
Foreign key
Relate a tuple from one table to another. Shows how two tables are related.
Schema-based contraints
Domain constraints
Key constraints
Entity integrity constraints
Referential integrity constraints
Domain constraints
Within each tuple, the value of each attribute A must be an atomic value from the domain of A
Key constraints
the value of attributes that form a key must be unique
Key properties
Uniqueness: two tuples cannot have identical values
Minimality: no subset of a key is unique
Entity integrity constraint
No primary key can be null
Referential integrity constraint
must maintain consistency bw two related tables (tuples must be of same domain)
Relational model benefits
very simple, easily understandable, set-oriented operation, solid theoretical foundation