DBMS INT302 Unit#2 Relational Model 2020 1
DBMS INT302 Unit#2 Relational Model 2020 1
• dd mm,yyyy etc.
Here,
• CUSTOMER is a relation defined over the four attributes
Cust-id, Cust-name, Address, Phone#,
• each attribute has a domain or a set of valid values. For
example, the domain of Cust-id is 6 digit numbers.
FORMAL DEFINITIONS
1. Domain constraints
2. Key constraints
3. Entity integrity constraints
4. Referential integrity constraints
Domain constraints
1. Domain constraints specify that within each tuple,
– the value of each attribute A must be an atomic value from the
domain dom(A), or
– It could be NULL if it is allowed for that attribute.
Key Constraints and Constraints on Null values
Referential integrity states that a given non null foreign key value
must have a matching primary key value somewhere in the
referenced relation.
t2[PK].
Referential Integrity - continued
2. a null.
Referential
5.7 Integrity Constraint
Other Types of Constraints