Professional Documents
Culture Documents
Management
System
Lecture - 15
DB and Math Relations
Properties of DB relations are
similar to those of Mathematical
relations, except
The order of columns in
Mathematical relation does matter
Degree and Cardinality
The number of rows in a relation
is its cardinality and the number
of columns is its degree
Relations Keys
The concept of key and all different
types of keys are applicable to the
Relations
Foreign Key: An attribute of a table B
that is primary key in another table A
Foreign Key
Consider table EMP and DEPT
EMP (empId, empName, qual, depId)
DEPT (depId, depName, numEmp)
Integrity Constraints
Two main types
Entity integrity constraint
– Primary key cannot have null value