Saturday, 22 March 2014

3.database

Primary Key: DoctorID
Candidate Key:Doctor,ShiftID
Alternate Key: DoctoeDutyID

In the oreceding table, DoctorID and ShiftID are individually unique in every row.
Therefore, the columns, DoctorID and ShiftID, are candidate keys for the primary key.
However, the ShiftID column may contain duplicate values as two doctors may be on
the same shift. Therefore,DoctorID should be chasen as the primary key and ShiftID
as the alternate key.

2.Design an ER diagram for the following situation: An organization has two types of employees, salaried and wage earning. Both the types of employees have some common properties, such as employee code, employee name, and employee address. However, the salaried employees have other additional properties: basic, allowance, and House Rent Allowance (HRA). The wage earning employees have distinct properties that are daily wage and overtime.


1. Shopping Spree is a leading departmental store in Shanghai. The store has a number of regular customers who purchase bulk items. The store also conducts regular feedback sessions to analyze customer satisfaction levels. Chen, the Customer Analyst of Shopping Spree, has to make the ER diagram to represent the preceding situation, and then to map the ER diagram to the corresponding tables. Help Chen to do the same.