| Connolly, Begg, Holowczak | Pratt/Adamski | Elmasri/Navathe (3rd) ed. | Kroenke (7th ed.) | McFadden (5th ed.) |
|---|---|---|---|---|
| Chapter 10 | Chapter 6 | Chapter 9 | Chapter 6 | Chapter 6 and Appendix B |
E-R Model -> Relational Model -> Database
The following are some vocabulary that are commonly used. Note the different terms used depending on the model being discussed.
| ER Model | Relational Model | Database | Traditional Programmer |
|---|---|---|---|
| Entity | Relation | Table | File |
| Entity Instance | Tuple | Row | Record |
| Attribute | Attribute | Column | Field |
| Identifier | Key | Key | Key (or link) |
Note: The terms in the left most column under ER Model are not the four ER modeling constructs.
The Identifier of the Entity becomes a
Key of the Relation.
CUSTOMER (CustID, Name, Address, Phone)
If weak entity is ID Dependent, then
the parent relation's key (Identifier) is
copied into the dependent relation. This is
often referred to as a Foreign Key.
ORDER (OrderNum, OrderDate, SalesP)
ITEMS (OrderNum, ItemNum, PartNum,
Qty, Cost)
In the above example, in the ITEMS Relation: OrderNum is
the Foreign Key and OrderNum plus ItemNum is the
Composite Key.
In the ORDER Relation: OrderNum is the Key.
CUSTOMER (CustomerID, Name, Address, ...)
ORDER (OrderNum, OrderDate, SalesP, CustomerID)
SUPPLIER (SupplierID, FirmName, Address, ...)
PRODUCT (ProductID, Description, ...)
PRODUCT_SUPPLIER (SupplierID, ProductID)
| Part_ID | Parent_Part_ID | Description |
|---|---|---|
| 1000 | null | Complete Car |
| 200 | 1000 | Engine |
| 500 | 1000 | Body |
| 510 | 500 | Doors |
| 520 | 500 | Hood |
| 530 | 500 | Quarter Panels |
| 540 | 500 | Trunk |
| 550 | 500 | Roof |
| 512 | 510 | Front Passenger Door |
| 514 | 510 | Front Driver's Door |
| 516 | 510 | Back Passenger Door |
| 518 | 510 | Back Driver's Door etc. |
Complete Car 1000
Engine 200
Body 500
Doors 510
Front Passenger Door 512
Front Driver's Door 514
Back Passenger Door 516
Back Driver's Door 518
Hood 520
Quarter Panels 530
Trunk 540
Roof 550
STUDENT (Student_ID, Name, Address,
...)
TUTOR-INTERSECTION (Student_ID, Tutored_by_ID)
| Student ID | Name | Address |
|---|---|---|
| 101 | B. Smith | 1234 Smith St. |
| 202 | A. Green | 12 Grant St. |
| 303 | D. Jones | 98 Short St. |
| 404 | P. Ewing | 999 Tall St. |
TUTOR-INTERSECTION
| Student ID | Tutored by ID |
|---|---|
| 101 | 202 |
| 404 | 202 |
| 202 | 303 |
| 404 | 303 |
| [Home] |