16 - Tutorial-1 Wed, March 03, 2010 1 DLPD, BI TS-Pilani....

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Tutorial-1 Wed, March 03, 2010 1 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS Wed, March, 2010 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 2 EMPLOYEE SUPERVISION Bdate Ssn Name FName Mint LName Sex Address Salary Works_for DEPARTMENT Name Number Location MANAGES Start Date Number of Employee WORKS_ON CONTROLS PROJECT DEPENDENTS_OF Name Number Location Hours DEPENDENT Name Sex Bdate Relationship Dependent ( , ) 1 1 ( , N) 1 Project Controlled project ( , ) 1 1 ( , N) Controlling department ( , N) 4 departm ent ( , ) 1 1 ( , N) ( , ) 0 1 Employee ( , ) 1 1 ( , ) 0 1 Manager Employee Supervisor Supervisor ( , N) ER Diagram for the Company schema, with all role names Wed, March, 2010 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 3 The ER conceptual schema diagram for the COMPANY database. Wed, March, 2010 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 4 ER-to-Relational Mapping Step 1: Mapping of Regular Entity Types. For each regular (strong) entity type E in the ER schema, create a relation R that includes all the simple attributes of E. Choose one of the key attributes of E as the primary key for R. I f the chosen key of E is composite, the set of simple attributes that form it will together form the primary key of R. Example: We create the relations EMPLOYEE, DEPARTMENT, and PROJECT in the relational schema corresponding to the regular entities in the ER diagram. SSN, DNUMBER, and PNUMBER are the primary keys for the relations EMPLOYEE, DEPARTMENT, and PROJECT as shown. Wed, March, 2010 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 5 Wed, March, 2010 DLPD, BI TS-Pilani. Prepared by Dr.R. Gururaj, Asst.Professor of CS 6 Step 2: M apping of Weak Entity Types For each weak entity type W in the ER schema with owner entity type E, create a relation R & include all simple attributes (or simple components of composite attributes) of W as attributes of R. Also, include as foreign key attributes of R the primary key attribute(s) of the relation(s) that correspond to the owner entity type(s)....
View Full Document

This note was uploaded on 03/14/2010 for the course CSE IS ZC332 taught by Professor Shailendrasshekhawat during the Summer '10 term at Birla Institute of Technology & Science.

Page1 / 17

16 - Tutorial-1 Wed, March 03, 2010 1 DLPD, BI TS-Pilani....

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online