Topic 5.1: Database Tables and Normalization
|
|
|
- Erica Patience Cook
- 10 years ago
- Views:
Transcription
1 Topic 5.1: Database Tables and Normalization What is Normalization? Normalization is a process for evaluating and correcting table structures to minimize data redundancies, thereby helping to eliminate data anomalies. It helps us evaluate table structures and produce good tables. What are the stages of Normalization? Normalization Works through a series of stages called normal forms: o Normal form (1NF) o Second normal form (2NF) o Third normal form (3NF) o Boyce-Codd Normal Form (BCNF) o Forth Normal (4NF) o Fifth Normal (5NF) o Domain-key normal form (DKNF) From a structural point of view, 2NF is better than 1NF, and 3NF is better than 2NF. For most business database design purposes, 3NF is as high as we need to go in the normalization process. And some very specialized applications may require normalization beyond 4NF. Although normalization is a very important database design ingredient, you should not assume that the highest level of normalization is always the most desirable. Generally, the higher the normal form, the more joins are required to produce a specified output and the more slowly the database system responds to end-user demands. A successful design must also consider end-user demand for fast performance. Therefore, you will occasionally be expected to denormalize some portions of a database design in order to meet performance requirements. (Denormalization produces a lower normal form) The Need for Normalization To illustrate the normalization process, we will examine a simple business application. In this case we will explore the simplified database activities of a construction company that manages several building projects. Each project has its own project number, name, employees assigned to it and so on. Each employee has an employee number, name, and job classification such as engineer or computer technician.
2 The company charges its clients by billing the hours spent on each contract. The hourly billing rate is dependent on the employee s position. Periodically, a report is generated that contains the information displayed in Table 5.1. The Total Charge in Table 5.1 is a derived attribute and, at this point is not stored in this table. The easiest short-term to generate the required report might seem to be a table whose contents correspond to the reporting requirements. (See Figure 5.1.)
3 The structure of the data set in Figure 5.1 does not handle data very well for the following reasons: 1. The project number (PROJ_NUM) is apparently intended to be a primary key, but it contains nulls. 2. The table entries invite data inconsistencies. For example, the JOB_CLASS value Elect.Engineer might be entered as Elect.Eng. in some cases, El. Eng or EE in others. 3. The table displays data redundancies. These data redundancies yield the following anomalies: a. Update anomalies. Modifying the JOB_CLASS for employee number 105 requires (potentially many alterations, one for each EMP_NUM =105) b. Insertion anomalies. Just to complete a row definition, a new employee must be assigned to a project. If the employee is not yet assigned, a phantom project must be created to complete the employee data entry. c. Deletion anomalies. If employee 103 quits, deletions must be made for every entry in which EMP_NUM =103. Such deletions will result in loosing other vital data of project assignments from the database.
4 In spite of these structural deficiencies, the table structure appears to work; the report is generated with ease. Unfortunately, the report may yield different results, depending on what data anomaly has occurred Conversion to First Normal Form Figure 5.1 contains what is known as repeating groups. A repeating group derives its name from the fact that a group of multiple (related) entries can exist for any single key attribute occurrence. A relational table must not contain repeating groups. The existence of repeating groups provides evidence that the RPT_FORMAT table in Figure 5.1 fails to meet even the lowest normal form requirements, thus reflecting data redundancies. Normalizing the table structure will reduce these data redundancies. If repeating groups do exist, they must be eliminated by making sure that each row defines a single entity. In addition, the dependencies must be identified to diagnose the normal form. The normalization process starts with a simple three-step procedure. Step 1: Eliminate the Repeating Groups Start by presenting the data in a tabular format, where each cell has a single value and there are no repeating groups. To eliminate the repeating groups, eliminate the nulls by making sure that each repeating group attribute contains an appropriate data value. This change converts the RPT_FORMAT table in Figure 5.1 to the DATA_ORG_1NF table in Figure 5.2.
5 Step 2: Identify the Primary Key The layout in Figure 5.2 represents much more than a mere cosmetic change. Even a casual observer will note that PROJ_NUM is not an adequate primary key because the project number does not uniquely identify all the remaining entity (row) attributes. For example, the PROJ_NUM value 15 can identify any one of five employees. To maintain a proper primary key that will uniquely identify any attribute value, the new key must be composed of a combination of PROJ_NUM and EMP_NUM. Step 3: Identify all Dependencies Dependencies can be depicted with the help of a diagram as shown in Figure 5.3. Because such a diagram depicts all the dependencies found within a given table structure, it is known as a dependency diagram. Dependency diagrams are very helpful in getting a bird s-eye view of all the relationships among a table s attributes, and their use makes it much less likely that you might overlook an important dependency.
6 Notice the following dependency diagram features from Figure 5.3: 1. The primary key attributes are bold, underlined, and shaded in a different color. 2. The arrows above the attributes indicate all desirable dependencies, that is, dependencies that are based on the primary key. In this case, note that the entity s attributes are dependent on the combination of PROJ_NUM and EMP_NUM. 3. The arrows below the dependency diagram indicate less-desirable dependencies. Two types of such dependencies exist: a. Partial dependencies. Dependencies based on only a part of a composite primary key are called partial dependencies. b. Transitive dependencies. A transitive dependency is a dependency of one nonprime attribute on another nonprime attribute. The problem with transitive dependencies is that they still yield data anomalies. The first normal form (1NF) describes the tabular format, shown in Figure 5.2, in which three conditions are satisfied: All the key attributes are defined. There are no repeating groups in the table. All attributes are dependent on the primary key. All relational tables satisfy the 1NF requirements. The problem with the 1NF table structure shown in Figure 5.3 is that it contains partial dependencies and transitive dependency.
7 5.1.3 Conversion to Second Normal Form The rule of conversion from INF format to 2NF format is: Eliminate all partial dependencies from the 1NF format. The conversion from 1NF to 2NF format is done in two steps: Step 1: Identify All the Key Components Fortunately, the relational database design can be improved easily by converting the database into a format known as the second normal form (2NF). The 1NF-to- 2NF conversion is simple: Starting with the 1NF format displayed in Figure 5.3, you do the following activity: Eliminate partial dependencies from the 1NF format in Figure 5.3. This step will result in producing three tables from the original table shown in Figure 5.2. From Figure 5.3, two partial dependencies exist: 1. PROJ_NAME depends on PROJ_NUM, and 2. EMP_NAME, JOB_CLASS, and CHG_HOUR depend on EMP_NUM. To eliminate the existing two partial dependencies, write each component on a separate line, and then write the original (composite) key on the last line. PROJ_NUM EMP_NUM PROJ_NUM EMP_NUM Each component will become the key in a new table. The original table is now divided into three tables: PROJECT, EMPLOYEE, and ASSIGN. Step 2: Identify the Dependent Attributes Determine which attributes are dependent on which other attributes. The three new tables, PROJECT, EMPLOYEE and ASSIGN, are described by: PROJECT (PROJ_NUM, PROJ_NAME) EMPLOYEE (EMP_NUM, EMP_NAME, JOB_CLASS, CHG_HOUR) ASSIGN (PROJ_NUM, EMP_NUM, ASSIGN_HOURS)
8 The results of steps 1 and 2 are displayed in Figure 5.4. At this point, most of the anomalies have been eliminated. A table is in second normal form (2NF) if the following two conditions: It is in 1NF It includes no partial dependencies; that is, no attribute is dependent on only a portion of the primary key. Because a partial dependency can exist only if a table s primary key is composed of several attributes, a table whose primary key consists of only a single attribute is automatically in 2NF if it is in 1NF. In the ASSIGN table, the attribute ASSIGN_HOURS depends on both key attributes of the composite primary key EMP_NUM and PROJ_NUM. However, Figure 5.4 still shows a transitive dependency as CHG_HOUR depends on JOB_CLASS. This transitive dependency can generate anomalies Conversion to Third Normal Form The rule of conversion from 2NF format to 3NF format is: Eliminate all transitive dependencies from the 2NF format.
9 The conversion from 2NF to 3NF format is done in three steps: The data anomalies created by the database organization shown in Figure 5.4 are easily eliminated by completing the following three steps: Step 1: Identify Each New Determinant For every transitive dependency, write its determinant as a PK for a new table. (A determinant is any attribute whose value determines other values within a row.) If you have three different transitive dependencies, you will have three different determinants. Figure 5.4 shows only one case of transitive dependency. Therefore, write the determinant for this transitive dependency: JOB_CLASS Step 2: Identify the Dependent Attributes Identify the attributes that are dependent on each determinant identified in Step 1 and identify the dependency. In this case, you write: JOB_CLASS CHG_HOUR Name the table to reflect its contents and function. In this case, JOB seems appropriate. Step 3: Remove the Dependent Attributes from Transitive Dependencies o Eliminate all the dependent attributes in the transitive relationship(s) from each of the tables shown Figure 5.4 that have such a transitive relationship. o Draw a new dependency diagram to show all the tables defined in Steps 1-3. o Check the new tables as well as the tables modified in Step 3 to make sure that each table has a determinant and that no table contains inappropriate dependencies (partial or transitive). When Steps 1-3 have been completed, the resulting tables will be shown in Figure 5.5.
10 A table is in third normal form (3NF) if the following two conditions are satisfied: o It is in 2NF o It contains no transitive dependencies Improving the Design The table structures are refined to eliminate the troublesome initial partial and transitive dependencies. Normalization cannot, by itself, be relied on to make good designs. Instead it is valuable because its use helps eliminate data redundancies. Therefore the following changes have been made: o PK Assignment o Naming Conventions o Attribute Atomicity o Adding Attributes o Adding Relationships o Refining PKs o Maintaining Historical Accuracy o Using Derived Attributes The enhancements are shown in the tables and dependency diagrams in Figure 5.6.
11
12
13 5.1.6 Limitations on System-Assigned Keys System-assigned primary key may not prevent confusing entries Data entries in Table 5.2 are inappropriate because they duplicate existing records - Yet there has been no violation of either entity integrity or referential integrity This multiple duplicate records problem was created when the JOB_CODE was added to become the PK. In any case, if JOB_CODE is to be the PK, we still must ensure the existence of unique values in the JOB_DESCRIPTION through the use of a unique index. Although our design meets the vital entity and referential requirements, there are still some concerns the designer must address. The JOB_CODE attribute was created and designated to be the JOB table s primary key to ensure entity integrity in the JOB table. The DBMS may be used to have the system assign the PK values. However it is useful to remember that the JOB_CODE does not prevent us from making the entries in the JOB table shown in Table 5.2. It is worth repeating that database design often involves trade-offs and the exercise of professional judgment. In a real-world environment, we must strike a balance between design integrity and flexibility The Boyce-Codd Normal Form (BCNF) A table is in Boyce-Codd normal form (BCNF) If every determinant in the table is a candidate key Has same characteristics as primary key, but for some reason, not chosen to be primary key If a table contains only one candidate key, the 3NF and the BCNF are equivalent BCNF can be violated only if the table contains more than one candidate key
14 Most designers consider the Boyce-Codd normal form (BCNF) as a special case of 3NF A table is in 3NF if it is in 2NF and there are no transitive dependencies A table can be in 3NF and not be in BCNF A non-key attribute is the determinant of a key attribute In other words, a table is in 3NF if it is in 2NF and there are no transitive dependencies. But what about a case in which a non-key attribute is the determinant of a key attribute? The condition does not violate 3NF, yet it fails to meet the BCNF requirements, because BCNF requires that every determinant in the table be a candidate key. The situation mentioned is most easily understood by examining Figure 5.7. The table structure shown in Figure 5.7 has no partial dependencies, nor does it contain transitive dependencies. (The condition C B indicates that a nonkey attribute determines part of the primary key and this dependency is not transitive.) To convert the table structure in Figure 5.7 into table structures that are in 3NF and in BCNF, first change the primary key to A + C. This is an appropriate action, because the dependency C B means that C is, in effect, a superset of B. Next, follow the standard decomposition procedures to produce the results shown in Figure 5.8.
15 To see how this procedure can be applied to an actual problem, examine the sample data in Table 5.3. Table 5.3 reflects the following conditions: Each CLASS_CODE identifies a class uniquely. For example, a course labeled INFS 420 might be taught in two classes (sections), each identified by a unique code to facilitate registration. Thus the CLASS_CODE might identify INFS 420, class section 1, while the CLASS_CODE might identify INFS 420, class section 2. A student can take many classes. A staff member can teach many classes, but each class is taught by only one staff member. Because the relationship between CLASS and
16 STAFF is 1:1, a CLASS_CODE value can determine the value of STAFF_ID of the staff teaching the class. The structure shown in Table 5.3 is reflected in Panel A of Figure 5.9: Panel A in Figure 5.9 shows a structure that is clearly in 3NF, but the table represented by this structure has a major problem; because it is trying to describe two things: student's enrolment and teaching assignment. This cause data redundancy and consequently causes data anomalies. The solution to this problem is to decompose the table structure following the procedure outlined earlier. The decomposition of Panel B shown in Figure 5.9 yields two table structures that conform to both 3NF and BCNF requirements. Notice, each table in panel B represents the details of one thing or one concept. The table on the left represents student's enrolment, and the other table on the right represents class assignment. Note also that each of the two tables panel B is in BCNF because if every determinant in each table is a candidate key, or there only one candidate in each table which is the primary key.
17 Concept Check What is normalization? What are the stages of normalization? What is BCNF?
Module 5: Normalization of database tables
Module 5: Normalization of database tables Normalization is a process for evaluating and correcting table structures to minimize data redundancies, thereby reducing the likelihood of data anomalies. The
Chapter 6. Database Tables & Normalization. The Need for Normalization. Database Tables & Normalization
Chapter 6 Database Tables & Normalization Objectives: to learn What normalization is and what role it plays in the database design process About the normal forms 1NF, 2NF, 3NF, BCNF, and 4NF How normal
DATABASE SYSTEMS. Chapter 7 Normalisation
DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation 1 (Rob, Coronel & Crockett 978184480731) In this chapter, you will learn: What normalization
Chapter 9: Normalization
Chapter 9: Normalization Part 1: A Simple Example Part 2: Another Example & The Formal Stuff A Problem: Keeping Track of Invoices (cont d) Suppose we have some invoices that we may or may not want to refer
Functional Dependency and Normalization for Relational Databases
Functional Dependency and Normalization for Relational Databases Introduction: Relational database design ultimately produces a set of relations. The implicit goals of the design activity are: information
Normalization. Reduces the liklihood of anomolies
Normalization Normalization Tables are important, but properly designing them is even more important so the DBMS can do its job Normalization the process for evaluating and correcting table structures
DATABASE NORMALIZATION
DATABASE NORMALIZATION Normalization: process of efficiently organizing data in the DB. RELATIONS (attributes grouped together) Accurate representation of data, relationships and constraints. Goal: - Eliminate
Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization. Introduction to Normalization. Normal Forms.
Chapter 5: Logical Database Design and the Relational Model Part 2: Normalization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden Robert C. Nickerson ISYS
COSC344 Database Theory and Applications. Lecture 9 Normalisation. COSC344 Lecture 9 1
COSC344 Database Theory and Applications Lecture 9 Normalisation COSC344 Lecture 9 1 Overview Last Lecture Functional Dependencies This Lecture Normalisation Introduction 1NF 2NF 3NF BCNF Source: Section
C# Cname Ccity.. P1# Date1 Qnt1 P2# Date2 P9# Date9 1 Codd London.. 1 21.01 20 2 23.01 2 Martin Paris.. 1 26.10 25 3 Deen London.. 2 29.
4. Normalisation 4.1 Introduction Suppose we are now given the task of designing and creating a database. How do we produce a good design? What relations should we have in the database? What attributes
Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB
Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB Outline Database concepts Conceptual Design Logical Design Communicating with the RDBMS 2 Some concepts Database: an
DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF)
DATABASE DESIGN: NORMALIZATION NOTE & EXERCISES (Up to 3NF) Tables that contain redundant data can suffer from update anomalies, which can introduce inconsistencies into a database. The rules associated
Normalization of Database Tables. Functional Dependency. Examples of Functional Dependencies: So Now what is Normalization? Transitive Dependencies
ISM 602 Dr. Hamid Nemati Objectives The idea Dependencies Attributes and Design Understand concepts normaization (Higher-Leve Norma Forms) Learn how to normaize tabes Understand normaization and database
Part 6. Normalization
Part 6 Normalization Normal Form Overview Universe of All Data Relations (normalized / unnormalized 1st Normal Form 2nd Normal Form 3rd Normal Form Boyce-Codd Normal Form (BCNF) 4th Normal Form 5th Normal
Normalization in Database Design
in Database Design Marek Rychly [email protected] Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14
Database Design and the Reality of Normalisation
Proceedings of the NACCQ 2000 Wellington NZ www.naccq.ac.nz Database Design and the Reality of Normalisation Dave Kennedy ABSTRACT Institute of Technology Christchurch Polytechnic Te Whare Runanga O Otautahi
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Outline Informal Design Guidelines
Normalisation to 3NF. Database Systems Lecture 11 Natasha Alechina
Normalisation to 3NF Database Systems Lecture 11 Natasha Alechina In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third Normal Forms For more
A. TRUE-FALSE: GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ:
GROUP 2 PRACTICE EXAMPLES FOR THE REVIEW QUIZ: Review Quiz will contain very similar question as below. Some questions may even be repeated. The order of the questions are random and are not in order of
Normalization of Database
Normalization of Database UNIT-4 Database Normalisation is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy
Normal forms and normalization
Normal forms and normalization An example of normalization using normal forms We assume we have an enterprise that buys products from different supplying companies, and we would like to keep track of our
Normalization. CIS 331: Introduction to Database Systems
Normalization CIS 331: Introduction to Database Systems Normalization: Reminder Why do we need to normalize? To avoid redundancy (less storage space needed, and data is consistent) To avoid update/delete
Database design 1 The Database Design Process: Before you build the tables and other objects that will make up your system, it is important to take time to design it. A good design is the keystone to creating
MCQs~Databases~Relational Model and Normalization http://en.wikipedia.org/wiki/database_normalization
http://en.wikipedia.org/wiki/database_normalization Database normalization is the process of organizing the fields and tables of a relational database to minimize redundancy. Normalization usually involves
BCA. Database Management System
BCA IV Sem Database Management System Multiple choice questions 1. A Database Management System (DBMS) is A. Collection of interrelated data B. Collection of programs to access data C. Collection of data
SQL Server. 1. What is RDBMS?
SQL Server 1. What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained
DBMS. Normalization. Module Title?
Normalization Database Normalization Database normalization is the process of removing redundant data from your tables in to improve storage efficiency, data integrity (accuracy and consistency), and scalability
Normalisation 1. Chapter 4.1 V4.0. Copyright @ Napier University
Normalisation 1 Chapter 4.1 V4.0 Copyright @ Napier University Normalisation Overview discuss entity integrity and referential integrity describe functional dependency normalise a relation to first formal
Unit 3.1. Normalisation 1 - V2.0 1. Normalisation 1. Dr Gordon Russell, Copyright @ Napier University
Normalisation 1 Unit 3.1 Normalisation 1 - V2.0 1 Normalisation Overview discuss entity integrity and referential integrity describe functional dependency normalise a relation to first formal form (1NF)
Normalisation 6 TABLE OF CONTENTS LEARNING OUTCOMES
Topic Normalisation 6 LEARNING OUTCOMES When you have completed this Topic you should be able to: 1. Discuss importance of the normalisation in the database design. 2. Discuss the problems related to data
Database Design and Normalization
Database Design and Normalization CPS352: Database Systems Simon Miner Gordon College Last Revised: 9/27/12 Agenda Check-in Functional Dependencies (continued) Design Project E-R Diagram Presentations
Normalization. Functional Dependence. Normalization. Normalization. GIS Applications. Spring 2011
Normalization Normalization Normalization is a foundation for relational database design Systematic approach to efficiently organize data in a database GIS Applications Spring 2011 Objectives Minimize
Introduction to Computing. Lectured by: Dr. Pham Tran Vu [email protected]
Introduction to Computing Lectured by: Dr. Pham Tran Vu [email protected] Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of
Chapter 10. Functional Dependencies and Normalization for Relational Databases. Copyright 2007 Ramez Elmasri and Shamkant B.
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline 1 Informal Design Guidelines for Relational Databases
Normalization in OODB Design
Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota [email protected] Abstract When we design an object-oriented database schema, we need
CS 377 Database Systems. Database Design Theory and Normalization. Li Xiong Department of Mathematics and Computer Science Emory University
CS 377 Database Systems Database Design Theory and Normalization Li Xiong Department of Mathematics and Computer Science Emory University 1 Relational database design So far Conceptual database design
Databases -Normalization III. (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31
Databases -Normalization III (N Spadaccini 2010 and W Liu 2012) Databases - Normalization III 1 / 31 This lecture This lecture describes 3rd normal form. (N Spadaccini 2010 and W Liu 2012) Databases -
Normalization. CIS 3730 Designing and Managing Data. J.G. Zheng Fall 2010
Normalization CIS 3730 Designing and Managing Data J.G. Zheng Fall 2010 1 Overview What is normalization? What are the normal forms? How to normalize relations? 2 Two Basic Ways To Design Tables Bottom-up:
C HAPTER 4 INTRODUCTION. Relational Databases FILE VS. DATABASES FILE VS. DATABASES
INRODUCION C HAPER 4 Relational Databases Questions to be addressed in this chapter: How are s different than file-based legacy systems? Why are s important and what is their advantage? What is the difference
Database Management System
UNIT -6 Database Design Informal Design Guidelines for Relation Schemas; Functional Dependencies; Normal Forms Based on Primary Keys; General Definitions of Second and Third Normal Forms; Boyce-Codd Normal
How To Write A Diagram
Data Model ing Essentials Third Edition Graeme C. Simsion and Graham C. Witt MORGAN KAUFMANN PUBLISHERS AN IMPRINT OF ELSEVIER AMSTERDAM BOSTON LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE
Introduction to normalization. Introduction to normalization
Introduction to normalization Lecture 4 Instructor Anna Sidorova Agenda Presentation Review of relational models, in class exersise Introduction to normalization In-class exercises Discussion of HW2 1
Chapter 10 Functional Dependencies and Normalization for Relational Databases
Chapter 10 Functional Dependencies and Normalization for Relational Databases Copyright 2004 Pearson Education, Inc. Chapter Outline 1 Informal Design Guidelines for Relational Databases 1.1Semantics of
Fundamentals of Database System
Fundamentals of Database System Chapter 4 Normalization Fundamentals of Database Systems (Chapter 4) Page 1 Introduction To Normalization In general, the goal of a relational database design is to generate
Optimum Database Design: Using Normal Forms and Ensuring Data Integrity. by Patrick Crever, Relational Database Programmer, Synergex
Optimum Database Design: Using Normal Forms and Ensuring Data Integrity by Patrick Crever, Relational Database Programmer, Synergex Printed: April 2007 The information contained in this document is subject
Normalization. Normalization. Normalization. Data Redundancy
Normalization Normalization o Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data, its relationships, and constraints.
Chapter 10. 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
If it's in the 2nd NF and there are no non-key fields that depend on attributes in the table other than the Primary Key.
Normalization First Normal Form (1st NF) The table cells must be of single value. Eliminate repeating groups in individual tables. Create a separate table for each set of related data. Identify each set
RELATIONAL DATABASE DESIGN
RELATIONAL DATABASE DESIGN g Good database design - Avoiding anomalies g Functional Dependencies g Normalization & Decomposition Using Functional Dependencies g 1NF - Atomic Domains and First Normal Form
14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:
14 Databases 14.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define a database and a database management system (DBMS)
Tutorial on Relational Database Design
Tutorial on Relational Database Design Introduction Relational database was proposed by Edgar Codd (of IBM Research) around 1969. It has since become the dominant database model for commercial applications
Theory of Relational Database Design and Normalization
Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3) 1 Informal Design Guidelines for
DATABASE DESIGN: Normalization Exercises & Answers
DATABASE DESIGN: Normalization Exercises & Answers (a) The table shown in Figure 1 is susceptible to update anomalies. Provide examples of insertion, deletion, and modification anomalies. Answers: This
Functional Dependencies and Finding a Minimal Cover
Functional Dependencies and Finding a Minimal Cover Robert Soulé 1 Normalization An anomaly occurs in a database when you can update, insert, or delete data, and get undesired side-effects. These side
Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES
1 Chapter 5: FUNCTIONAL DEPENDENCIES AND NORMALIZATION FOR RELATIONAL DATABASES INFORMAL DESIGN GUIDELINES FOR RELATION SCHEMAS We discuss four informal measures of quality for relation schema design in
Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 5: Normalization II; Database design case studies. September 26, 2005
Introduction to Databases, Fall 2005 IT University of Copenhagen Lecture 5: Normalization II; Database design case studies September 26, 2005 Lecturer: Rasmus Pagh Today s lecture Normalization II: 3rd
CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization
CSCI-GA.2433-001 Database Systems Lecture 7: Schema Refinement and Normalization Mohamed Zahran (aka Z) [email protected] http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema At that point we
Fundamentals of Relational Database Design
Fundamentals of Relational Database Design Presented by: Paul Litwin Paul Litwin is an independent developer, editor, writer, and educator. He s the owner of Seattle-based Litwin Consulting, a Microsoft
Analysis and Design Complex and Large Data Base using MySQL Workbench
Analysis and Design Complex and Large Data Base using MySQL Workbench Dedi Iskandar Inan 1 and Ratna Juita 2 1 Department of Computer Engineering, Papua State University, Indonesia 1 [email protected]
Theory of Relational Database Design and Normalization
Theory of Relational Database Design and Normalization (Based on Chapter 14 and some part of Chapter 15 in Fundamentals of Database Systems by Elmasri and Navathe) 1 Informal Design Guidelines for Relational
MODULE 8 LOGICAL DATABASE DESIGN. Contents. 2. LEARNING UNIT 1 Entity-relationship(E-R) modelling of data elements of an application.
MODULE 8 LOGICAL DATABASE DESIGN Contents 1. MOTIVATION AND LEARNING GOALS 2. LEARNING UNIT 1 Entity-relationship(E-R) modelling of data elements of an application. 3. LEARNING UNIT 2 Organization of data
Lecture 2 Normalization
MIT 533 ระบบฐานข อม ล 2 Lecture 2 Normalization Walailuk University Lecture 2: Normalization 1 Objectives The purpose of normalization The identification of various types of update anomalies The concept
Announcements. SQL is hot! Facebook. Goal. Database Design Process. IT420: Database Management and Organization. Normalization (Chapter 3)
Announcements IT0: Database Management and Organization Normalization (Chapter 3) Department coin design contest deadline - February -week exam Monday, February 1 Lab SQL SQL Server: ALTER TABLE tname
Normalization. Normalization. First goal: to eliminate redundant data. for example, don t storing the same data in more than one table
Normalization Normalization Purpose Redundancy and Data Anomalies 1FN: First Normal Form 2FN: Second Normal Form 3FN: Thrird Normal Form Examples 1 Normalization Normalization is the process of efficiently
The Relational Database Model
The Relational Database Model 1 Describing how to tune a relational database model would not be complete without a description of normalization. I have attempted to simplify normalization. When I attended
The process of database development. Logical model: relational DBMS. Relation
The process of database development Reality (Universe of Discourse) Relational Databases and SQL Basic Concepts The 3rd normal form Structured Query Language (SQL) Conceptual model (e.g. Entity-Relationship
Fundamentals of Database Design
Fundamentals of Database Design Zornitsa Zaharieva CERN Data Management Section - Controls Group Accelerators and Beams Department /AB-CO-DM/ 23-FEB-2005 Contents : Introduction to Databases : Main Database
Database Normalization. Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center 415-600-7003 sarkarm@sutterhealth.
Database Normalization Mohua Sarkar, Ph.D Software Engineer California Pacific Medical Center 415-600-7003 [email protected] Definition A database is an organized collection of data whose content
z Introduction to Relational Databases for Clinical Research Michael A. Kohn, MD, MPP [email protected] copyright 2007Michael A.
z Introduction to Relational Databases for Clinical Research Michael A. Kohn, MD, MPP [email protected] copyright 2007Michael A. Kohn Table of Contents Introduction...1 Relational Databases, Keys,
Normalisation. Why normalise? To improve (simplify) database design in order to. Avoid update problems Avoid redundancy Simplify update operations
Normalisation Why normalise? To improve (simplify) database design in order to Avoid update problems Avoid redundancy Simplify update operations 1 Example ( the practical difference between a first normal
- Eliminating redundant data - Ensuring data dependencies makes sense. ie:- data is stored logically
Normalization of databases Database normalization is a technique of organizing the data in the database. Normalization is a systematic approach of decomposing tables to eliminate data redundancy and undesirable
Improving Data Quality in Relational Databases: Overcoming Functional Entanglements
Research Report Occasional Paper Improving Data Quality in Relational Databases: Overcoming Functional Entanglements Tennyson X. Chen, Martin D. Meyer, Nanthini Ganapathi, Shuangquan (Sean) Liu, and Jonathan
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010
Jordan University of Science & Technology Computer Science Department CS 728: Advanced Database Systems Midterm Exam First 2009/2010 Student Name: ID: Part 1: Multiple-Choice Questions (17 questions, 1
Chapter 7: Relational Database Design
Chapter 7: Relational Database Design Pitfalls in Relational Database Design Decomposition Normalization Using Functional Dependencies Normalization Using Multivalued Dependencies Normalization Using Join
Schema Design and Normal Forms Sid Name Level Rating Wage Hours
Entity-Relationship Diagram Schema Design and Sid Name Level Rating Wage Hours Database Management Systems, 2 nd Edition. R. Ramakrishnan and J. Gehrke 1 Database Management Systems, 2 nd Edition. R. Ramakrishnan
RELATIONAL DATABASE DESIGN. Basic Concepts
Basic Concepts a database is an collection of logically related records a relational database stores its data in 2-dimensional tables a table is a two-dimensional structure made up of rows (tuples, records)
Lecture Notes on Database Normalization
Lecture Notes on Database Normalization Chengkai Li Department of Computer Science and Engineering The University of Texas at Arlington April 15, 2012 I decided to write this document, because many students
B2.2-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS
B2.2-R3: INTRODUCTION TO DATABASE MANAGEMENT SYSTEMS NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions. 2. PART ONE is to be answered
Introduction to Database Systems. Normalization
Introduction to Database Systems Normalization Werner Nutt 1 Normalization 1. Anomalies 1. Anomalies 2. Boyce-Codd Normal Form 3. 3 rd Normal Form 2 Anomalies The goal of relational schema design is to
CS143 Notes: Normalization Theory
CS143 Notes: Normalization Theory Book Chapters (4th) Chapters 7.1-6, 7.8, 7.10 (5th) Chapters 7.1-6, 7.8 (6th) Chapters 8.1-6, 8.8 INTRODUCTION Main question How do we design good tables for a relational
Teaching Database Modeling and Design: Areas of Confusion and Helpful Hints
Journal of Information Technology Education Volume 6, 2007 Teaching Database Modeling and Design: Areas of Confusion and Helpful Hints George C. Philip, Ph. D. College of Business, The University of Wisconsin
Answers to Selected Questions and Problems
Answers to Selected Questions and Problems-Edition8 Page 1 of 64 Answers to Selected Questions and Problems Chapter 1 Database Systems Answers to Selected Review Questions 2. Data redundancy exists when
Database Design and Normalization
Database Design and Normalization Chapter 10 (Week 11) EE562 Slides and Modified Slides from Database Management Systems, R. Ramakrishnan 1 Computing Closure F + Example: List all FDs with: - a single
7. Databases and Database Management Systems
7. Databases and Database Management Systems 7.1 What is a File? A file is a collection of data or information that has a name, called the Filename. There are many different types of files: Data files
Access Database Design
Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk (304) 293-4444 http://oit.wvu.edu/training/classmat/db/ Last revised: June 26, 2008 Copyright 2008 West
Determination of the normalization level of database schemas through equivalence classes of attributes
Computer Science Journal of Moldova, vol.17, no.2(50), 2009 Determination of the normalization level of database schemas through equivalence classes of attributes Cotelea Vitalie Abstract In this paper,
2. Basic Relational Data Model
2. Basic Relational Data Model 2.1 Introduction Basic concepts of information models, their realisation in databases comprising data objects and object relationships, and their management by DBMS s that
THE BCS PROFESSIONAL EXAMINATION Diploma. October 2004 EXAMINERS REPORT. Database Systems
THE BCS PROFESSIONAL EXAMINATION Diploma October 2004 EXAMINERS REPORT Database Systems Question 1 1. a) In your own words, briefly describe why a relational database design must be normalised prior to
UNDERSTANDING NORMALIZATION
UNDERSTANDING NORMALIZATION A solid database structure is the foundation of any successful database application, and you will inevitably encounter problems if your database is poorly designed. Regardless
KNOWLEDGE FACTORING USING NORMALIZATION THEORY
KNOWLEDGE FACTORING USING NORMALIZATION THEORY J. VANTHIENEN M. SNOECK Katholieke Universiteit Leuven Department of Applied Economic Sciences Dekenstraat 2, 3000 Leuven (Belgium) tel. (+32) 16 28 58 09
About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer
About the Tutorial Database Management System or DBMS in short refers to the technology of storing and retrieving users data with utmost efficiency along with appropriate security measures. DBMS allows
Functional Dependencies
BCNF and 3NF Functional Dependencies Functional dependencies: modeling constraints on attributes stud-id name address course-id session-id classroom instructor Functional dependencies should be obtained
Database Design Standards. U.S. Small Business Administration Office of the Chief Information Officer Office of Information Systems Support
Database Design Standards U.S. Small Business Administration Office of the Chief Information Officer Office of Information Systems Support TABLE OF CONTENTS CHAPTER PAGE NO 1. Standards and Conventions
IT2305 Database Systems I (Compulsory)
Database Systems I (Compulsory) INTRODUCTION This is one of the 4 modules designed for Semester 2 of Bachelor of Information Technology Degree program. CREDITS: 04 LEARNING OUTCOMES On completion of this
Lecture Notes INFORMATION RESOURCES
Vilnius Gediminas Technical University Jelena Mamčenko Lecture Notes on INFORMATION RESOURCES Part I Introduction to Dta Modeling and MSAccess Code FMITB02004 Course title Information Resourses Course
Design of Relational Database Schemas
Design of Relational Database Schemas T. M. Murali October 27, November 1, 2010 Plan Till Thanksgiving What are the typical problems or anomalies in relational designs? Introduce the idea of decomposing
