Lecture5 Functional Dependencies and Normalization for Relational Databases
|
|
- Ella Bailey
- 6 years ago
- Views:
Transcription
1 College of Computer and Information Sciences - Information Systems Dept. Lecture5 Functional Dependencies and Normalization for Relational Databases Ref. Chapter14-15 Prepared by L. Nouf Almujally & Aisha AlArfaj Last Example added by : L.Kholoud Baselm 1 IS220: Database Fundamentals
2 How to produce a good relation schema? Top-down approach Such as ER modeling ER model is mapped to a set of relations Set of well-designed relations Bottom-up approach Use normalization to create set of relations 2
3 Bottom-up approach STEPS: 1. Start with a set of relations. 2. Define the functional dependencies for the relation to specify the PK. 3. Transform relations to normal form. 3
4 Functional Dependencies Describes the relationship between attributes in a relation. If A and B are attributes of relation R, B is functionally dependent on A, denoted by A B, if each value of A is associated with exactly one value of B. B may have several values of A. A Determinant B is functionally dependent on A B Dependent 4
5 Functional Dependencies X Y X -> Y holds if whenever two tuples have the same value for X, they must have the same value for Y For any two tuples t and u in any relation instance r(r): If t[x]=u[x], then t[y]=u[y] If t & u agree here Then they must agree here X Y t 5 u
6 Functional Dependencies Example 1:1 or M:1 relationship between attributes in a relation StaffNo SL21 Position is functionally dependent on Staffno position Manager 1:M relationship between attributes in a relation position Manager StaffNo is NOT functionally dependent on position StaffNo SL21 SG5 6
7 Examples of FD constraints Social security number determines employee name SSN -> ENAME Project number determines project name and location PNUMBER -> {PNAME, PLOCATION} Employee ssn and project number determines the hours per week that the employee works on the project {SSN, PNUMBER} -> HOURS 7
8 Identifying the PK Purpose of functional dependency, specify the set of integrity constraints that must hold on a relation. The determinant attribute(s) are candidate of the relation, if: 1:1 relationship between determinant & dependent. All attributes that are not part of the CK should be functionally dependent on the key: CK all attributes of R Hold for all time. Primary Key (PK) is the candidate attribute(s) with the minimal set of functional dependency. 8
9 Identifying the PK If a relation schema has more than one key, each is called a candidate key. One of the candidate keys is arbitrarily designated to be the primary key, and the others are called Alternate keys. A Prime attribute must be a member of some candidate key A Nonprime attribute is not a prime attribute that is, it is not a member of any candidate key. 9
10 The Purpose of Normalization Normalization is a bottom-up approach to database design that begins by examining the relationships between attributes. It is performed as a series of tests on a relation to determine whether it satisfies or violates the requirements of a given normal form. Purpose: - Guarantees no redundancy due to FDs - Guarantees no update anomalies Normal Forms: First Normal Form (1NF) Second Normal Form (2NF) Third Normal Form (3NF) 10 Boyce-Codd Normal Form (BCNF)
11 Normal Forms Defined Informally 1 st normal form All attributes depend on the key 2 nd normal form All attributes depend on the whole key 3 rd normal form All attributes depend on nothing but the key 11
12 First Normal Form (1NF) 12
13 First Normal Form (1NF) Unnormalized form (UNF): A relation that contains one or more repeating groups. First normal form (1NF): A relation in which the intersection of each row and column contains one & only one value. 1NF Disallows: multivalued attribute nested relations; attributes whose values for an individual tuple are non-atomic (repeating group) 13
14 First Normal Form (1NF) Multivalued CLIENT_PROPERTY ClientNo Name PropertyNo CR76 CR56 John Key Aline Stewart PG4 PG16 PG4 PG36 PG16 Unnormalized form (UNF) Not in the 1NF because there are Multivalued attribute in the table (PropertyNo) 14
15 UNF 1NF Divide the relation to two relations: Relation 1 : Contains all the attributes except the multivalued attribute. Relation 2 : Contains the primary key of the first relation and the multivalued attribute Primary key becomes the combination of primary key and multivalued attribute. 15
16 UNF 1NF CLIENT_PROPERTY ClientNo Name PropertyNo CR76 John Key CR56 Aline Stewart PG4 PG16 PG4 PG36 PG16 Unnormalized form (UNF) CLIENT ClientNo Name CR76 John Key CR56 Aline Stewart CLIENT_PROPERTY ClientNo PropertyNo CR76 CR76 CR56 CR56 CR56 PG4 PG16 PG4 PG36 PG NF relations
17 UNF (multivalued) 1NF Multivalued Unnormalized form (UNF) 17 1NF relations
18 UNF (nested relations) Nested relation 1NF Unnormalized form (UNF) First normal form also disallows multivalued attributes that are themselves composite. These are called nested relations because each tuple can have a relation within it. 18
19 UNF (nested relations) Nested relation 1NF Unnormalized form (UNF) EMPLOYEE 1NF relations EMP_PROJECT Ssn Pnumber Hours
20 UNF (nested relations) 1NF Nested relation DPT_NO MG_NO EMP_NO EMP_NM D D Carl Sagan Mag James Larry Bird Jim Carter Paul Simon Unnormalized form (UNF) DPT_NO Dept MG_NO Dept_Emp DPT_NO EMP_NO EMP_NM D D Carl Sagan D NF relations D Mag James D Larry Bird D Jim Carter D Paul Simon Lecture5 20
21 Summary : first normal form (1NF) We say a relation is in 1NF if: all values stored in the relation are single-valued and atomic. There are no Multivalued Attributes. There are no repeating groups or nested relations in the table. 21
22 Second Normal Form (2NF) 22
23 Second Normal Form (2NF) Prime attribute: An attribute that is member of the primary key K Full functional dependency: when an non-prime attribute is determined by the whole of a COMPOSITE primary key. CUSTOMER Full Functional Dependency Cust_ID Name Order_ID 101 AT&T AT&T Cisco
24 Second Normal Form (2NF) Partial Dependency when an non-key attribute is determined by a part, but not the whole, of a COMPOSITE primary key. CUSTOMER Partial Dependency Cust_ID Name Order_ID 101 AT&T AT&T Cisco
25 Summary: Second Normal Form (2NF) A relation R is in 2NF if 1. R is 1NF, and 2. All non-prime attributes are fully dependent on the primary key. 3. no partial dependency in 2NF. 25
26 Second Normal Form (2NF) To transfer the relation to 2NF: 1) Remove partial dependencies by placing the functionally dependent attributes in a new relation along with a copy of their determinants. 26
27 Example1: 1NF 2NF Partial Dependencies Remove partial dependencies by placing the functionally dependent attributes in a new relation along with a copy of their determinants. 27
28 Example2: Second normal form -2NF Inventory Product_ID Supplier_ID Cost Supplier Address There are two non-key fields. So, here are the questions: If I know just Product_ID, can I find out Cost? No, because we have more than one supplier for the same product. If I know just Supplier_ID, and I find out Cost? No, because I need to know what the product is as well. Therefore, Cost is fully, functionally dependent upon the whole PK (Product_ID, Supplier_ID). 28
29 Example 2: Second normal form -2NF Inventory Product_ID Supplier_ID Cost Supplier Address If I know just Product_ID, can I find out Supplier Address? No, because we have more than one supplier for the same product. If I know just Supplier_ID, and I find out Supplier Address? Yes. The Address does not depend upon the product. Therefore, Supplier Address is NOT functionally dependent upon the whole PK (Product_ID, Supplier_ID). 29
30 Example 2: Second normal form -2NF Inventory Product_ID Supplier_ID Cost supplier Supplier_ID Supplier Address The above relations are now in 2NF 30
31 Third Normal Form (3NF) 31
32 Third Normal Form (3NF) Transitive functional dependency X, Y, Z are attributes of a relation, such that: If X Y and Y Z, then Z is transitively dependent on X via Y. Transitive Dependency EMPLOYEE Emp_ID F_Name L_Name Dept_ID Dept_Name 111 Mary Jones 1 Acct 122 Sarah Smith 2 Mktg 32
33 Third Normal Form (3NF) Examples: SSN -> DMGRSSN is a transitive FD Since SSN -> DNUMBER and DNUMBER -> DMGRSSN SSN -> ENAME is non-transitive Since there is no set of attributes X where SSN -> X and X -> ENAME 33
34 Third Normal Form (2) A relation schema R is in third normal form (3NF) if : 1. R in 2NF and 2. There is NO Transitive Dependency : when a non-key attribute determines another non-key attribute. 34
35 Third Normal Form (2) NOTE: In X -> Y and Y -> Z, with X as the primary key, we consider this a problem only if Y is not a candidate key. When Y is a candidate key, there is no problem with the transitive dependency. E.g., Consider EMP (SSN, Emp#, Salary ). Here, SSN -> Emp# -> Salary and Emp# is a candidate key. 35
36 Third Normal Form (3NF) To transfer the relation to 3NF: 1) Meet all the requirements of the 1NF 2) Meet all the requirements of the 2NF 3) Place transitive dependent attributes in a new relation along with a copy of their determinants. 36
37 Example: 2NF 3NF 2NF Transitive Dependencies 3NF 3NF If transitive dependencies exist, place transitively dependent attributes in a new relation along with a copy of their determinants. 37
38 Example : Third normal form -3NF Books Book_ID Author's Name Author's Address # of Pages If I know # of Pages, can I find out Author's Name? No. Can I find out Author's Address? No. If I know Author's Name, can I find out # of Pages? No. Can I find out Author's Address? YES. Therefore, Author's Address is transitively dependent upon Author's Name, not the PK for its existence. Books Authors Book_ID Author's Name # of Pages Author's Name Author's Address 38
39 39
40 Important Notes To normalize a relation (table) : Make sure you follow the correct order (1NF, 2NF, 3NF) o Unnormalized There are multivalued attributes or repeating groups o 1 st NF: no multivalued attribute/repeated groups. o 2 nd NF: 1 st NF + no partial dependency. o 3 rd NF: 2 nd NF +no transitive dependency. For each NF, write full justification why or why not the table in the NF Give full and correct reason (spelling is important) You should give your new relations (tables) names. Make sure you specify the primary key for new tables. 40
41 EXTRA EXAMPLES 41
42 Example 1: Determine NF ISBN Title ISBN Publisher Publisher Address BOOK No multivalued attributes ; therefore, the relation is at least in 1 NF ISBN Title Publisher Address 42
43 Example 1: Determine NF ISBN Title ISBN Publisher Publisher Address BOOK There is no COMPOSITE primary key, therefore there can t be partial dependencies. Therefore, the relation is at least in 2NF ISBN Title Publisher Address 43
44 Example 1: Determine NF ISBN Title ISBN Publisher Publisher Address BOOK Publisher is a non-prime attribute, and it determines Address, another non-prime attribute. Therefore, there is a transitive dependency, which means that the relation is NOT in 3 NF. ISBN Title Publisher Address 44
45 Example 1: Determine NF ISBN Title ISBN Publisher Publisher Address We know that the relation is at least in 2NF, and it is not in 3 NF. Therefore, we conclude that the relation is in 2NF. BOOK ISBN Title Publisher Address 45
46 Example 1: Determine NF ISBN Title ISBN Publisher Publisher Address BOOK In your solution you will write the following justification: 1) No M/V attributes, therefore at least 1NF 2) No partial dependencies, therefore at least 2NF 3) There is a transitive dependency (Publisher Address), therefore, not 3NF Conclusion: The relation is in 2NF ISBN Title Publisher Address 46
47 Example 1: Determine NF To convert it to 3NF : place transitive dependent attributes in a new relation along with a copy of their determinants. BOOK - Now in the 3NF ISBN Title Publisher Publisher Publisher Address 47
48 Example 2: Determine NF Product_ID Description ORDER No multivalued attributes; therefore, the relation is at least in 1 NF Order_No Product_ID Description 48
49 Example 2: Determine NF Product_ID Description The relation is at least in 1NF. There is a COMPOSITE Primary Key (PK) (Order_No, Product_ID), therefore there can be partial dependencies. Product_ID, which is a part of PK, determines Description; hence, there is a partial dependency. Therefore, the relation is not 2NF. ORDER Order_No Product_ID Description 49
50 Example 2: Determine NF Product_ID Description ORDER We know that the relation is at least in 1NF, and it is not in 2 NF. Therefore, we conclude that the relation is in 1 NF. Order_No Product_ID Description 50
51 Example 2: Determine NF Product_ID Description ORDER In your solution you will write the following justification: 1) No M/V attributes, therefore at least 1NF 2) There is a partial dependency (Product_ID Description), therefore not in 2NF Conclusion: The relation is in 1NF Order_No Product_ID Description 51
52 Example 2: Determine NF Remove partial dependencies by placing the functionally dependent attributes in a new relation along with a copy of their determinants. - Now in the 2NF - No Transitive therefore in the 3NF ORDER Order_No Product Product_ID Product_ID Description 52
53 Example 3: Determine NF EmpNum EmpPhone EmpDegrees BA BA, BSc, PhD BSc, MSc IS Emp_info in the 1NF? 2NF? 3NF? Explain why? 53
54 Determine 1 NF? There are Multivalued attributes; therefore, not in 1NF EmpNum EmpPhone Emp_phone (1NF) EmpNum EmpDegrees 123 BA 333 BA 333 BSc 333 PhD 679 BSc 679 MSc Emp_Degree (1NF) 54
55 Determine 2NF? There is no partial dependency, therefore in 2NF EmpNum EmpPhone Emp_phone (2NF) EmpNum EmpDegrees 123 BA 333 BA 333 BSc 333 PhD 679 BSc 679 MSc Emp_Degree (2NF) 55
56 Determine 3NF? There is no transitive dependency, therefore in 3NF EmpNum EmpPhone Emp_phone (3NF) EmpNum EmpDegrees 123 BA 333 BA 333 BSc 333 PhD 679 BSc 679 MSc Emp_Degree (3NF) 56
57 References Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 5 th Edition, Addison-Wesley,
58 Normalization Example UNF 58
59 Normalization Example FD s 59
60 1NF? UNF NO.. The relation is not in 1NF because it contain a repeating group. The structure of the repeating group is: Repeating group=(propertyno,paddress,rentstart,rentfinish,rent,ownerno,oname) We remove the repeating group by placing the repeating data along with a copy of the PK in a separate relation. 60
61 1NF? 1NF 61
62 2NF 62
63 2NF 63
64 64
65 The resulting 3NF relations have the form: 65
66 66
Chapter 14 Outline. Normalization for Relational Databases: Outline. Chapter 14: Basics of Functional Dependencies and
Ramez Elmasri, Shamkant B. Navathe(2016) Fundamentals of Database Systems (7th Edition), pearson, isbn 10: 0-13-397077-9;isbn-13:978-0-13-397077-7. Chapter 14: Basics of Functional Dependencies and Normalization
More informationChapter 10. Chapter Outline. Chapter Outline. Functional Dependencies and Normalization for Relational Databases
Chapter 10 Functional Dependencies and Normalization for Relational Databases Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More informationSteps in normalisation. Steps in normalisation 7/15/2014
Introduction to normalisation Normalisation Normalisation = a formal process for deciding which attributes should be grouped together in a relation Normalisation is the process of decomposing relations
More informationChapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)
Chapter 10 Normalization Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant Information in Tuples and Update Anomalies 1.3 Null
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
CHAPTER 14 Basics of Functional Dependencies and Normalization for Relational Databases Slide 14-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1 Semantics of the Relation Attributes
More informationElmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 10-2 Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant
More informationFunctional Dependencies and Normalization for Relational Databases Design & Analysis of Database Systems
Functional Dependencies and Normalization for Relational Databases 406.426 Design & Analysis of Database Systems Jonghun Park jonghun@snu.ac.kr Dept. of Industrial Engineering Seoul National University
More informationCMP-3440 Database Systems
CMP-3440 Database Systems Logical Design Lecture 03 zain 1 Database Design Process Application 1 Conceptual requirements Application 1 External Model Application 2 Application 3 Application 4 External
More informationInformal Design Guidelines for Relational Databases
Outline Informal Design Guidelines for Relational Databases Semantics of the Relation Attributes Redundant Information in Tuples and Update Anomalies Null Values in Tuples Spurious Tuples Functional Dependencies
More informationFunctional Dependencies and. Databases. 1 Informal Design Guidelines for Relational Databases. 4 General Normal Form Definitions (For Multiple Keys)
1 / 13 1 Informal Design Guidelines for Relational Databases 1.1Semantics of the Relation Attributes 1.2 Redundant d Information in Tuples and Update Anomalies 1.3 Null Values in Tuples 1.4 Spurious Tuples
More informationChapter 14. Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies
Chapter 14 Database Design Theory: Introduction to Normalization Using Functional and Multivalued Dependencies Copyright 2012 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines
More informationFunctional Dependencies & Normalization for Relational DBs. Truong Tuan Anh CSE-HCMUT
Functional Dependencies & Normalization for Relational DBs Truong Tuan Anh CSE-HCMUT 1 2 Contents 1 Introduction 2 Functional dependencies (FDs) 3 Normalization 4 Relational database schema design algorithms
More informationRelational Database design. Slides By: Shree Jaswal
Relational Database design Slides By: Shree Jaswal Topics: Design guidelines for relational schema, Functional Dependencies, Definition of Normal Forms- 1NF, 2NF, 3NF, BCNF, Converting Relational Schema
More informationUNIT 3 DATABASE DESIGN
UNIT 3 DATABASE DESIGN Objective To study design guidelines for relational databases. To know about Functional dependencies. To have an understanding on First, Second, Third Normal forms To study about
More informationLecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3
College of Computer and Information Sciences - Information Systems Dept. Lecture4: Guidelines for good relational design Mapping ERD to Relation. Ref. Chapter3 Prepared by L. Nouf Almujally & Aisha AlArfaj
More informationThe strategy for achieving a good design is to decompose a badly designed relation appropriately.
The strategy for achieving a good design is to decompose a badly designed relation appropriately. Functional Dependencies The single most important concept in relational schema design theory is that of
More informationFUNCTIONAL DEPENDENCIES CHAPTER , 15.5 (6/E) CHAPTER , 10.5 (5/E)
FUNCTIONAL DEPENDENCIES CHAPTER 15.1-15.2, 15.5 (6/E) CHAPTER 10.1-10.2, 10.5 (5/E) 4 LECTURE OUTLINE Design guidelines for relation schemas Functional dependencies Definition and interpretation Formal
More informationNormalization Normalization
Normalization Normalization We discuss four normal forms: first, second, third, and Boyce-Codd normal forms 1NF, 2NF, 3NF, and BCNF Normalization is a process that improves a database design by generating
More informationIS 263 Database Concepts
IS 263 Database Concepts Lecture 4: Normalization Instructor: Henry Kalisti 1 Department of Computer Science and Engineering Limitations of E- R Designs Provides a set of guidelines, does not result in
More informationDr. Anis Koubaa. Advanced Databases SE487. Prince Sultan University
Advanced Databases Prince Sultan University College of Computer and Information Sciences Fall 2013 Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Anis Koubaa SE487
More informationMODULE: 3 FUNCTIONAL DEPENDENCIES
MODULE: 3 (13 hours) Database design: functional dependencies - Inference Rules for Functional Dependencies - Closure -- Minimal Cover -Normal forms First-second and third normal forms Boyce- Codd normal
More informationFunctional Dependencies and Normal Forms
Functional Dependencies and Normal Forms Lecture 9 Sections 15.1-15.4 Robb T. Koether Hampden-Sydney College Mon, Feb 4, 2013 Robb T. Koether (Hampden-Sydney College) Functional Dependencies and Normal
More informationNormalization. { Ronak Panchal }
Normalization { Ronak Panchal } Chapter Objectives The purpose of normailization Data redundancy and Update Anomalies Functional Dependencies The Process of Normalization First Normal Form (1NF) Second
More informationLecture3: Data Modeling Using the Entity-Relationship Model.
College of Computer and Information Sciences - Information Systems Dept. Lecture3: Data Modeling Using the Entity-Relationship Model. Ref. Chapter12 Prepared by L. Nouf Almujally & Aisha AlArfaj Rev. by
More informationWe shall represent a relation as a table with columns and rows. Each column of the table has a name, or attribute. Each row is called a tuple.
Logical Database design Earlier we saw how to convert an unorganized text description of information requirements into a conceptual design, by the use of ER diagrams. The advantage of ER diagrams is that
More informationDatabase Systems. Normalization Lecture# 7
Database Systems Normalization Lecture# 7 Lecture 7: Normalization Normalization (Brief Overview) Functional Dependencies and Keys 1 st Normal Form 2 nd Normal Form 3 rd Normal Form Class Activity 3 Normalization
More informationDatabase Principles: Fundamentals of Design, Implementation, and Management Tenth Edition. Chapter 9 Normalizing Database Designs
Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 9 Normalizing Database Designs NORMALIZATION What is normalization? Normalization is a procedure that is
More informationFunctional Dependencies and Normal Forms
Functional Dependencies and Normal Forms Lecture 9 Sections 15.1-15.4 Robb T. Koether Hampden-Sydney College Mon, Feb 3, 2014 Robb T. Koether (Hampden-Sydney College) Functional Dependencies and Normal
More informationTDDD12 Databasteknik Föreläsning 4: Normalisering
What is Good Design TDDD12 Databasteknik Föreläsning 4: Normalisering Can we be sure that the translation from the EER diagram to relational tables results in a good database design? Or: Confronted with
More informationDatabase Design Theory and Normalization. CS 377: Database Systems
Database Design Theory and Normalization CS 377: Database Systems Recap: What Has Been Covered Lectures 1-2: Database Overview & Concepts Lecture 4: Representational Model (Relational Model) & Mapping
More informationLecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2
IS220 : Database Fundamentals College of Computer and Information Sciences - Information Systems Dept. Lecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2 Ref. Chapter6 Prepared by L.
More informationACS-2914 Normalization March 2009 NORMALIZATION 2. Ron McFadyen 1. Normalization 3. De-normalization 3
NORMALIZATION 2 Normalization 3 De-normalization 3 Functional Dependencies 4 Generating functional dependency maps from database design maps 5 Anomalies 8 Partial Functional Dependencies 10 Transitive
More informationNormalization (1) IT 5101 Introduction to Database Systems. J.G. Zheng Fall 2011
Normalization (1) IT 5101 Introduction to Database Systems J.G. Zheng Fall 2011 Overview What is normalization? What are the normal forms? How to normalize relations? 2 Two Basic Ways To Design Tables
More informationChapter 3. The Relational database design
Chapter 3 The Relational database design Chapter 3 - Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations and relations in the relational
More informationNormalization. Murali Mani. What and Why Normalization? To remove potential redundancy in design
1 Normalization What and Why Normalization? To remove potential redundancy in design Redundancy causes several anomalies: insert, delete and update Normalization uses concept of dependencies Functional
More informationNormalisation. Connolly, Ch. 13
Normalisation Connolly, Ch. 13 1 Overview Normalisation Steps 1NF Removing repeating groups 2NF Partial dependencies Removing partial dependencies 3NF Transitive dependencies Removing transitive dependencies
More informationIn Chapters 3 through 6, we presented various aspects
15 chapter Basics of Functional Dependencies and Normalization for Relational Databases In Chapters 3 through 6, we presented various aspects of the relational model and the languages associated with it.
More informationMapping ER Diagrams to. Relations (Cont d) Mapping ER Diagrams to. Exercise. Relations. Mapping ER Diagrams to Relations (Cont d) Exercise
CSC 74 Database Management Systems Topic #6: Database Design Weak Entity Type E Create a relation R Include all simple attributes and simple components of composite attributes. Include the primary key
More informationDistributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science
Distributed Database Systems By Syed Bakhtawar Shah Abid Lecturer in Computer Science 1 Distributed Database Systems Basic concepts and Definitions Data Collection of facts and figures concerning an object
More informationLectures 12: Design Theory I. 1. Normal forms & functional dependencies 2/19/2018. Today s Lecture. What you will learn about in this section
Today s Lecture Lectures 12: Design Theory I Professor Xiannong Meng Spring 2018 Lecture and activity contents are based on what Prof Chris Ré used in his CS 145 in the fall 2016 term with permission 1.
More informationNormalization and Functional Dependencies. CS6302 Database management systems T.R.Lekhaa, AP/IT
Normalization and Functional Dependencies Normalization Normalization There are fournormal forms: first, second, third, and Boyce-Codd normal forms 1NF, 2NF, 3NF, and BCNF Normalization is a process that
More informationCS 338 Functional Dependencies
CS 338 Functional Dependencies Bojana Bislimovska Winter 2016 Outline Design Guidelines for Relation Schemas Functional Dependency Set and Attribute Closure Schema Decomposition Boyce-Codd Normal Form
More informationRelational Design: Characteristics of Well-designed DB
1. Minimal duplication Relational Design: Characteristics of Well-designed DB Consider table newfaculty (Result of F aculty T each Course) Id Lname Off Bldg Phone Salary Numb Dept Lvl MaxSz 20000 Cotts
More informationSVY227: Databases for GIS
SVY227: Databases for GIS Lecture 6: Relational Database Normalisation 2. Dr Stuart Barr School of Civil Engineering & Geosciences University of Newcastle upon Tyne. Email: S.L.Barr@ncl.ac.uk Lecture 6:
More informationDatabase Systems: Design, Implementation, and Management Tenth Edition. Chapter 6 Normalization of Database Tables
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 6 Normalization of Database Tables Objectives In this chapter, students will learn: What normalization is and what role it
More informationGuideline 1: Semantic of the relation attributes Do not mix attributes from distinct real world. example
Design guidelines for relational schema Semantic of the relation attributes Do not mix attributes from distinct real world Design a relation schema so that it is easy to explain its meaning. Do not combine
More informationInstitute of Southern Punjab, Multan
Institute of Southern Punjab, Multan Mr. Muhammad Nouman Farooq BSC-H (Computer Science) MS (Telecomm. and Networks) Honors: Magna Cumm Laude Honors Degree Gold Medalist! Blog Url: noumanfarooqatisp.wordpress.com
More informationNormalisation. Normalisation. Normalisation
Normalisation Normalisation Main objective in developing a logical data model for relational database systems is to create an accurate and efficient representation of the data, its relationships, and constraints
More informationDBMS Chapter Three IS304. Database Normalization-Comp.
Database Normalization-Comp. Contents 4. Boyce Codd Normal Form (BCNF) 5. Fourth Normal Form (4NF) 6. Fifth Normal Form (5NF) 7. Sixth Normal Form (6NF) 1 4. Boyce Codd Normal Form (BCNF) In the first
More informationEdited by: Nada Alhirabi. Normalization
Edited by: Nada Alhirabi Normalization Normalization:Why do we need to normalize? 1. To avoid redundancy (less storage space needed, and data is consistent) Ssn c-id Grade Name Address 123 cs331 A smith
More informationRelational Design 1 / 34
Relational Design 1 / 34 Relational Design Basic design approaches. What makes a good design better than a bad design? How do we tell we have a "good" design? How to we go about creating a good design?
More informationMore Relational Algebra
More Relational Algebra LECTURE 6 Dr. Philipp Leitner philipp.leitner@chalmers.se @xleitix LECTURE 6 Covers Parts of Chapter 8 Parts of Chapter 14 (high-level!) Please read this up until next lecture!
More informationNormalization is based on the concept of functional dependency. A functional dependency is a type of relationship between attributes.
Lecture Handout Database Management System Lecture No. 19 Reading Material Database Systems Principles, Design and Implementation written by Catherine Ricardo, Maxwell Macmillan. Section 7.1 7.7 Database
More informationLecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2
Lecture7: SQL Overview, Oracle Data Type, DDL and Constraints Part #2 Ref. Chapter6 Prepared by L. Nouf Almujally & Aisha AlArfaj& L.Fatima Alhayan Colleg Comp Informa Scien Informa Syst D 1 IS220 : Database
More informationCS317 File and Database Systems
CS317 File and Database Systems http://dilbert.com/strips/comic/2010-08-24/ Lecture 8 Introduction to Normalization October 17, 2017 Sam Siewert Exam #1 Questions? Reminders Working on Grading Ex #3 -
More informationPES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II
PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore 560100 ) Solution Set - Test-II Sub: Database Management Systems 16MCA23 Date: 04/04/2017 Sem & Section:II Duration:
More informationDatabase Tables and Normalization
Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 9 Normalizing Database Designs (NORMALIZATION) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my
More informationRedundancy:Dependencies between attributes within a relation cause redundancy.
Normalization Normalization: It is the process of removing redundant data from your tables in order to improve storage efficiency, data integrity and scalability. This improvement is balanced against an
More informationCSE 544 Principles of Database Management Systems. Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization
CSE 544 Principles of Database Management Systems Magdalena Balazinska Fall 2009 Lecture 3 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to this
More informationLecture 11 - Chapter 8 Relational Database Design Part 1
CMSC 461, Database Management Systems Spring 2018 Lecture 11 - Chapter 8 Relational Database Design Part 1 These slides are based on Database System Concepts 6th edition book and are a modified version
More informationCS 2451 Database Systems: Database and Schema Design
CS 2451 Database Systems: Database and Schema Design http://www.seas.gwu.edu/~bhagiweb/cs2541 Spring 2018 Instructor: Dr. Bhagi Narahari Relational Model: Definitions Review Relations/tables, Attributes/Columns,
More informationDatabases 1. Daniel POP
Databases 1 Daniel POP Week 6 & 7 Agenda Introduction to normalization Functional dependencies 1NF 2NF 3NF. Transitive dependencies BCNF 4NF. Multivalued dependencies 5NF De-normalization Normalization
More informationDC62 DATABASE MANAGEMENT SYSTEMS DEC 2013
Q.2 (a) What are the different types of database end users? Discuss the main activities of each. End users are the people whose jobs require access to the database for querying, updating, and generating
More informationInsertions, Deletions, and Updates
Insertions, Deletions, and Updates Lecture 5 Robb T. Koether Hampden-Sydney College Wed, Jan 24, 2018 Robb T. Koether (Hampden-Sydney College) Insertions, Deletions, and Updates Wed, Jan 24, 2018 1 / 17
More informationLecture11: Transaction Control Language Data Control Language
IS220 : Database Fundamentals Lecture11: Transaction Control Language Data Control Language College Compu a Informati Science Informati Syste De Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Transaction
More informationNORMAL FORMS. CS121: Relational Databases Fall 2017 Lecture 18
NORMAL FORMS CS121: Relational Databases Fall 2017 Lecture 18 Equivalent Schemas 2 Many different schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation
More informationChapter 14. Chapter 14 - Objectives. Purpose of Normalization. Purpose of Normalization
Chapter 14 - Objectives Chapter 14 Normalization The purpose of normalization. How normalization can be used when designing a relational database. The potential problems associated with redundant data
More informationBIRKBECK (University of London)
BIRKBECK (University of London) BSc Examination for Internal Students School of Computer Science and Information Systems Database Management COIY028U - Course Unit Value: 1/2 May 2006 : Afternoon 14.30
More informationUnit IV. S_id S_Name S_Address Subject_opted
Page no: 1 Unit IV Normalization of Database Database Normalizations is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data
More informationDATABASE DESIGN I - 1DL300
DATABASE DESIGN I - 1DL300 Autumn 2012 An Introductory Course on Database Systems http://www.it.uu.se/edu/course/homepage/dbastekn/ht12/ Uppsala Database Laboratory Department of Information Technology,
More informationQUESTION BANK. SUBJECT CODE / Name: CS2255 DATABASE MANAGEMENT SYSTEM UNIT III. PART -A (2 Marks)
QUESTION BANK DEPARTMENT: CSE SEMESTER: IV SUBJECT CODE / Name: CS2255 DATABASE MANAGEMENT SYSTEM UNIT III PART -A (2 Marks) 1. Explain the two conditions needed for the set difference operation (union
More informationNormalization in DBMS
Unit 4: Normalization 4.1. Need of Normalization (Consequences of Bad Design-Insert, Update & Delete Anomalies) 4.2. Normalization 4.2.1. First Normal Form 4.2.2. Second Normal Form 4.2.3. Third Normal
More informationLogical Database Design Normalization
Chapter Four Logical Database Design Normalization Objectives Recalling Relational concepts Understand different anomalies and functional dependency concepts Use normalization to convert anomalous tables
More informationCS430 Final March 14, 2005
Name: W#: CS430 Final March 14, 2005 Write your answers in the space provided. Use the back of the page if you need more space. Values of questions are as indicated. 1. (4 points) What are the four ACID
More informationCSE 544 Principles of Database Management Systems. Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization
CSE 544 Principles of Database Management Systems Magdalena Balazinska Winter 2009 Lecture 4 - Schema Normalization References R&G Book. Chapter 19: Schema refinement and normal forms Also relevant to
More informationRELATIONAL DATA MODEL
RELATIONAL DATA MODEL 3.1 Introduction The relational model of data was introduced by Codd (1970). It is based on a simple and uniform data structure - the relation - and has a solid theoretical and mathematical
More informationCOSC Dr. Ramon Lawrence. Emp Relation
COSC 304 Introduction to Database Systems Normalization Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Normalization Normalization is a technique for producing relations
More informationDatabase Technologies. Madalina CROITORU IUT Montpellier
Database Technologies Madalina CROITORU croitoru@lirmm.fr IUT Montpellier Part 5 NORMAL FORMS AND NORMALISATION Database design In the database design one can follow a bottom up approach or a top down
More informationTranslation of ER-diagram into Relational Schema. Dr. Sunnie S. Chung CIS430/530
Translation of ER-diagram into Relational Schema Dr. Sunnie S. Chung CIS430/530 Learning Objectives Define each of the following database terms Relation Primary key Foreign key Referential integrity Field
More informationThe Relational Data Model
The Relational Data Model Lecture 6 1 Outline Relational Data Model Functional Dependencies Logical Schema Design Reading Chapter 8 2 1 The Relational Data Model Data Modeling Relational Schema Physical
More informationFunctional Dependencies and Normalization
Functional Dependencies and Normalization Jose M. Peña jose.m.pena@liu.se Overview Real world Databases DBMS Model Physical database Queries Processing of queries and updates Access to stored data Answers
More informationFunctional dependency theory
Functional dependency theory Introduction to Database Design 2012, Lecture 8 Course evaluation Recalling normal forms Functional dependency theory Computing closures of attribute sets BCNF decomposition
More informationCOSC344 Database Theory and Applications. σ a= c (P) S. Lecture 4 Relational algebra. π A, P X Q. COSC344 Lecture 4 1
COSC344 Database Theory and Applications σ a= c (P) S π A, C (H) P P X Q Lecture 4 Relational algebra COSC344 Lecture 4 1 Overview Last Lecture Relational Model This Lecture ER to Relational mapping Relational
More informationDetailed Data Modelling: Attribute Collection and Normalisation of Data
Detailed Data Modelling IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling: Attribute Collection and Normalisation of Data The objective of detailed data modelling is to develop a detailed
More informationCarnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications. Overview - detailed. Goal. Faloutsos & Pavlo CMU SCS /615
Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed
More informationDetailed Data Modelling. Detailed Data Modelling. Detailed Data Modelling. Identifying Attributes. Attributes
IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling The objective of detailed data modelling is to develop a detailed data structure that: Detailed Data Modelling: Attribute Collection
More informationNormalization in Databases
Normalization in Databases What is Normalization? Unnormalized data exists in flat files Normalization is the process of moving data into related tables This is usually done by running action queries (Make
More informationCMU SCS CMU SCS CMU SCS CMU SCS whole nothing but
Faloutsos & Pavlo 15-415/615 Carnegie Mellon Univ. Dept. of Computer Science 15-415/615 - DB Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed
More informationNOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE
Exams, Awards & Graduations NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE EXAM COVER SHEET EXAMINATION DETAILS Course Code/s: ISYS1055/1057 Course Name/s: Database Concepts Date of Exam: Sample
More informationRelational Design Theory
OpenStax-CNX module: m28252 1 Relational Design Theory Nguyen Kim Anh This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 3.0 Abstract One important theory
More informationNormal Forms. Winter Lecture 19
Normal Forms Winter 2006-2007 Lecture 19 Equivalent Schemas Many schemas can represent a set of data Which one is best? What does best even mean? Main goals: Representation must be complete Data should
More informationFIT1004 Database Topic 6: Normalisation
FIT1004 Database Topic 6: Normalisation Learning Objectives: Understand the purpose of normalisation Understand the problems associated with redundant data Identify various types of update anomalies such
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Relational Databases: Tuples, Tables, Schemas, Relational Algebra Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) Overview
More informationDatabase Management System
Database Management System Lecture 4 Database Design Normalization and View * Some materials adapted from R. Ramakrishnan, J. Gehrke and Shawn Bowers Today s Agenda Normalization View Database Management
More informationSchema Refinement: Dependencies and Normal Forms
Schema Refinement: Dependencies and Normal Forms M. Tamer Özsu David R. Cheriton School of Computer Science University of Waterloo CS 348 Introduction to Database Management Fall 2012 CS 348 Schema Refinement
More informationCS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam
CS403- Database Management Systems Solved Objective Midterm Papers For Preparation of Midterm Exam Question No: 1 ( Marks: 1 ) - Please choose one Which of the following is NOT a feature of Context DFD?
More informationLecture 15: Database Normalization
Lecture 15: Database Normalization Dr Kieran T. Herley Department of Computer Science University College Cork 2018/19 KH (12/11/18) Lecture 15: Database Normalization 2018/19 1 / 18 Summary The perils
More informationCS411 Database Systems. 05: Relational Schema Design Ch , except and
CS411 Database Systems 05: Relational Schema Design Ch. 3.1-3.5, except 3.4.2-3.4.3 and 3.5.3. 1 How does this fit in? ER Diagrams: Data Definition Translation to Relational Schema: Data Definition Relational
More informationRelational Model. CS 377: Database Systems
Relational Model CS 377: Database Systems ER Model: Recap Recap: Conceptual Models A high-level description of the database Sufficiently precise that technical people can understand it But, not so precise
More informationCS317 File and Database Systems
CS317 File and Database Systems Lecture 3 Relational Calculus and Algebra Part-2 September 10, 2017 Sam Siewert RDBMS Fundamental Theory http://dilbert.com/strips/comic/2008-05-07/ Relational Algebra and
More information