1 / 14

Normalization Example

Normalization Example . After the Interview. A corporation wants to develop a database about its employees, the information they have after a rough interview expresses the following reality:

ami
Download Presentation

Normalization Example

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. Normalization Example

  2. After the Interview A corporation wants to develop a database about its employees, the information they have after a rough interview expresses the following reality: An employee is assigned to a given project within a given department. Each project is assigned and managed by one department and the department is managed by one manager with unique employee number. For each employee the corporation has his/her salary history consisting of job title, salary and date starting. Each department also has information on the offices it uses and the project that is being performed in each office. For each office the information consists of the size of it and the telephones assigned to it. For each employee the corporation knows the telephone to contact him and the current job title. Each department has a budget and each project has its own budget.

  3. Guide 1 Define the Domains Atomize as less as possible Define the internal Format Use the one that will cover for all views Write the initial semantic assumptions Draw the dependencies diagram Connect all domains Determine direction of the arrows Using Functional Dependencies 6 Eliminate transitive dependencies Obtain the entities Underline the independent domains as PK’s Write down additional semantic assumptions Present the the domains and the entities to the user 10 Get your designed approved and SIGNED

  4. Problem 1 Domains • Dept # Integer • D Budget Float • Mgr # Integer • Emp # Integer • Project Integer • Telephone Integer • Date date • Job Title String(10) • Salary Float • P Budget Float • Office # Integer • Area Float

  5. Assumptions • No employee is the Manager of more than one department at a time • No employee works in more than one department at a time •  No employee works in more than one project at a time • No employee has more than one office at a time • No employee has more than one phone at a time • No employee has more than one job at a time • No project is assigned to more than one department at a time • No office is assigned to more than one department at a time

  6. FD Diagram D Budget Mgr # Office # Dept # Project Telephone Emp # Area Date Job Title P Budget Salary

  7. Entities 1. Departments:(Dept #, D Budget, Mgr# ) 2. Employees :  (Emp#, Project, Telephone) 3. Salary Histories: ( Emp#, Date, Job Title, Salary) 4. Projects :(Project,Dept #, P Budget) 5. Phones : (Telephone, Office # ) 6. Offices :  (Office #,Dept #, Area ) 12 domains with 6 entities

  8. FD DiagramChanging an assumption D Budget Mgr # Office # Dept # Project Telephone Emp # Area Date Job Title P Budget Salary

  9. Entities 1. Departments:(Dept #, D Budget, Mgr# ) 2. Employees :  (Emp#, Project, Telephone) 3. Salary Histories: ( Emp#, Date, Job Title) 3b. Salary Level: (Job Title, Salary) 4. Projects :(Project,Dept #, P Budget) 5. Phones : (Telephone, Office # ) 6. Offices :  (Office #,Dept #, Area ) 12 domains with 7 entities

  10. Entities and SQL

  11. Entities and Views

  12. Entities and QBE -Print -DX >50k -DX

  13. Entities and QBE(Appendix C) Print Manager# that manage a department with projects With a budget > $50,000 >50k -Print -DX -DX Note that working on the SQL is simpler after you use QBE

  14. Entities and QBE Print the of Office# and Area in square foot as well the department # where employee= 1234 is currently working =1234 -TX -Print -DZ -OY -DZ Print -DX -OY,Print

More Related