relational data model
physically represented as a set of relations or tables that store data
3 components of relational data model
main data structure used in relational data structure
relation
relation
two-dimensional grid/table that holds data about a set of objects
each row in RDS represents
an instance of an entity
each column in RDS represents
properties or attributes of an object
relational schema
a specification of the name of the relation, followed by list of attributes/columns from table
t/f: in a relational schema, you do not underline the primary key
false
assigning NULL as cell value is diff than leaving it blank because
it indicates that the decision was made to assign that value
data manipulation
a way to access and manipulate data in the relations
example of a manipulation language
structured query language (SQL)
2 types of database integrity constraints
entity integrity and referential (reference) integrity
super key
attribute/combination of attributes that uniquely identifies each row in the table
candidate key
minimal (irreducible) superkey
- a super key that doesn’t contain a different super key as a part of it
primary key
candidate key selected to be used as primary row identifier
a primary key is a type of ______, which is a type of ________
candidate key, super key
a primary key cannot contain
NULL entries
foreign key
attribute/combination of attributes in one table whose values must either match primary key in another table, or be NULL
secondary key
attribute(s) used for data retrieval
entity integrity implies that:
referential integrity implies that:
enforcing referential integrity rule means
it’s impossible to have an invalid foreign key value, or to delete a row whose primary key has matching foreign key values in another table
enforcing entity integrity rule ensures
primary key values exist
if a student is part of a department, and the department is removed from the database:
must remove student or move to different department or change foreign key value to null to ensure referential integrity