lint all files
This commit is contained in:
@@ -148,6 +148,7 @@ A car must have exactly one owner.
|
||||
### Exercise 1
|
||||
|
||||
#### Part 1
|
||||
|
||||
Project -o---|-/\\- Order
|
||||
\[1:M] \[o:m] Relationship
|
||||
|
||||
@@ -155,6 +156,7 @@ project(proj#, name, start-date, end-date)
|
||||
order(order#, date, inquiry, proj#\*)
|
||||
|
||||
#### Part 2
|
||||
|
||||
Supplier -/\\-o---o-/\\- Part
|
||||
\[M:M] \[o:o] Relationship
|
||||
|
||||
@@ -165,6 +167,7 @@ orderList(supplier#\*, part#\*)
|
||||
- We must create a new composite table to contain the relation, since we cannot sustain the principles of foreign keys.
|
||||
|
||||
#### Part 3
|
||||
|
||||
Staff -/\\-|---|- Department
|
||||
\[M:1] \[m:m] Relationship
|
||||
|
||||
@@ -174,6 +177,7 @@ department(dept-id, name, location)
|
||||
- We would create dept-id as a foreign key in the staff table, as multiple values wont occur, and staff must be a part of a department in this scenario.
|
||||
|
||||
#### Part 4
|
||||
|
||||
Manager -|---|- Project
|
||||
\[1:1] \[m:m] Relationship
|
||||
|
||||
@@ -183,6 +187,7 @@ project(proj-id, name, start-date, end-date)
|
||||
- We could use either primary key for the alternate table's foreign key, since they are both mandatory and 1:1, so there would be no multiple values nor would there be null values.
|
||||
|
||||
#### Part 5
|
||||
|
||||
Manager -|---|-/\\- Team -|---|-/\\- Player
|
||||
\[1:M] \[m:m] (Both) Relationship
|
||||
|
||||
@@ -193,14 +198,16 @@ player(player-id, name, address, tel-no, team-name*)
|
||||
## Tutorial 2 (14:00)
|
||||
|
||||
#### Entities & Attributes
|
||||
|
||||
| Entities | Attributes |
|
||||
|----------|------------|
|
||||
| Regional Office | *regioncode*, name, location |
|
||||
| Regional Office | *regioncode*, name, location |
|
||||
| Branch | *branch_no*, institution |
|
||||
| Member | *mem_no*, name, age, type |
|
||||
| Role | *role_id*, level, role |
|
||||
| Role | *role_id*, level, role |
|
||||
|
||||
#### Relations
|
||||
|
||||
Role - \[1:M]\[m:o] - Member
|
||||
Member - \[M:1]\[o:m] - Branch
|
||||
Member - \[M:1]\[o:m] - Branch
|
||||
Branch - \[M:1]\[m:m] - Region
|
||||
|
Reference in New Issue
Block a user