AFM341 Lecture Notes - Lecture 20: Compound Key, Relational Database
We need to turn this many to many relationship into TWO one to many relationships that can be
easily implemented in a relational database
•
We define the Order Items class and model a composition association between Orders and Order
Items
•
Note that the PK of Order Items is the combination of Order number and product number
(concatenated key or composite key)
•
The order items table will include quantity ordered and price attributes because those attributes
depend on both the Order and the Product ordered
•
Use Microsoft Access to show how the structure model would be implemented in a relational
database
•
Sunset graphics' relational database
See below a list of tables, attributes, data types, field sizes and PK/FK •
Relational database planning for attributes
AFM 341 Page 9