1 / 5

Implementation of Entity Relationships

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

edickey
Download Presentation

Implementation of Entity Relationships

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Implementation ofEntity 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) • 2 tables required • Primary Key “Strong” Entity as Foreign Key • FK can be null • Eg. Patient has disease Implement in Access! Lab 4

  3. Implementation ofEntity 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) • 2 tables required • Primary Key of 1 as Foreign Key of M • Eg. Doctor / Equipment Implement in Access! Lab 4

  4. Implementation ofEntity 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) • 2 tables required • Primary Key of 1 as Foreign Key of M • FK can be null • Eg. Hospitals / Equipment Distributors Implement in Access! Lab 4

  5. Implementation ofEntity 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

More Related