Sei sulla pagina 1di 2

1. The company you work for wants to digitize their time cards.

You have been asked to design the


database for submitting and approving time cards. Draw the database ER diagram with the
following information and also write schema of each entities and relations by showing their
attributes, keys and constraints:
A timecard should have hours worked and date submitted
Each timecard is associated with exactly one employee
Each timecard should have a unique id
Each timecard has a status: it is either approved, not approved, or pending
Each employee has a unique id
Each employee has a name and address.
Each employee submits a time card every pay period. i.e. In 1 year, they will
submit multiple time cards
Each employee either has direct deposit or physical check as their method of
payment
Each employee is associated with exactly one manager
Each manager has a unique id and a name
Each manager is in charge of multiple employees
Each manager approves time cards for multiple employees

If you feel that you must make some assumptions, please state them clearly so that they are easily
understood. Remember to indicate the key for each entity, as well as the multiplicity of each
relationship (e.g. one-to-many) using the appropriate notation.

2. The Motor Vehicle Branch administers driving tests and issues driver's licenses. Any person who
wants a driver's license must first take a learner's exam at any Motor Vehicle Branch in the
province. If he/she fails the exam, he can take the exam again any time after a week of the failed
exam date, at any branch. If he passes the exam, he is issued a license (type = learner's) with a
unique license number. A learner's license may contain a single restriction on it. The person may
take his driver's exam at any branch any time before the learner's license expiry date (which is
usually set at six months after the license issue date). If he passes the exam, the branch issues
him a driver's license. A driver's license must also record if the driver has completed driver's
education, for insurance purposes.
Create a E-R diagram and show the schema of following steps.
1. Find out the entities in the spec.
2. Find out the relationships among the entities.
3. Figure out attributes of the entities and (if any) of the relationships.
4. Figure out constraints between entities and relationship
5. Check to see if you don't miss anything in spec
3. Suppose you are hired by a company to develop a technical support system. Customers submit
their complaints in the form of tickets to the company technical support group. Members of the
technical support group read the complaints and communicate with the customer to resolve the
technical issues. Your first task is to develop the technical support database ER diagram with the
following information. If you do not have sufficient information, state your assumptions. Also write
schema of each entities and relations by showing their attributes, keys and constraints
Each customer has customer ID, name, (one) main contact email, and (one) main contact
phone number.
Each employee has an employee ID, name, birth date, specialty, (one) main contact
email, and (one) main contact phone number.
Each technical problem has a unique name and a description.
A ticket is generated by customer. One or more employee may work on each ticket. Each
ticket is related to at least one technical problem. The ticket information must contain a
unique ticket number, the date when the customer submits the complaint, the date when
the issue is resolved, and the content of the problem.
For each ticket, there are some communications between the customer who reported the
ticket and employees. The information of each communication in the database must
reflect the customer and the employee who are involved in the communication, its unique
number, its date, and its content. Each communication also has a code that shows
whether it was done via email or phone.
You should indicate the key for each entity and the multiplicity of each relationship in your
diagram.

4. Draw an ER diagram that models a towns Public Works Department. Make note of any
assumptions you make. Also write schema of each entities and relations by showing their
attributes, keys and constraints
Each employee has a name, phone, address, city, state, and zip. There are both regular and
temporary employees.
For regular employees, we keep track of their date hired and yearly salary. For temporary
employees, we keep track of the length of their current contract and their hourly wage.
We keep track of each job the Public Works Department does. We keep track of the date a
job starts, the date a job finished, and the location of the job.
We also keep track of which employees have been assigned to the job. An employee can be
assigned to many jobs, and each job can have many employees assigned to it.
We also keep track of the supervisor of each job. A supervisor must be a regular employee.
Not all regular employees have been supervisors. A regular employee can supervise many
jobs. Each job has exactly one supervisor.
We also keep track of the residents of the town we keep track of their names and
addresses.
We keep track of the complaints that residents make about the jobs. Not all residents make
complaints, but some make many complaints. Not all jobs generate complaints, but some
generate many complaints.
For each complaint, we keep track of the date and the content of the complaint.

You should indicate the key for each entity and the multiplicity of each relationship in your diagram.

Potrebbero piacerti anche