Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of Entity Relationships

Similar presentations


Presentation on theme: "Implementation of Entity Relationships"— Presentation transcript:

1 Implementation of Entity Relationships
1-1 Relationship (both mandatory) 1 table required – attribute of main table Eg. Doctor has one specialty 2 tables required – foreign key in table Eg. Doctor has one assigned nurse Implement in Access! Lab 4

2 Implementation of Entity Relationships
1-1 Relationship (one mandatory) 2 tables required Primary Key of Mandatory as Foreign Key of Optional Eg. Nurse / Office (1 nurse in an office) 1-1 Relationship (both optional) Primary Key “Strong” Entity as Foreign Key FK can be null Eg. Patient has disease Implement in Access! Lab 4

3 Implementation of Entity Relationships
1-M Relationship (both mandatory) 2 tables required Primary Key of 1 as Foreign Key of M Eg. Doctor / Patient (1 doctor has many patients –no vice/versa) 1-M Relationship (1 mandatory M optional) Eg. Doctor / Equipment Implement in Access! Lab 4

4 Implementation of Entity Relationships
1-M Relationship (1 optional M mandatory) 2 tables required Primary Key of 1 as Foreign Key of M Eg. Hospital Fire Marshall / Doctors 1-M Relationship (Both Optional) FK can be null Eg. Hospitals / Equipment Distributors Implement in Access! Lab 4

5 Implementation of Entity Relationships
M-N Relationships 3 tables required 2 tables contain primary key and attributes of entities 1 table contains primary key of 2 entities as foreign keys and other attributes Eg. Patient / Medication Lab 4


Download ppt "Implementation of Entity Relationships"

Similar presentations


Ads by Google