Relational Model Flashcards
What is a relational model?
A logical model which consists of relations(tables) to store data.
- made of a set of named relations in a 2d table of attributes and tuples.
What is an entity?
the name of a table
must be distinct
What is an attribute?
the names of the columns
must be distinct in relation
e.g. EMP_ID
What is a tuple?
A record. A row of a table.
A single occurrence of an entity
What is an attribute value?
The values that fill out a table
What is a degree?
the number of attributes in a table (columns)
What is the cardinality?
The number of tuples at one time (can change)
What must relational tables have?
no duplicate attributes/tuples
attributes/tuples inherently unordered
What is a relational?
A set of unordered tuples
e.g.
EMPLOYEE ( (1234, Sam Smith, 25), (1235, Joe Ball, 40))
What is a domain?
set of all permissable values for a column
e.g. ____ must be NOT NULL, or INTEGER
What is a primary key?
uniquely identify a tuple
can be made of more than one attribute
What is a Foriegn key?
attribute matches PK in another table
What is a constraint?
Restrict the data values that can be inserted to enforce consistency
e.g. column cannot be null
What is a relational database schema?
A database is a collection of relations as made up of all the database relations.