Ch04
Ch04
Chapter 4
Logical Database Design and
the Relational Model
C-1234 Samuel
C-2345 Smith
• Data integrity
– Mechanisms for implementing business rules that maintain integrity of
manipulated data
▪ Domain constraints: all of the values in a column must be from the
same domain
▪ Entity integrity: ensure every record which has a key field and the
data value for that key field must be valid
• Data manipulation
– Powerful SQL operations for retrieving and modifying data
Product table
ProductID Name Price Quantity
DeptID DeptName
Dept-01 Marketing
Department table
Dept_02 Personnel
b) CUSTOMER relation
Relationship
a) Relationship between customers and orders
(M:N)
b) Resulting relations
Question: Is this a relation? Answer: Yes; unique rows and no multivalued attributes
Question: What’s the primary key? Answer: Composite — Emp ID, CourseTitle
Partial dependencies are removed, but there are still transitive dependencies