Our goal is to provide information for the purposes of decision making in business. The database is one way to provide such information.
However, we must organize and develop a database in a structured fashion to meet the needs of an organization and reflect the way it operates.
Recall the database design process we follow:
Note that in the second step, we may also develop additional models such as data flow and functional models.
| Elmasri/Navathe 3rd ed. | Kroenke 7th Ed. | McFadden 5th ed. | Connolly/Begg 3rd ed. |
|---|---|---|---|
| Chapters 3 and 4 | Chapter 3 | Chapters 3 and 4 | 2, 10, 11, 12 |
An instance of an entity is like a
specific example:
Bill Gates is an Employee of Microsoft
SPAM is a Product
Greenpeace is an Organization
| 1:N | "One to Many" |
| N:M | "Many to Many" |
| 1:1 | "One to One" |
Beware of 1:1 relationships. The two entities involved might be coalesced into one. Also called HAS-A relationship.
Beware of N:M relationships. Typically split these into two 1:N relationships with an intersection entity.
Kronke textbook Notation(NOTE: We not longer use this notation so you can safely ignore this example)
For this diagram:
|
Chen notation as used in the Elmasri/Navathe Textbook
This is also called the "Chen notation" after the author who first proposed it. |
Oracle Designer CASE Notation
There are a set of tools within the Oracle CASE environment that can print these "relationship sentences". |
Visible Analyst Notation
|
Sybase PowerDesigner Notation
|
Popkin System Architect - Crow's Feet Notation
|
Popkin System Architect - UML Notation
|
The d in the circle indicates the subtype entity is distinct. Only one subtype entity can participate in an instance.
As before, the double line between the Call entity and the d in the circle indicates the relationship is mandatory.
| Elmasri/Navathe 3ed ed. | Kroenke 7th ed. | McFadden 5th ed. | Connolly/Begg 3rd ed. |
|---|---|---|---|
| Chapter 7 | Chapter 9 | Chapter 6 | 3, 13 |
The Identifier of the Entity becomes a
Key of the Relation.
(not primary key - just "key")
CUSTOMER (CustID (key), Name, Address, Phone)
If entity is ID Dependent, then
the parent relation's key (Identifier) is
copied into the dependent relation and is
combined with the dependent relation's
identifier to form a composite key.
| Chen Notation | UML Notation |
|---|---|
|
|
ORDER (OrderNum (key), OrderDate, SalesPerson)
ORDERITEMS (OrderNum (key)(fk) , ItemNum (key), PartNum, Quantity, Cost)
In the above example, in the ORDERITEMS Relation: OrderNum is
the Foreign Key and OrderNum plus ItemNum is the
Composite Key.
In the ORDER Relation: OrderNum is the Key.
| Chen Notation | UML Notation |
|---|---|
|
|
CUSTOMER (CustomerID (key), Name, Address, ...)
ORDER (OrderNum (key), OrderDate, SalesPerson, CustomerID (fk))
| Chen Notation | UML Notation |
|---|---|
|
|
SUPPLIER (SupplierID (key), FirmName, Address, ...)
COMPONENT (CompID (key), Description, ...)
SUPPLIER_COMPONENT (SupplierID (key), CompID (key))
| Chen Notation | UML Notation |
|---|---|
|
|
| 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
| Chen Notation | UML Notation | Crow's Foot Notation |
|---|---|---|
|
|
|
STUDENT (StudentID (key), Name, Address, ...)
STUDENT_TUTOR (StudentID (key), Tutored_StudentID (key))
| StudentID (key) | 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. |
STUDENT_TUTOR
| StudentID (key) | StudentTutoredID (key) |
|---|---|
| 101 | 202 |
| 404 | 202 |
| 202 | 303 |
| 404 | 303 |
| Chen Notation |
|---|
|
This represents the business model where a salesperson is assigned to specific customers.
This represents the business model where a salesperson is assigned to individual orders.