SlideShare uma empresa Scribd logo
1 de 96
Database Design FDD
What is a Database? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is Data? ,[object Object],[object Object],[object Object],[object Object]
Relational Data Model ,[object Object],[object Object],[object Object],[object Object]
Features of the relational data model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Terminology The special value  is NULL which implies that there is no corresponding value for that cell. This may mean the value does not apply or that it is unavailable. Entire rows of NULLs are not allowed. Employee Job Manager Jack Secretary Jill Jill Executive Bozo Bozo Director Lulu Clerk Jill
[object Object],[object Object],[object Object],Terminology ,[object Object],[object Object],[object Object],Employee Job Manager Jack Clerk Jill
[object Object],[object Object],Terminology: Domain Typist Manager Clerk........ Tom  Mary  Bozo  Kali ........ Here again we use the  same domain as above in  employee. An attribute value (a value in a column labelled by the attribute) must be from the corresponding domain or may be NULL (  ). Attribute Domain Employee Person Name Job Job Name Manager Person Name
[object Object],[object Object],[object Object],[object Object],Terminology:Relation Schema EMPLOYEE Employee Job Manager
[object Object],[object Object],[object Object],[object Object],Terminology:Integrity Constraint and Domain Constraint EMPLOYEE This restricts the salary to be under  a set value . Employee Job Manager Salary Jack Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
[object Object],[object Object],[object Object],Terminology:Key Constraint   EMPLOYEE Jack appears twice.  This means that This violates the  Key Constraint  Employee Job Manager Salary Jack Secretary Bozo 25,000 Jack Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
Terminology:Key Constraint An attribute (or set of attributes) to which a key constraint applies is called a key ( or candidate key). Every relation schema must have a key. If a key constraint applies to a set of attributes, it is called a composite or Concatenated Key. Otherwise it is a simple key. Key Simple Key Composite Key: EMPLOYEE Another possible key. The combination of Job and manager is also unique Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director Bozo 50,000 Lulu Clerk Jill 30,000
Terminology:Key Constraint A key cannot have a  NULL (  )  value. For example,  If we change the table so that the Employee Bozo does not have a manager then  Job+Manager cannot be  a key. Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
[object Object],[object Object],[object Object],[object Object],[object Object],Terminology:Key Constraint Here we have chosen the Simple Key Employee  Over the concatenated  option of both  Job and Manager Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director Bozo 50,000 Lulu Clerk Jill 30,000
A D atabase  is more than multiple tables you must be able to “relate” them The link is through the Agent-Code Cus-code Cus-Name Area-Code Phone Agent-Code 10010 Ramus 615 844-2573 502 10011 Dunne 713 894-1238 501 10012 Smith 615 894-2205 502 10013 Olowaski 615 894-2180 502 10014 Orlando 615 222-1672 501 10015 O’Brian 713 442-3381 503 10016 Brown 615 297-1226 502 10017 Williams 615 290-2556 503 10018 Farris 713 382-7185 501 10019 Smith 615 297-3809 503 Agent-Code Agent-Name Agent-AreaCode Agent-Phone 501 Alby 713 226-1249 502 Hahn 615 882-1244 503 Okon 615 123-5589
Terminology: Relational Database A Relational  Database  is just a set of Relations. For example Which Attribute do you think relates these two tables together?  JOB EMPLOYEE Job Salary Secretary 25,000 Secretary 25,000 Executive 40,000 Director 50,000 Clerk 30,000 Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
Terminology:Relational   Database Schema A Relational  Database   Schema  a set of  Relation Schemas , together with  a set of  Integrity Constraints . For example the Relations that you have been looking at with the headings EMPLOYEE JOB are usually written as   EMPLOYEE( Employee , Job, Manager) JOB( Job , Salary) Notice how the Primary Keys are underlined Employee Job Manager Salary Job Salary
Terminology :Referential Integrity Constraint This constraint says that – All the values in one column should also appear in another column. Look at the table below. Every entry in the Job column of the Employee table  must appear  in the  Job column of the Job table EMPLOYEE JOB FK PK  FK PK Employee Job Manager Jack Secretary Bozo Kim Secretary Jill Jill Executive Bozo Bozo Director Lulu Clerk Jill Job Salary Secretary 25,000 Secretary 25,000 Executive 40,000 Director 50,000 Clerk 30,000
Referential Integrity Constraint Why does the following relational database violate the referential integrity constraints? In other words, Why can’t Employee(Job) be a Foreign Key to Job(Job), or Employee(Manager) be a Foreign Key to Employee(Employee)? Click here for the answers EMPLOYEE JOB FK FK PK PK Job Salary Director 50,000 Clerk 30,000 Employee Job Manager Jack Secretary Bozo Kim Secretary Jill Bozo Director Lulu Clerk Jill
Why Use Relational Databases ,[object Object],[object Object]
Example of Data Redundancy (1)
Example of Data Redundancy (2) ,[object Object],[object Object],[object Object]
Example of Data Redundancy (3)
Example of Data Redundancy (4) ,[object Object],[object Object],[object Object],[object Object]
Other Advantages of Relational Databases ,[object Object],[object Object],[object Object],[object Object]
Summary of Some Common Relational Terms ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Network Diagrams
Terminology: Network Diagram EMPLOYEE( Employee , Job, Manager)  JOB( Job , Salary) A relational database schema with referential integrity constraints can also be represented by a network diagram. A Referential Integrity Constraint is notated as an arrow labeled by the foreign key. You must always write the label of the Foreign Key on the arrow. Sometimes the same attribute has different titles in different tables. EMPLOYEE JOB Job Manager Network Diagram Referential Integrity constraints can easily be represented by arrows FK  PK. The arrow points from the Foreign Key to the matching Primary Key Notice here, the label is Manager and not Employee.
Personnel Database: Consider the following Tables  PROJECT NAME P_NUMBER   MANAGER ACTUAL_COST  EXPECTED_COST  New billing system  23760 Yates    1000   10000 Common stock issue  28765 Baker    3000   4000 Resolve bad debts  26713 Kanter   2000   1500 New office lease  26511 Yates    5000   5000 Revise documentation  34054 Kanter    100   3000 Entertain new client  87108 Yates    5000   2000 New TV commercial  85005 Baker    10000   8000 ASSIGNMENT    SKILL E_NUMBER  P_NUMBER   AREA 1001 26713   Stock Market  1002 26713   Taxation  1003 23760   Investments  1003 26511   Management 1004 26511  1004 28765 1005 23760  EMPLOYEE    TITLE NAME  E_NUMBER DEPARTMENT   E_NUMBER  CURRENT _ TITLE  Kanter 1111 Finance     1001 Senior consultant  Yates 1112 Accounting     1002 Senior consultant  Adams 1001 Finance     1003 Senior consultant  Baker  1002 Finance     1004 Junior  consultant  Clarke 1003 Accounting     1005 Junior consultant  Dexter 1004 Finance  Early  1005 Accounting  PRIOR_JOB EXPERTISE E_NUMBER   PRIOR_TITLE   E_NUMBER  SKILL 1001 Junior consultant  1001 Stock market  1001 Research analyst  1001 Investments  1002  Junior consultant  1002  Stock market  1002  Research analyst  1003  Stock market  1003  Junior consultant  1003  Investments  1004  Summer intern  1004  Taxation  1005 Management
[object Object],[object Object],[object Object],[object Object],EMPLOYEE  (NAME,  E_NUMBER,  DEPARTMENT) SKILL   ( AREA ) PROJECT  (NAME,  P_NUMBER ,  MANAGER, ACTUAL_COST, EXPECTED_COST  ) Personnel   Database   Schema   Not FK , we will look at this later What are the connecting Foreign Keys to Primary Keys?
TITLE  PROJECT  PRIOR_JOB EMPLOYEE SKILL  EXPERTISE Personnel   Database   Network   Diagram   ASSIGNMENT Once you have produced your Schema and identified the Primary and Foreign Keys you can create the Network Diagram.The Network Diagram shows each of the tables with their links. Each of the Tables (Relations) are represented in a rectangle as shown. They are then connected by arrows that show the FKs pointing to the PKs, The arrow head points towards the PK, while the FK name written is the same as the attribute of the table that has the FK in it.
Personnel   Database   Network   Diagram   TITLE  PROJECT  PRIOR_JOB EMPLOYEE SKILL  EXPERTISE skill e_number p_number e_number e_number e_number manager ASSIGNMENT
Summary: Questions ,[object Object],[object Object],[object Object],[object Object],[object Object]
Summary: Answers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activities ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Answer Supplies Supplier Part Uses Product
[object Object],[object Object],[object Object],[object Object],[object Object],Ordnum ordDate custNumb 12489 2/9/91 124 custNumb custName Address Balance credLim Slsnumber 124 Adams 48 oak st 418.68 500 3 Slsnumber Name address totCom commRate 3 Mary 12 Way 2150 .05 Part Desc onHand IT wehsNumb unitPrice AX12 Iron 1.4 HW 3 17.95
[object Object],ordNum Part date quotePrice
Answer Orders OrLine Part Customer SalesRep SlsNumber CustNumb orLine Part
Activities ,[object Object],[object Object],[object Object],[object Object]
Activities ,[object Object]
Functional Dependence FDD
Functional Dependency Diagrams ,[object Object],[object Object],[object Object],[object Object],[object Object]
Data Analysis and Database Design Using Functional Dependency Diagrams ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Starting points for drawing functional dependency diagrams ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],To start the process of constructing our FDD we do the following:
Enterprise Rules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Drawing FDDs - Data Elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Functional Dependency Diagrams Now we have the Database Design 2NF  Relation 3NF  Relation Universal  Relation 1NF Tables ONF Using the Method of Decomposition Method of Synthesis Sample Data Eliminate  Part Key Dependencies Eliminate Non Key Dependencies Eliminate Repeating Groups Attribute & Functional Dependencies Given the Problem Functional Dependency Diagram OR, here is the same process using the FDD approach
Data Element Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Drawing FDDs Data Elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Data Element
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Drawing FDDs –Using Elements
Data Element Examples Surname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . On a form gives rise to the element CREDIT CARD  Bankcard  Mastercard  Visa    Other CreditCardType Surname Here are some examples of finding the Data Elements on a typical form On a form gives rise to the element
Functional Dependency Examples Students and their family names “ Each student (identified by student number) has only one family name” Considering the rules stated above we should be able to draw a FDD for this. What are the elements of interest? Students FamilyName 1 Smith 2 Jones 3 Smith 4 Andrews
FDDs Answer Students  determine  FamilyName (or FamilyName  depends  on Students) Each student has exactly one family name, but the name could be the name of many students. So  FamilyName  does not determine  Student#  e.g. “Smith is the name of students 1 and 3 Students   FamilyName Data elements of interest are  Student# and FamilyName. Students FamilyName 1 Smith 2 Jones 3 Smith 4 Andrews
FDDs Examples Employees and the departments they work for. In this example the tables are representing some interesting data of the business. We see that Employees with the ID numbers 11,2 and 31 all work in the Accounting Dept and that Employees with the ID numbers 45 and 27 work in the Sales Dept. Do you think that you could draw an FDD to represent this? Have a go and then check your answers Enterprise Rule: “Each employee works on only one department” Department Name Accounting Employee Number 11 2 31 Department Name Sales Employee Number 45 27
FDD Answers Employees and the departments they work for. Data elements of interest are  Employee#  and  DeptName” Employee#     DeptName So we could make this following Table  Department Name Accounting Employee Number 11 2 31 Department Name Sales Employee Number 45 27 Employee# DeptName 11 Acc 2 Acc 45 Sales 31 Acc 27 Acc
FDDs Examples The quantity of parts held in a warehouse and their suppliers Part#  determines  SupplierName & Part#  determines  QOH “ Parts are uniquely identified by part numbers” “ Suppliers are uniquely identified by Supplier Names” “ A part is supplied by only one supplier” “ A part is held in only one quantity” Parts   SupplierName Parts  QOH Should QOH be a determinant? No, common sense tells us that is not a reliable choice. We could have had repeating values Parts Suppliers Name QOH 1 Wang Electronics 23 2 Cumberland Enterprises 80 3 Wang Electronics 4 4 Roscoe Pty. Ltd 58
FDDs Examples Students and their subjects enrolled. “ Each student is given a unique student number” “ A subject is uniquely identified by its name” “ A student may choose several subjects” Data element of interest are  Student#  and  SubjectName Student SubjectName There us no functional dependency here. Student# does not determine SubjectName, nor does SubjectName  determine  Student# Student SubjectName 1 History 1 Geography 1 Mathematics 1 History 2 English 2 English 3 Mathematics 3 English  4 French 4 Geography
FDDs Examples Results obtained by each student for each subject. “ Each student is given a unique student number” “ A subject is uniquely identified by its name” “ A student may choose several subjects” “ A student is allocated a result for each subject” “ Each student has only one name.” Data elements are  Student#, StudentName, SubjectName  and  Grade
FDDs Examples Results obtained by each student for each subject. Try and construct an FDD for this table considering the given Business Rules and the Data Elements Student Student Name Subject Name Grade 1 Smith History A 1 Smith Geography B 1 Smith Mathematics A 2 Jones History C 2 Jones English C 3 Smith English A 3 Smith Mathematics A 4 Andrews English  D 4 Andrews French C 4 Andrews Geography C
FDDs Examples Results obtained by each student for each subject. Student # StudentName We can see that there is only one and only one student name for each student number, even though there might be more than one student with the same name. So…. But the subject grade for any student cannot be determined by the subject name or the student# by itself. A student can have many grades depending on the subject. How can we cater for this?
FDDs Answer Results obtained by each student for each subject. Student SubjectName Grade StudentName This is called the Composite Determinant We need to combine the two Elements to say that there is one and only one grade for a student doing a particular subject. Here then is the complete diagram
FDDs Examples Customer Orders Validating functional dependencies Using simple data and populating the table, check there is only one value of the dependent. Order Part# CustomerName Address 454 12 David Smith 1 John St, Hawthorn 454 23 David Smith 1 John St, Hawthorn 455 32 Emily Jones 45 Grattan St, Parkville 455 49 Emily Jones 45 Grattan St, Parkville 455 54 Emily Jones 45 Grattan St, Parkville 456 12 Mary Ho 44 Park St, Hawthorn 456 54 Mary Ho 44 Park St, Hawthorn
FDDs Examples “ Orders is uniquely identified by its names” “ Customers are uniquely identified by their names” “ A customer has only one address” “ An order belongs to only one customer” “ A part may be ordered only once one each order” Order CustomerName Address Part# Order Parts Ordered CustomerName Address 454 23, 12 David Smith 1 John St, Hawthorn 455 54, 49, 32 Emily Jones 45 Grattan St, Parkville 456 54, 12 Mary Ho 44 Park St, Hawthorn
FDDs Examples Employees and their tax files numbers “ Each employee has a unique employee number” “ Each employee has a unique tax file number ” Employee#  determines  taxfile# Taxfile#  determines  Employee# Alternative keys Employee TaxFile# 1 1024-5321 2 3456-3294 3 8246-7106 4 8861-6750 5 1234-4765 Employee# Taxfile# Employee# Taxfile# Taxfile# Employee#
[object Object]
Functional Dependency Diagrams Database Design Let’s look at the process of converting the FDD into a schema. We have a 12 step process to do so, that has an iterative component to it (loop). The 12 steps are outlined in the next series of slides.
Functional Dependency   Diagram Preparation  1. Represent each data element as a box. 2. Represent each functional dependency by   an   arrow. 3. Eliminate augmented dependencies. 4. Eliminate transitive dependencies. 5. Eliminate pseudo-transitive dependencies.   By this stage, intersecting attributes should have been eliminated.
Deriving 3NF Schema: Synthesis Algorithm 6. Pick any (unmarked) arrow in the diagram. 7. Follow it back to its source, and write down  the name of the source. S 8 . Follow all arrows from the source data item,  and write down the names of their destinations . S, A, B, C S is now the key of a 3NF relation ( S , A, B, C). S S A B C
Synthesis Algorithm :  Deriving 3NF Schema 9.   Mark all the arrows just processed. 10.   If there are any unmarked arrows in the diagram, go back to step 6.  11. Finally, determine the Universal Key. Any attribute which is not determined by any other attribute (ie. has no arrow going into it) is part of the Universal Key. 12.   If the universal key is not already contained in any of the above relations, make it into a relation. The universal key is the key of the new relation.
A  Fully  Worked Example ,[object Object]
EMPLOYEE  ______________________________________________________________________________________________________________ NAME  E_NUMBER DEPARTMENT  LOCATION CURRENT TITLE  PRIOR_TITLES   SKILLS_ ______________________________________________________________________________________________________________ Adams 1001 Finance  9th Floor Senior consultant  Junior consultant  Stock market  Research analyst  Investments  ______________________________________________________________________________________________________________ PROJECTS ______________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER   MANAGER ACTUAL_COST EXPECTED_COST  ______________________________________________________________________________________________________________ Resolve bad debts  35 26713 Kanter   2000   1500 ______________________________________________________________________________________________________________ We say that this table is in “zero normal form” ( 0NF ) This is because the cells have multiple values, eg. Prior titles and Skills. The next slide shows forms that demonstrate that an employee can work on many projects. Personnel Database Forms  1
EMPLOYEE  __________________________________________________________________________________________________________ NAME  E_NUMBER DEPARTMENT  LOCATION CURRENT TITLE  PRIOR_TITLES  SKILLS __________________________________________________________________________________________________________ Baker  1002 Finance 9th Floor Senior consultant  Junior consultant  Stock market  Research analyst  _________________________________________________________________________________________________________________ _____ PROJECTS __________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER   MANAGER _NUM  ACTUAL_COST EXPECTED_COST  __________________________________________________________________________________________________________ Res bad debts  18 26713   Kanter   2000   1500 __________________________________________________________________________________________________________ ________________________________________________________________________________________________________________ EMPLOYEE  _________________________________________________________________________________________________________ NAME  E_NUMBER DEPARTMENT  LOCATION CURRENT TITLE  PRIOR_TITLES  SKILLS _________________________________________________________________________________________________________ Clarke 1003 Accounting  8th Floor Senior consultant  Junior consultant  Stock market  Investments  _________________________________________________________________________________________________________ PROJECTS _________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER   MANAGER _NUM ACTUAL_COST EXPECTED_COST  _________________________________________________________________________________________________________ New billing system  26 23760 Yates    1000   10000 New office lease  10 26511 Yates    5000   5000 ___________________________________________________________________________________________________________________________ Personnel Database Forms  2
[object Object],EXPECTED_COST  Personnel Database FD   Diagram  LOCATION ACTUAL_COST MANAGER _NUM PROJECT_NAME P_NUMBER CURRENT_TITLE E_NUMBER EMPLOYEE_NAME PRIOR_TITLE SKILL DEPARTMENT_NAME From the forms given we can produce the following FDD
EXPECTED_COST  Personnel Database FD Diagram -Synthesis  ACTUAL_COST MANAGER _NUM PROJECT_NAME P_NUMBER Let us just consider the section of the FDD that looks at the project number as the determinant By using the synthesis method we can choose an arrow, trace it back to the source, and gather together all of the attributes that the source points to. Try this and see if you can create the schema for this table.
LOCATION DEPARTMENT_NAME Personnel Database FD Diagram - Synthesis  So the table   DEPT ( DEPARTMENT_NAME , LOCATION)   is created Again, if we choose another arrow that has not been chosen before and follow it back to the determinant we find DEPARTMENT_NAME is a determinant. Gathering all of the attributes that it points to we only have the location attribute. Hence this is a simple table consisting of DEPARTMENT_NAME as the Primary key and LOCATION as the only other attribute.
Personnel Database FD Diagram - Synthesis  CURRENT_TITLE E_NUMBER EMPLOYEE_NAME DEPARTMENT_NAME EMPLOYEE  (EMPLOYEE_NAME,  E_NUMBER,  DEPARTMENT, CURRENT TITLE ) Likewise for the section of the FDD based around the E_NUMBER, creating the following table for the Employees details.
[object Object],P_NUMBER E_NUMBER Personnel Database FD Diagram - Synthesis  Try to create the Assignment table for this part of the FDD.When you think you have it have a look at ours and see if you are right. Here we have a slightly more complicated one. The Time spent on the project is dependent on both the Project number and the Employee name, as it is the time spent by a particular employee on a particular project. This is demonstrated by the boxing of both the above attributes together pointing to the TIME_SPENT
[object Object],P_NUMBER E_NUMBER Personnel Database FD Diagram - Synthesis  ASSIGNMENT  ( E_NUMBER, P_NUMBER,  TIME_SPENT) The main difference here is that when choosing the arrow to follow back to the determinant we find that we have 2. This is OK, we just have to make sure that in the table both of them are the primary Key. We have a Composite Primary Key consisting P_NUMBER and E_NUMBER. When we then gather up all of the attributes that they point to together we get TIME_SPENT. Hence the table is written as See the composite primary key
P_NUMBER E_NUMBER PRIOR_TITLE SKILL UK  ( E_NUMBER, P_NUMBER, PRIOR_TITLE,  SKILL) Personnel Database FD Diagram - Universal Key  Now, the last part of the synthesis is often forgotten. We must collect up all of the attributes that do not have arrows pointing into them and place them in the one table called the Universal Key. Every attribute collected then becomes part of the composite Primary Key. In this case we have the following attributes inside the box below. Notice how Skill is there, as it sits by itself. Nothing is its determinant.
Foreign Keys ,[object Object],[object Object],[object Object],TIME_SPENT LOCATION P_NUMBER E_NUMBER DEPARTMENT_NAME ASSIGNMENT  ( E_NUMBER, P_NUMBER,  TIME_SPENT) EMPLOYEE  ( E_NUMBER,  DEPARTMENT_NAME) DEPT ( DEPARTMENT_NAME , LOCATION) A. B.
ISA = Is A ,[object Object],[object Object],In the case of the manager we say that the manager number is  contained within the employee number MANAGER_NUM E_NUMBER ISA EMPLOYEE PROJECT  MANAGER _NUM
[object Object],EMPLOYEE  (NAME,  E_NUMBER,  DEPARTMENT, CURRENT TITLE ) PROJECT  (NAME, P_NUMBER,  MANAGER _ NUM, ACTUAL_COST, EXPECTED_COST ) Personnel Database Schema Generated by Synthesis  DEPT ( DEPARTMENT , LOCATION) UK   ( E_NUMBER, P_NUMBER, PRIOR_TITLE,  SKILL) This foreign key is a result of  MANAGER ISA E_NUMBER
[object Object],EMPLOYEE PROJECT  UK Personnel Database Network Diagram Generated by Synthesis  E_NUMBER + P_NUMBER P_NUMBER E_NUMBER DEPT DEPARTMENT_NAME MANAGER_NUM
A Fully Worked Example We now have to take care of the multi-valued areas such as skills and prior titles. Our FDD synthesis takes care of everything up to that. It converts the FDD to what we call “Third normal Form”. We know that an individual can have many skills and many Prior Titles. They can also work on many Projects.  Knowing the Employee number will not tell us one and only one value of the Skills that they have. We show this on the extended FDD with a double arrow notation.The notation for such a relationship is shown here where E_NUMBER is a determinant for many values of skill. Consequently the resulting representation shown on the next slide can be constructed, giving rise to the splitting of the UK to form three more relations E_NUMBER SKILL
E_NUMBER PRIOR_TITLE SKILL MVDs PRIOR_JOB  ( E_NUMBER, PRIOR_TITLE ) EXPERTISE  ( E_NUMBER,  SKILL) Personnel Database Multivalued Dependency-Decomposition P_NUMBER, ASSIGN  ( E_NUMBER, P_NUMBER) MultiValued   Dependency Employees are associated with Projects, Titles and Skills independently. There is no direct relationship between Projects, Titles and Skills. Hence we have the three new relations ASSIGN, PRIOR_JOB and EXPERTISE
[object Object],EXPECTED_COST  Personnel Database FD Diagram with MVDs and Inclusion  LOCATION ACTUAL_COST MANAGER _NUM PROJECT_NAME P_NUMBER CURRENT_TITLE E_NUMBER EMPLOYEE_NAME PRIOR_TITLE SKILL ISA MVD DEPARTMENT_NAME MVD
[object Object],[object Object],[object Object],EMPLOYEE  (NAME,  E_NUMBER,  DEPARTMENT, CURRENT TITLE ) PROJECT  (NAME, P_NUMBER,  MANAGER, ACTUAL_COST, EXPECTED_COST ) Final  Personnel Database Schema DEPT ( DEPARTMENT , LOCATION) Decomposed from  UK
[object Object],EMPLOYEE PROJECT  PRIOR_JOB EXPERTISE Final  Personnel Database Network Diagram E_NUMBER P_NUMBER E_NUMBER E_NUMBER DEPT DEPARTMENT_NAME MANAGER _NUM
EXPECTED_COST  Personnel Database FD Diagram - Synthesis  ACTUAL_COST MANAGER PROJECT_NAME P_NUMBER PROJECT  (PROJECT_NAME, P_NUMBER,  MANAGER, ACTUAL_COST, EXPECTED_COST ) Choosing any of the arrows and following it back leads you to the project number ( P_Number ). This is then the  Primary Key . If you then gather all of the attributes that P_Number points to and place them in the brackets you get the table  Project with P_Number as the primary Key .
Role Splitting In Functional Dependency Diagrams ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],E_NUMBER DEPARTMENT_NAME DEPARTMENT_NAME E_NUMBER
Role Splitting In Functional Dependency Diagrams ,[object Object],[object Object],E_NUMBER DEPARTMENT_NAME HOD ISA EMPLOYEE DEPT FDD NetworkD DEPARTMENT_NAME HOD Synthesis
Role Splitting In FDD s ,[object Object],[object Object],E_NUMBER EMPLOYING_DEPT HEADED_DEPT ISA EMPLOYEE DEPT FDD NetworkD EMPLOYING_DEPT E_NUMBER Synthesis
Role Splitting Example Consider this example. We have the Employee with many Skills, Prior Titles, as before but we also have equipment that belongs to a particular employee, such as a computer and  a fax. An employee can have many different pieces of equipment. It is worthwhile recognizing them on the diagram and then decomposing them into smaller relations as part of the schema
LOCATION CURRENT_TITLE E_NUMBER EMPLOYEE_NAME PRIOR_TITLE SKILL DEPARTMENT_NAME SERIAL# DESCRIPTION UK ,[object Object],[object Object],[object Object],HOD ISA MVDs Suppose each item of equipment (identified by SERIAL#) belongs to an employee.
[object Object]

Mais conteúdo relacionado

Mais procurados

ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams SimplifiedPuneet Arora
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3Jeanie Arnoco
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manualendokayle
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagramBadrul Alam
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4Jeanie Arnoco
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Database Management System
Database Management System Database Management System
Database Management System FellowBuddy.com
 
Basic database analysis(database)
Basic database analysis(database)Basic database analysis(database)
Basic database analysis(database)welcometofacebook
 
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Vidyasagar Mundroy
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revisedguest6f408c
 

Mais procurados (20)

ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3
 
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution ManualData Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
Data Modeling and Database Design 2nd Edition by Umanath Scamell Solution Manual
 
L8 design1
L8 design1L8 design1
L8 design1
 
dbms
dbmsdbms
dbms
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
Schema relationship to E-R diagram
Schema relationship to E-R diagramSchema relationship to E-R diagram
Schema relationship to E-R diagram
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Database Management System
Database Management System Database Management System
Database Management System
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
Basic database analysis(database)
Basic database analysis(database)Basic database analysis(database)
Basic database analysis(database)
 
Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)Database Systems - Entity Relationship Modeling (Chapter 4/2)
Database Systems - Entity Relationship Modeling (Chapter 4/2)
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
Chapter2
Chapter2Chapter2
Chapter2
 
03 Ch3 Notes Revised
03 Ch3 Notes Revised03 Ch3 Notes Revised
03 Ch3 Notes Revised
 
Chapter3
Chapter3Chapter3
Chapter3
 
E r model
E r modelE r model
E r model
 
E r diagram
E r diagramE r diagram
E r diagram
 

Semelhante a DATABASE DESIGN FDD

Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009Cathie101
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developerAhsan Kabir
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal waghharshalkwagh999
 
Preparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001dPreparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001dGihan Wikramanayake
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQueryAbhishek590097
 
Ibps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudIbps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudaffairs cloud
 
Ibps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudIbps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudaffairs cloud
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Vidyasagar Mundroy
 
Sql Commands
Sql CommandsSql Commands
Sql CommandsSachin MK
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answersLakshmiSarvani6
 
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQL
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQLSql notes, sql server,sql queries,introduction of SQL, Beginner in SQL
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQLPrashant Kumar
 
27 f157al5enhanced er diagram
27 f157al5enhanced er diagram27 f157al5enhanced er diagram
27 f157al5enhanced er diagramdddgh
 
Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke LonerganLuke Lonergan
 
Relational Database design.pptx
Relational Database design.pptxRelational Database design.pptx
Relational Database design.pptxjohndoe193402
 

Semelhante a DATABASE DESIGN FDD (20)

Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
 
Sql Server 2000
Sql Server 2000Sql Server 2000
Sql Server 2000
 
Steps towards of sql server developer
Steps towards of sql server developerSteps towards of sql server developer
Steps towards of sql server developer
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Preparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001dPreparing for BIT – IT2301 Database Management Systems 2001d
Preparing for BIT – IT2301 Database Management Systems 2001d
 
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQueryPPT  of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
PPT of Common Table Expression (CTE), Window Functions, JOINS, SubQuery
 
Ibps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudIbps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloud
 
Ibps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloudIbps it officer exam capsule by affairs cloud
Ibps it officer exam capsule by affairs cloud
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
Sql Commands
Sql CommandsSql Commands
Sql Commands
 
Dbms important questions and answers
Dbms important questions and answersDbms important questions and answers
Dbms important questions and answers
 
Sql 2006
Sql 2006Sql 2006
Sql 2006
 
Chapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptxChapter 3 ( PART 2 ).pptx
Chapter 3 ( PART 2 ).pptx
 
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQL
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQLSql notes, sql server,sql queries,introduction of SQL, Beginner in SQL
Sql notes, sql server,sql queries,introduction of SQL, Beginner in SQL
 
enhanced er diagram
enhanced er diagramenhanced er diagram
enhanced er diagram
 
27 f157al5enhanced er diagram
27 f157al5enhanced er diagram27 f157al5enhanced er diagram
27 f157al5enhanced er diagram
 
Database Introduction by Luke Lonergan
Database Introduction by Luke LonerganDatabase Introduction by Luke Lonergan
Database Introduction by Luke Lonergan
 
Relational Database design.pptx
Relational Database design.pptxRelational Database design.pptx
Relational Database design.pptx
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
Topics-Ch4Ch5.ppt
Topics-Ch4Ch5.pptTopics-Ch4Ch5.ppt
Topics-Ch4Ch5.ppt
 

Mais de Cathie101

Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010Cathie101
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Cathie101
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Cathie101
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Cathie101
 
Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0Cathie101
 
Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0Cathie101
 
Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0Cathie101
 
Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Cathie101
 
Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0Cathie101
 
Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Cathie101
 
Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database FddCathie101
 
Sql All Tuts 2009
Sql All Tuts 2009Sql All Tuts 2009
Sql All Tuts 2009Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database FddCathie101
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009Cathie101
 
Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009Cathie101
 
All Database Design Tuts V1.3
All Database Design Tuts V1.3All Database Design Tuts V1.3
All Database Design Tuts V1.3Cathie101
 

Mais de Cathie101 (20)

Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010
 
Css 2010
Css 2010Css 2010
Css 2010
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
 
Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0
 
Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0
 
Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0
 
Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0
 
Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0
 
Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0Dynamic Web Pages Ch 2 V1.0
Dynamic Web Pages Ch 2 V1.0
 
Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
 
Sql All Tuts 2009
Sql All Tuts 2009Sql All Tuts 2009
Sql All Tuts 2009
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
 
Database Er
Database ErDatabase Er
Database Er
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
 
Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009
 
All Database Design Tuts V1.3
All Database Design Tuts V1.3All Database Design Tuts V1.3
All Database Design Tuts V1.3
 

Último

Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Delhi Call girls
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaShree Krishna Exports
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfOnline Income Engine
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdftbatkhuu1
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Dipal Arora
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒anilsa9823
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...amitlee9823
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 

Último (20)

Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
Best VIP Call Girls Noida Sector 40 Call Me: 8448380779
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Best Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in IndiaBest Basmati Rice Manufacturers in India
Best Basmati Rice Manufacturers in India
 
Unlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdfUnlocking the Secrets of Affiliate Marketing.pdf
Unlocking the Secrets of Affiliate Marketing.pdf
 
Event mailer assignment progress report .pdf
Event mailer assignment progress report .pdfEvent mailer assignment progress report .pdf
Event mailer assignment progress report .pdf
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
Call Girls Navi Mumbai Just Call 9907093804 Top Class Call Girl Service Avail...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒VIP Call Girls In Saharaganj ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment (COD) 👒
VIP Call Girls In Saharaganj ( Lucknow ) 🔝 8923113531 🔝 Cash Payment (COD) 👒
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 

DATABASE DESIGN FDD

  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Terminology:Key Constraint An attribute (or set of attributes) to which a key constraint applies is called a key ( or candidate key). Every relation schema must have a key. If a key constraint applies to a set of attributes, it is called a composite or Concatenated Key. Otherwise it is a simple key. Key Simple Key Composite Key: EMPLOYEE Another possible key. The combination of Job and manager is also unique Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director Bozo 50,000 Lulu Clerk Jill 30,000
  • 13. Terminology:Key Constraint A key cannot have a NULL ( ) value. For example, If we change the table so that the Employee Bozo does not have a manager then Job+Manager cannot be a key. Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
  • 14.
  • 15. A D atabase is more than multiple tables you must be able to “relate” them The link is through the Agent-Code Cus-code Cus-Name Area-Code Phone Agent-Code 10010 Ramus 615 844-2573 502 10011 Dunne 713 894-1238 501 10012 Smith 615 894-2205 502 10013 Olowaski 615 894-2180 502 10014 Orlando 615 222-1672 501 10015 O’Brian 713 442-3381 503 10016 Brown 615 297-1226 502 10017 Williams 615 290-2556 503 10018 Farris 713 382-7185 501 10019 Smith 615 297-3809 503 Agent-Code Agent-Name Agent-AreaCode Agent-Phone 501 Alby 713 226-1249 502 Hahn 615 882-1244 503 Okon 615 123-5589
  • 16. Terminology: Relational Database A Relational Database is just a set of Relations. For example Which Attribute do you think relates these two tables together? JOB EMPLOYEE Job Salary Secretary 25,000 Secretary 25,000 Executive 40,000 Director 50,000 Clerk 30,000 Employee Job Manager Salary Jack Secretary Bozo 25,000 Kim Secretary Jill 25,000 Jill Executive Bozo 40,000 Bozo Director 50,000 Lulu Clerk Jill 30,000
  • 17. Terminology:Relational Database Schema A Relational Database Schema a set of Relation Schemas , together with a set of Integrity Constraints . For example the Relations that you have been looking at with the headings EMPLOYEE JOB are usually written as EMPLOYEE( Employee , Job, Manager) JOB( Job , Salary) Notice how the Primary Keys are underlined Employee Job Manager Salary Job Salary
  • 18. Terminology :Referential Integrity Constraint This constraint says that – All the values in one column should also appear in another column. Look at the table below. Every entry in the Job column of the Employee table must appear in the Job column of the Job table EMPLOYEE JOB FK PK FK PK Employee Job Manager Jack Secretary Bozo Kim Secretary Jill Jill Executive Bozo Bozo Director Lulu Clerk Jill Job Salary Secretary 25,000 Secretary 25,000 Executive 40,000 Director 50,000 Clerk 30,000
  • 19. Referential Integrity Constraint Why does the following relational database violate the referential integrity constraints? In other words, Why can’t Employee(Job) be a Foreign Key to Job(Job), or Employee(Manager) be a Foreign Key to Employee(Employee)? Click here for the answers EMPLOYEE JOB FK FK PK PK Job Salary Director 50,000 Clerk 30,000 Employee Job Manager Jack Secretary Bozo Kim Secretary Jill Bozo Director Lulu Clerk Jill
  • 20.
  • 21. Example of Data Redundancy (1)
  • 22.
  • 23. Example of Data Redundancy (3)
  • 24.
  • 25.
  • 26.
  • 28. Terminology: Network Diagram EMPLOYEE( Employee , Job, Manager) JOB( Job , Salary) A relational database schema with referential integrity constraints can also be represented by a network diagram. A Referential Integrity Constraint is notated as an arrow labeled by the foreign key. You must always write the label of the Foreign Key on the arrow. Sometimes the same attribute has different titles in different tables. EMPLOYEE JOB Job Manager Network Diagram Referential Integrity constraints can easily be represented by arrows FK PK. The arrow points from the Foreign Key to the matching Primary Key Notice here, the label is Manager and not Employee.
  • 29. Personnel Database: Consider the following Tables PROJECT NAME P_NUMBER MANAGER ACTUAL_COST EXPECTED_COST New billing system 23760 Yates 1000 10000 Common stock issue 28765 Baker 3000 4000 Resolve bad debts 26713 Kanter 2000 1500 New office lease 26511 Yates 5000 5000 Revise documentation 34054 Kanter 100 3000 Entertain new client 87108 Yates 5000 2000 New TV commercial 85005 Baker 10000 8000 ASSIGNMENT SKILL E_NUMBER P_NUMBER AREA 1001 26713 Stock Market 1002 26713 Taxation 1003 23760 Investments 1003 26511 Management 1004 26511 1004 28765 1005 23760 EMPLOYEE TITLE NAME E_NUMBER DEPARTMENT E_NUMBER CURRENT _ TITLE Kanter 1111 Finance 1001 Senior consultant Yates 1112 Accounting 1002 Senior consultant Adams 1001 Finance 1003 Senior consultant Baker 1002 Finance 1004 Junior consultant Clarke 1003 Accounting 1005 Junior consultant Dexter 1004 Finance Early 1005 Accounting PRIOR_JOB EXPERTISE E_NUMBER PRIOR_TITLE E_NUMBER SKILL 1001 Junior consultant 1001 Stock market 1001 Research analyst 1001 Investments 1002 Junior consultant 1002 Stock market 1002 Research analyst 1003 Stock market 1003 Junior consultant 1003 Investments 1004 Summer intern 1004 Taxation 1005 Management
  • 30.
  • 31. TITLE PROJECT PRIOR_JOB EMPLOYEE SKILL EXPERTISE Personnel Database Network Diagram ASSIGNMENT Once you have produced your Schema and identified the Primary and Foreign Keys you can create the Network Diagram.The Network Diagram shows each of the tables with their links. Each of the Tables (Relations) are represented in a rectangle as shown. They are then connected by arrows that show the FKs pointing to the PKs, The arrow head points towards the PK, while the FK name written is the same as the attribute of the table that has the FK in it.
  • 32. Personnel Database Network Diagram TITLE PROJECT PRIOR_JOB EMPLOYEE SKILL EXPERTISE skill e_number p_number e_number e_number e_number manager ASSIGNMENT
  • 33.
  • 34.
  • 35.
  • 36. Answer Supplies Supplier Part Uses Product
  • 37.
  • 38.
  • 39. Answer Orders OrLine Part Customer SalesRep SlsNumber CustNumb orLine Part
  • 40.
  • 41.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48. Functional Dependency Diagrams Now we have the Database Design 2NF Relation 3NF Relation Universal Relation 1NF Tables ONF Using the Method of Decomposition Method of Synthesis Sample Data Eliminate Part Key Dependencies Eliminate Non Key Dependencies Eliminate Repeating Groups Attribute & Functional Dependencies Given the Problem Functional Dependency Diagram OR, here is the same process using the FDD approach
  • 49.
  • 50.
  • 51.
  • 52. Data Element Examples Surname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . On a form gives rise to the element CREDIT CARD Bankcard Mastercard Visa Other CreditCardType Surname Here are some examples of finding the Data Elements on a typical form On a form gives rise to the element
  • 53. Functional Dependency Examples Students and their family names “ Each student (identified by student number) has only one family name” Considering the rules stated above we should be able to draw a FDD for this. What are the elements of interest? Students FamilyName 1 Smith 2 Jones 3 Smith 4 Andrews
  • 54. FDDs Answer Students determine FamilyName (or FamilyName depends on Students) Each student has exactly one family name, but the name could be the name of many students. So FamilyName does not determine Student# e.g. “Smith is the name of students 1 and 3 Students FamilyName Data elements of interest are Student# and FamilyName. Students FamilyName 1 Smith 2 Jones 3 Smith 4 Andrews
  • 55. FDDs Examples Employees and the departments they work for. In this example the tables are representing some interesting data of the business. We see that Employees with the ID numbers 11,2 and 31 all work in the Accounting Dept and that Employees with the ID numbers 45 and 27 work in the Sales Dept. Do you think that you could draw an FDD to represent this? Have a go and then check your answers Enterprise Rule: “Each employee works on only one department” Department Name Accounting Employee Number 11 2 31 Department Name Sales Employee Number 45 27
  • 56. FDD Answers Employees and the departments they work for. Data elements of interest are Employee# and DeptName” Employee# DeptName So we could make this following Table Department Name Accounting Employee Number 11 2 31 Department Name Sales Employee Number 45 27 Employee# DeptName 11 Acc 2 Acc 45 Sales 31 Acc 27 Acc
  • 57. FDDs Examples The quantity of parts held in a warehouse and their suppliers Part# determines SupplierName & Part# determines QOH “ Parts are uniquely identified by part numbers” “ Suppliers are uniquely identified by Supplier Names” “ A part is supplied by only one supplier” “ A part is held in only one quantity” Parts SupplierName Parts QOH Should QOH be a determinant? No, common sense tells us that is not a reliable choice. We could have had repeating values Parts Suppliers Name QOH 1 Wang Electronics 23 2 Cumberland Enterprises 80 3 Wang Electronics 4 4 Roscoe Pty. Ltd 58
  • 58. FDDs Examples Students and their subjects enrolled. “ Each student is given a unique student number” “ A subject is uniquely identified by its name” “ A student may choose several subjects” Data element of interest are Student# and SubjectName Student SubjectName There us no functional dependency here. Student# does not determine SubjectName, nor does SubjectName determine Student# Student SubjectName 1 History 1 Geography 1 Mathematics 1 History 2 English 2 English 3 Mathematics 3 English 4 French 4 Geography
  • 59. FDDs Examples Results obtained by each student for each subject. “ Each student is given a unique student number” “ A subject is uniquely identified by its name” “ A student may choose several subjects” “ A student is allocated a result for each subject” “ Each student has only one name.” Data elements are Student#, StudentName, SubjectName and Grade
  • 60. FDDs Examples Results obtained by each student for each subject. Try and construct an FDD for this table considering the given Business Rules and the Data Elements Student Student Name Subject Name Grade 1 Smith History A 1 Smith Geography B 1 Smith Mathematics A 2 Jones History C 2 Jones English C 3 Smith English A 3 Smith Mathematics A 4 Andrews English D 4 Andrews French C 4 Andrews Geography C
  • 61. FDDs Examples Results obtained by each student for each subject. Student # StudentName We can see that there is only one and only one student name for each student number, even though there might be more than one student with the same name. So…. But the subject grade for any student cannot be determined by the subject name or the student# by itself. A student can have many grades depending on the subject. How can we cater for this?
  • 62. FDDs Answer Results obtained by each student for each subject. Student SubjectName Grade StudentName This is called the Composite Determinant We need to combine the two Elements to say that there is one and only one grade for a student doing a particular subject. Here then is the complete diagram
  • 63. FDDs Examples Customer Orders Validating functional dependencies Using simple data and populating the table, check there is only one value of the dependent. Order Part# CustomerName Address 454 12 David Smith 1 John St, Hawthorn 454 23 David Smith 1 John St, Hawthorn 455 32 Emily Jones 45 Grattan St, Parkville 455 49 Emily Jones 45 Grattan St, Parkville 455 54 Emily Jones 45 Grattan St, Parkville 456 12 Mary Ho 44 Park St, Hawthorn 456 54 Mary Ho 44 Park St, Hawthorn
  • 64. FDDs Examples “ Orders is uniquely identified by its names” “ Customers are uniquely identified by their names” “ A customer has only one address” “ An order belongs to only one customer” “ A part may be ordered only once one each order” Order CustomerName Address Part# Order Parts Ordered CustomerName Address 454 23, 12 David Smith 1 John St, Hawthorn 455 54, 49, 32 Emily Jones 45 Grattan St, Parkville 456 54, 12 Mary Ho 44 Park St, Hawthorn
  • 65. FDDs Examples Employees and their tax files numbers “ Each employee has a unique employee number” “ Each employee has a unique tax file number ” Employee# determines taxfile# Taxfile# determines Employee# Alternative keys Employee TaxFile# 1 1024-5321 2 3456-3294 3 8246-7106 4 8861-6750 5 1234-4765 Employee# Taxfile# Employee# Taxfile# Taxfile# Employee#
  • 66.
  • 67. Functional Dependency Diagrams Database Design Let’s look at the process of converting the FDD into a schema. We have a 12 step process to do so, that has an iterative component to it (loop). The 12 steps are outlined in the next series of slides.
  • 68. Functional Dependency Diagram Preparation 1. Represent each data element as a box. 2. Represent each functional dependency by an arrow. 3. Eliminate augmented dependencies. 4. Eliminate transitive dependencies. 5. Eliminate pseudo-transitive dependencies.   By this stage, intersecting attributes should have been eliminated.
  • 69. Deriving 3NF Schema: Synthesis Algorithm 6. Pick any (unmarked) arrow in the diagram. 7. Follow it back to its source, and write down the name of the source. S 8 . Follow all arrows from the source data item, and write down the names of their destinations . S, A, B, C S is now the key of a 3NF relation ( S , A, B, C). S S A B C
  • 70. Synthesis Algorithm : Deriving 3NF Schema 9. Mark all the arrows just processed. 10. If there are any unmarked arrows in the diagram, go back to step 6. 11. Finally, determine the Universal Key. Any attribute which is not determined by any other attribute (ie. has no arrow going into it) is part of the Universal Key. 12. If the universal key is not already contained in any of the above relations, make it into a relation. The universal key is the key of the new relation.
  • 71.
  • 72. EMPLOYEE ______________________________________________________________________________________________________________ NAME E_NUMBER DEPARTMENT LOCATION CURRENT TITLE PRIOR_TITLES SKILLS_ ______________________________________________________________________________________________________________ Adams 1001 Finance 9th Floor Senior consultant Junior consultant Stock market Research analyst Investments ______________________________________________________________________________________________________________ PROJECTS ______________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER MANAGER ACTUAL_COST EXPECTED_COST ______________________________________________________________________________________________________________ Resolve bad debts 35 26713 Kanter 2000 1500 ______________________________________________________________________________________________________________ We say that this table is in “zero normal form” ( 0NF ) This is because the cells have multiple values, eg. Prior titles and Skills. The next slide shows forms that demonstrate that an employee can work on many projects. Personnel Database Forms 1
  • 73. EMPLOYEE __________________________________________________________________________________________________________ NAME E_NUMBER DEPARTMENT LOCATION CURRENT TITLE PRIOR_TITLES SKILLS __________________________________________________________________________________________________________ Baker 1002 Finance 9th Floor Senior consultant Junior consultant Stock market Research analyst _________________________________________________________________________________________________________________ _____ PROJECTS __________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER MANAGER _NUM ACTUAL_COST EXPECTED_COST __________________________________________________________________________________________________________ Res bad debts 18 26713 Kanter 2000 1500 __________________________________________________________________________________________________________ ________________________________________________________________________________________________________________ EMPLOYEE _________________________________________________________________________________________________________ NAME E_NUMBER DEPARTMENT LOCATION CURRENT TITLE PRIOR_TITLES SKILLS _________________________________________________________________________________________________________ Clarke 1003 Accounting 8th Floor Senior consultant Junior consultant Stock market Investments _________________________________________________________________________________________________________ PROJECTS _________________________________________________________________________________________________________ NAME TIME_SPENT P_NUMBER MANAGER _NUM ACTUAL_COST EXPECTED_COST _________________________________________________________________________________________________________ New billing system 26 23760 Yates 1000 10000 New office lease 10 26511 Yates 5000 5000 ___________________________________________________________________________________________________________________________ Personnel Database Forms 2
  • 74.
  • 75. EXPECTED_COST Personnel Database FD Diagram -Synthesis ACTUAL_COST MANAGER _NUM PROJECT_NAME P_NUMBER Let us just consider the section of the FDD that looks at the project number as the determinant By using the synthesis method we can choose an arrow, trace it back to the source, and gather together all of the attributes that the source points to. Try this and see if you can create the schema for this table.
  • 76. LOCATION DEPARTMENT_NAME Personnel Database FD Diagram - Synthesis So the table DEPT ( DEPARTMENT_NAME , LOCATION) is created Again, if we choose another arrow that has not been chosen before and follow it back to the determinant we find DEPARTMENT_NAME is a determinant. Gathering all of the attributes that it points to we only have the location attribute. Hence this is a simple table consisting of DEPARTMENT_NAME as the Primary key and LOCATION as the only other attribute.
  • 77. Personnel Database FD Diagram - Synthesis CURRENT_TITLE E_NUMBER EMPLOYEE_NAME DEPARTMENT_NAME EMPLOYEE (EMPLOYEE_NAME, E_NUMBER, DEPARTMENT, CURRENT TITLE ) Likewise for the section of the FDD based around the E_NUMBER, creating the following table for the Employees details.
  • 78.
  • 79.
  • 80. P_NUMBER E_NUMBER PRIOR_TITLE SKILL UK ( E_NUMBER, P_NUMBER, PRIOR_TITLE, SKILL) Personnel Database FD Diagram - Universal Key Now, the last part of the synthesis is often forgotten. We must collect up all of the attributes that do not have arrows pointing into them and place them in the one table called the Universal Key. Every attribute collected then becomes part of the composite Primary Key. In this case we have the following attributes inside the box below. Notice how Skill is there, as it sits by itself. Nothing is its determinant.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85. A Fully Worked Example We now have to take care of the multi-valued areas such as skills and prior titles. Our FDD synthesis takes care of everything up to that. It converts the FDD to what we call “Third normal Form”. We know that an individual can have many skills and many Prior Titles. They can also work on many Projects. Knowing the Employee number will not tell us one and only one value of the Skills that they have. We show this on the extended FDD with a double arrow notation.The notation for such a relationship is shown here where E_NUMBER is a determinant for many values of skill. Consequently the resulting representation shown on the next slide can be constructed, giving rise to the splitting of the UK to form three more relations E_NUMBER SKILL
  • 86. E_NUMBER PRIOR_TITLE SKILL MVDs PRIOR_JOB ( E_NUMBER, PRIOR_TITLE ) EXPERTISE ( E_NUMBER, SKILL) Personnel Database Multivalued Dependency-Decomposition P_NUMBER, ASSIGN ( E_NUMBER, P_NUMBER) MultiValued Dependency Employees are associated with Projects, Titles and Skills independently. There is no direct relationship between Projects, Titles and Skills. Hence we have the three new relations ASSIGN, PRIOR_JOB and EXPERTISE
  • 87.
  • 88.
  • 89.
  • 90. EXPECTED_COST Personnel Database FD Diagram - Synthesis ACTUAL_COST MANAGER PROJECT_NAME P_NUMBER PROJECT (PROJECT_NAME, P_NUMBER, MANAGER, ACTUAL_COST, EXPECTED_COST ) Choosing any of the arrows and following it back leads you to the project number ( P_Number ). This is then the Primary Key . If you then gather all of the attributes that P_Number points to and place them in the brackets you get the table Project with P_Number as the primary Key .
  • 91.
  • 92.
  • 93.
  • 94. Role Splitting Example Consider this example. We have the Employee with many Skills, Prior Titles, as before but we also have equipment that belongs to a particular employee, such as a computer and a fax. An employee can have many different pieces of equipment. It is worthwhile recognizing them on the diagram and then decomposing them into smaller relations as part of the schema
  • 95.
  • 96.

Notas do Editor

  1. Database Design 2006 version 1.2
  2. Database Design 2006 version 1.2
  3. Database Design 2006 version 1.2
  4. Database Design 2006 version 1.2
  5. Database Design 2006 version 1.2
  6. Database Design 2006 version 1.2
  7. Database Design 2006 version 1.2
  8. Database Design 2006 version 1.2
  9. Database Design 2006 version 1.2
  10. Database Design 2006 version 1.2
  11. Database Design 2006 version 1.2