DB - 07 Relation
DB - 07 Relation
DB - 07 Relation
LECTURE #:07
FACULTY OF CS & IT
Relational Model Terminology
The relational model was invented by E.F. Codd
A relation is a table with columns and rows.
Only applies to logical structure of the database, not the
physical structure.
Attribute is a named column of a relation.
Domain is the set of allowable values for one or
more attributes.
Domain refers to:
Data type of values &
Range of Values
2
Cont
Tuple is a row of a relation.
Degree is the number of attributes in a
relation.
Cardinality is the number of tuples in a
relation.
Relational Database is a collection of
normalized relations with distinct relation
names.
3
Cont
Examples of Attribute Domains
Alternative Terminology for
Relational Model
Database Relations
Relation schema
Named relation defined by a set of attribute and domain
name pairs
Relational database schema
Set of relation schemas, each with a distinct name.
Properties of Relations
Unique Identifier for Relations
Relation name is distinct from all other relation names in
relational schema.
Atomic Values
Each cell of relation contains exactly one atomic (single)
value.
Unique Identifier for Attributes
Each attribute has a distinct name.