e r to relational basic n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
E-R to Relational - Basic PowerPoint Presentation
Download Presentation
E-R to Relational - Basic

Loading in 2 Seconds...

  share
play fullscreen
1 / 4

E-R to Relational - Basic - PowerPoint PPT Presentation

48 Views
Download Presentation
E-R to Relational - Basic
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. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. E-R to Relational - Basic • Strong entity • Table with all attributes of that entity • Relationships • Table with primary keys of participating entities • Weak entity • Table with primary key of strong entity • Multi-valued Attribute X • Table with X, primary key of strong entity • Row per value of X • Finally ..

  2. E-R to Relational - Improved • For N-1/1-1 relationships • Move relationship attributes to the N-side entity’s table • Dept id moves to employee. • No need for a table for the relationship relating a weak entity • Remove the “depends” table

  3. Emp-Dept ER Diagram Dept id name Manages department city state color Lic# car Supervises Start date Works for dependent supervisee supervisor reln employee name Supports Owns SSN Name address phones street city

  4. Emp-Dept schema • Employee(SSN, name, street, city, deptid, startdate, supervisor_ssn) • Dept(deptid, name, city, Manager-SSN) • Phone(SSN, phone#) • Dependent(EMP-SSN, Name, relation) • Car(state, license#, color) • CarOwners(owner-SSN, car-state, license#)