Part 6. Normalization
|
|
- Giles Higgins
- 8 years ago
- Views:
Transcription
1 Part 6 Normalization
2 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 Form (PJ/NF) Domain/Key Normal Form (DK/NF) Copyright Thomas P. Sturm Normalization Part 6, Page 2
3 Universe of Relations Any sequential file is a relation Not all relations are well formed Normalization provides a set of criteria to evaluate the well formedness of a relation Normal form is only one criterion for determining a good model In general, a sequential file may have repeating groups Example 1 - suppliers: part diode bulb suppliers (GE, TRW, Mot) (GE, Syl) Implemented as: part supplier1 supplier2 supplier3 diode GE TRW Mot bulb GE Syl Copyright Thomas P. Sturm Normalization Part 6, Page 3
4 Problem with a Relation Not in First Normal Form Retrieval: which supplier of a part should be retrieved? in which order should suppliers be retrieved? Storage: how many suppliers do you allow for? which spaces are kept blank, and how? Insert: to add a supplier, need to retrieve all suppliers, add the new supplier to an empty slot, and replace the record Delete: to delete a supplier, need to adjust the vector (read, move around, erase, re-write) Update: to update a supplier name, need to retrieve all suppliers, find the one to alter, and rewrite entire set of suppliers Copyright Thomas P. Sturm Normalization Part 6, Page 4
5 Solution to Repeating Group Problem Eliminate repeating groups by repeating the key Example 1 - suppliers: part diode diode diode bulb bulb supplier GE TRW Mot GE Syl This new table has a different key than the old one. It is part plus supplier. Copyright Thomas P. Sturm Normalization Part 6, Page 5
6 First Normal Form All underlying domains contain atomic values only (no vectors / repeating groups) Example 2 - inventory: part # warehouse # wh_address quantity Mpls StPaul Mpls Madison StPaul 350 Update Anomalies: UPDATE address of warehouse stored in many rows if address changes, must change all rows DELETE if the last row for a warehouse is deleted, the address is lost INSERT to insert a new row, warehouse address must be known The problem occurs because this table is not focused on one primary key - it is about two things - warehouses and parts in warehouses. Copyright Thomas P. Sturm Normalization Part 6, Page 6
7 Solution to Multiple Focus Problems A relation that is in 1NF but not in a higher normal form has a composite key (more than one attribute in the key) Establish 2 relations via projection Example 2 - inventory: One table about warehouses: warehouse# wh_address 05 Mpls 08 StPaul 10 Madison One table about inventory with a composite key: part# warehouse# quantity The original table in 1NF can be reconstructed by a join Copyright Thomas P. Sturm Normalization Part 6, Page 7
8 Second Normal Form 1NF + every non-key attribute is fully functionally dependent on the primary key Example 3 - departments: name dept dept_loc smith jones king turner olson Problem: Functional dependency is transitive The primary key is name dept is functionally dependent on name dept_loc is also functionally dependent on name, but it is transitive because dept functionally determines dept_loc Copyright Thomas P. Sturm Normalization Part 6, Page 8
9 Problems with 2NF Relations Update Anomalies: UPDATE - location appears many times - if location of a department changes, must fetch and change all rows containing that location DELETE - if the last row for a department is deleted, the department location information is lost INSERT - to insert a new row, department location must be known Solution: Establish 2 relations via projection Example 3 - departments: name dept and dept dept_loc smith jones king turner 400 olson 401 Copyright Thomas P. Sturm Normalization Part 6, Page 9
10 Third Normal Form 2NF + every non-key attribute is non-transitively functionally dependent on the primary key OR Every non-key attribute is mutually independent (none is functionally dependent on any of the others) fully functionally dependent on the primary key OR (Kent) Each attribute in the relation is functionally dependent on the key, the whole key, and nothing but the key A relation that is 2NF but not 3NF can be split into a collection of 3NF relations by projection can be reconstructed by join Copyright Thomas P. Sturm Normalization Part 6, Page 10
11 3NF Examples Example 4 - locations: dept# dept_name dept_loc 400 programming financial academic support 300 dept# and dept_name are candidate keys dept_loc is the only non-key attribute, and is, by default, non-transitively functionally dependent on the primary key This table is fine - it is only about departments Example 5 - stock: s# sname p# qty 10 GE GE GE TRW TRW Syl technically in 3NF qty is the only non-key attribute (like example 1) candidate keys are (s#, p#) and (sname, p#) didn't require components of an alternate key to be fully functionally dependent on the primary key Copyright Thomas P. Sturm Normalization Part 6, Page 11
12 Problems with 3NF Relations The problems associated with alternate key components were not recognized in the early formulations of the relational model. Have the same update anomalies as second normal form Solution: Establish 2 relations via projection Example 5 - stock: s# sname and s# p# qty 10 GE TRW Syl or [s#, sname] and [sname, p#, qty] Because of this problem, 3NF (as we have described it) is sometimes referred to as early 3rd Normal Form Copyright Thomas P. Sturm Normalization Part 6, Page 12
13 BCNF Boyce-Codd Normal Form 3NF + every determinant is a candidate key (Determinant: any attribute on which some other attribute is fully functionally dependent) In example 4, dept# determined dept_name; in example 5, s# determined sname In example 4, dept# was a candidate key In example 5, s# (by itself) was not a candidate key A relation that is 3NF but not BCNF Can be split into a collection of BCNF relations by projection Can be reconstructed by join BCNF is sometimes referred to as late 3rd Normal Form, or even just as 3rd Normal Form Copyright Thomas P. Sturm Normalization Part 6, Page 13
14 3NF to BCNF Example Example 6 - enrollment Rules: 1. For each subject, each student is taught by 1 teacher 2. Each teacher teaches only 1 subject (don't I wish) 3. Each subject is taught by several teachers Student Subject Teacher Smith Math Dr. White Smith English Dr. Brown Jones Math Dr. White Jones English Dr. Brown Doe Math Dr. Green a. Teacher dependent on Student + Subject b. Subject dependent on Teacher c. Teacher not dependent on Subject d. (Student, Subject) is a candidate key e. (Student, Teacher) is also a candidate key Update anomalies, e.g., Dr. White changes name Relation in 3NF, but not in BCNF Teacher is a determinant (b.), but not a candidate key (d. and e.) Copyright Thomas P. Sturm Normalization Part 6, Page 14
15 Solution to Example 6 Solution: Form two relations: Student Teacher and Teacher Subject Smith Dr. White Dr. White Math Smith Dr. Brown Dr. Brown English Jones Dr. White Dr. Green Math Jones Dr. Brown Doe Dr. Green Question: How did we know to break it up this way? Answer: The rules help us make this decision. In this case, rule 2 gives us the crucial information - once you know the teacher, you know the subject. Therefore, we need two tables to enforce the rule. The [Teacher, Subject] table tells us which one subject each teacher teaches. Students, in general, need both a subject and a teacher If we specify only subject, we don't know the teacher If we specify teacher, however, we do know the subject because of the rule and the first table Copyright Thomas P. Sturm Normalization Part 6, Page 15
16 Fourth Normal Form 4NF and 5NF are relevant only when all attributes in the relation are parts of the key if in BCNF and have a non-key attribute, also in 5NF Example 7 - skills: Suppose we wish to store employee job skills and language skills. (An employee may have many of each.) employee skill language Jones electrical French Jones electrical German Jones mechanical French Jones mechanical German Smith plumbing Spanish In general: if Jones x A and Jones y B then Jones x B and Jones y A The relation is in BCNF - because it is all key... but there is redundancy Copyright Thomas P. Sturm Normalization Part 6, Page 16
17 Converting to 4NF Ask the following questions: Could the relation have non-key attributes? Could any combination be missing? If either answer is NO, need to break up relation to achieve 4NF Example 7 - skills: employee skill language should be broken up into two relations: employee skill and employee language Jones electrical Jones French Jones mechanical Jones German Smith plumbing Smith Spanish if job skill and language are independent Copyright Thomas P. Sturm Normalization Part 6, Page 17
18 Problems without 4NF Problem occurs when dealing with multiple, independent facts How do we represent them in a single relation? Disjoint: Jones electrical Jones mechanical Jones Jones Smith plumbing Smith French German Spanish Random mix: Jones electrical French Jones mechanical German Smith plumbing Spanish (do extras - repeat, - blank, - anything?) Cross product: Jones electrical French Jones mechanical French Jones electrical German Jones mechanical German Smith plumbing Spanish Check for independence! Copyright Thomas P. Sturm Normalization Part 6, Page 18
19 Fifth Normal Form PJ/NF or Projection-Join Normal Form (Kent) - Deals with cases where information can be reconstructed from smaller pieces of information which can be maintained with less redundancy Example 8 - dealerships: 1. Agents represent Companies 2. Companies make Products 3. Agents sell Products Which Agent sells which Product for which Company? Agent Company Product smith ford car smith gm truck jones ford car this form is necessary in the general case BUT if we put a rule into effect that reads: 4. if an agent sells a product, and an agent represents a company, then the agent must sell the product made by the company So, to obey the rule, we must add smith ford truck smith gm car NOW, with the rule and the new rows, we have REDUNDANCY Copyright Thomas P. Sturm Normalization Part 6, Page 19
20 Converting to 5NF This time, we must break the relation into three parts (will not break in two) Example 8 - dealerships: Agent Company Product smith ford car smith gm truck jones ford car smith ford truck smith gm car BREAK INTO 3 Agent Company Agent Product Company Product smith ford smith car ford car smith gm smith truck ford truck jones ford jones car gm car gm truck A relation is already in 5NF if its information content cannot be reconstructed from several smaller record types (having different keys) Only have 5NF problems if there are symmetry constraints (a pair of rows requires the existence of one or more additional rows) Copyright Thomas P. Sturm Normalization Part 6, Page 20
21 Domain/Key Normal Form No insertion/deletion anomalies Impossible to make an insertion/deletion that violates a constraint Constraint types: domain constraints key constraints Example 9 - customers cust# branch 1234 west 1325 south 1421 east 1511 south where valid branches are west, east, and south Copyright Thomas P. Sturm Normalization Part 6, Page 21
22 Enforcing Domain Integrity in DK/NF Example 9 - customers: cust# branch 1234 west 1325 south 1421 east 1511 south 1600 north If this update is possible, not in DK/NF One possibility for prohibiting this update is to maintain a table of legal branches and write code to prohibit the entry of a branch not in the table legal branch west south east Problem: What's to stop someone from placing north in the legal branch table? Possible partial solution: Restrict access to the legal branch table Copyright Thomas P. Sturm Normalization Part 6, Page 22
23 Normalization Example: AutoCAD Database Manufacturing plant electrical wiring specifications Blueprints contain: parts at locations wired connections attributes for each wire and location AutoCAD transmits variable-length records only transmits data for smart parts one record per part all data must be related to one or more parts Objectives: number of wires from any source to any destination sub-classified by voltage, shielding, and intrinsic safety characteristics obtain conduit count from wire count (by hand) Copyright Thomas P. Sturm Normalization Part 6, Page 23
24 Wiring Problem Statement Part: AS 303 Wire 52 Wire 53 Part: AS 404 Wire Panel (3) Part: AS 405 Panel (4) Problem: Count the wires going from panel (3) to panel (4) Copyright Thomas P. Sturm Normalization Part 6, Page 24
25 Wiring Database Normalization 0th Normal Form Part# Loc Loc_Desc Wire1 Volt IS Wire2 Volt IS Wire3... AS303 (3) Panel IS 54 AS404 (4) Panel AS405 (4) Panel IS 1st Normal Form (no repeating groups) but the 2-part key creates partial dependencies Part# Loc Loc_Desc Wire# Volt IS AS303 (3) Panel AS303 (3) Panel IS AS303 (3) Panel AS404 (4) Panel AS404 (4) Panel AS405 (4) Panel IS 2nd Normal Form (no partial dependencies) Part# Loc Loc_Desc Wire# AS303 (3) Panel 3 52 AS303 (3) Panel 3 53 AS303 (3) Panel 3 54 AS404 (4) Panel 4 52 AS404 (4) Panel 4 55 AS405 (4) Panel 4 53 Wire# Volt IS IS Copyright Thomas P. Sturm Normalization Part 6, Page 25
26 Wiring Database Normalization (Continued) 2nd Normal Form (apply rule again) with the step-by-step approach, you only eliminate one partial dependency at a time Part# AS AS AS AS AS AS Wire# Wire# Volt IS IS Part# Loc Loc_Desc AS303 (3) Panel 3 AS404 (4) Panel 4 AS405 (4) Panel 4 Copyright Thomas P. Sturm Normalization Part 6, Page 26
27 Wiring Database Normalization (Concluded) 3rd Normal Form (no transitive dependencies) Part# Wire# AS AS AS AS AS AS Wire# Volt IS IS Part# Loc AS303 (3) AS404 (4) AS405 (4) Loc Loc_Desc (3) Panel 3 (4) Panel 4 Copyright Thomas P. Sturm Normalization Part 6, Page 27
28 A Case Study (March) Population: MBA students MIS majors last quarter in the program Language: Nomad 2 4GL Case: Customer, with attributes Dealer, with attributes Manufacturer, with attributes Contracts - customer, dealer, manufacturer, with symmetry constraints Task: Given case description fully analyzed Use existing Nomad database Perform 8 queries Perform 11 updates Copyright Thomas P. Sturm Normalization Part 6, Page 28
29 Relations Given in Case Study (March) Design: 3 groups of 14 students same case, same queries, same updates different schemas (1NF, 3NF, and 5NF) 1NF Schema: (d#, m#, c#, mfgr_attr, cust_attr, dealer_attr) 3NF Schema: (c#, cust_attr) (d#, dealer_attr) (m#, mfgr_attr) (d#, c#, m#) 5NF Schema: (c#, cust_attr) (d#, dealer_attr) (m#, mfgr_attr) (d#, c#) (d#, m#) (c#, m#) Copyright Thomas P. Sturm Normalization Part 6, Page 29
30 Preliminary Case Results (March) Tasks Correctly Performed Normal Form: Queries (8) Updates (11) First (90%) (46%) Third (56%) (33%) Fifth (55%) (29%) Copyright Thomas P. Sturm Normalization Part 6, Page 30
31 Database Design Issues Revisited Ease of query formulation Ease of enforcing referential integrity constraints Ease of avoiding update anomalies Normalization focuses only on avoiding update anomalies Being normal is not enough Possible solutions: 1. Don't normalize 2. Don't normalize beyond BCNF 3. Normalize to 5NF, but back off Problems with 1-3: update anomalies, bad data, knowledge of database storage needed 4. Don't let users at base tables 5. Create views that are in low normal forms 6. Pre-define joins that give users the data they need Solutions 4-6 are more work, but generally worth the effort Copyright Thomas P. Sturm Normalization Part 6, Page 31
32 Copyright Thomas P. Sturm Normalization Part 6, Page 32
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
More information1.204 Lecture 2. Keys
1.204 Lecture 2 Data models, concluded Normalizati tion Keys Primary key: one or more attributes that uniquely identify a record Name or identifying number, often system generated Composite keys are made
More informationChapter 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
More informationNormalization in OODB Design
Normalization in OODB Design Byung S. Lee Graduate Programs in Software University of St. Thomas St. Paul, Minnesota bslee@stthomas.edu Abstract When we design an object-oriented database schema, we need
More informationNormalisation 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
More informationDATABASE 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
More informationIf 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
More informationTopic 5.1: Database Tables and Normalization
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
More informationDatabase 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
More information1.264 Lecture 10. Data normalization
1.264 Lecture 10 Data normalization Next class: Read Murach chapters 1-3. Exercises due after class Make sure you ve downloaded and run the.sql file to create the database we ll be using in the next two
More informationC# 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
More informationDatabase 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
More informationDATABASE 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
More informationIntroduction 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
More informationRELATIONAL 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
More informationCOSC344 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
More informationNormalization. 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:
More informationNormal 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
More informationBCA. 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
More informationTutorial 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
More informationNormalization. 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
More informationChapter 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
More informationNormalisation 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
More informationChapter 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
More informationFunctional 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
More informationCarnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications. Overview - detailed. Goal. Faloutsos CMU SCS 15-415
Faloutsos 15-415 Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture #17: Schema Refinement & Normalization - Normal Forms (R&G, ch. 19) Overview - detailed DB design
More informationCOMPUTING PRACTICES ASlMPLE GUIDE TO FIVE NORMAL FORMS IN RELATIONAL DATABASE THEORY
COMPUTING PRACTICES ASlMPLE GUIDE TO FIVE NORMAL FORMS IN RELATIONAL DATABASE THEORY W LL AM KErr International Business Machines Corporation Author's Present Address: William Kent, International Business
More informationNormalization 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
More informationDBMS. 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
More informationCS 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
More informationDatabase Design Basics
Database Design Basics Table of Contents SOME DATABASE TERMS TO KNOW... 1 WHAT IS GOOD DATABASE DESIGN?... 2 THE DESIGN PROCESS... 2 DETERMINING THE PURPOSE OF YOUR DATABASE... 3 FINDING AND ORGANIZING
More informationDatabase 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
More informationNormalization. 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.
More informationNormalization. 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
More informationDatabase 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
More informationLOGICAL DATABASE DESIGN
MODULE 8 LOGICAL DATABASE DESIGN OBJECTIVE QUESTIONS There are 4 alternative answers to each question. One of them is correct. Pick the correct answer. Do not guess. A key is given at the end of the module
More informationNormalization in Database Design
in Database Design Marek Rychly mrychly@strathmore.edu Strathmore University, @ilabafrica & Brno University of Technology, Faculty of Information Technology Advanced Databases and Enterprise Systems 14
More informationCST221, Dr. Zhen Jiang Normalization & design (see Appendix pages 42-55)
CST221, Dr. Zhen Jiang Normalization & design (see Appendix pages 42-55) Normalization is a process for determining what attributes go into what tables. In order to understand this process, we need to
More informationNormalization. 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
More informationUNDERSTANDING 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
More informationChapter 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
More informationA Simple Guide to Five Normal Forms in Relational Database Theory
William Kent, "A Simple Guide to Five Normal Forms in Relational Database Theory", Communications of the ACM 26(2), Feb. 1983, 120-125. Also IBM Technical Report TR03.159, Aug. 1981. Also presented at
More informationMODULE 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
More informationDATABASE 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
More informationDatabase 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
More informationDATABASE INTRODUCTION
Introduction The history of database system research is one of exceptional productivity and startling economic impact. We have learnt that from the days of file-based systems there are better ways to handle
More informationChapter 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
More informationNormalization. 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
More informationLecture 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
More informationNormalisation 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
More informationUnit 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)
More informationCreating Tables ACCESS. Normalisation Techniques
Creating Tables ACCESS Normalisation Techniques Microsoft ACCESS Creating a Table INTRODUCTION A database is a collection of data or information. Access for Windows allow files to be created, each file
More informationSQL 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
More informationThe 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
More informationExercise 1: Relational Model
Exercise 1: Relational Model 1. Consider the relational database of next relational schema with 3 relations. What are the best possible primary keys in each relation? employ(person_name, street, city)
More informationIntroduction to Computing. Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn
Introduction to Computing Lectured by: Dr. Pham Tran Vu t.v.pham@cse.hcmut.edu.vn Databases The Hierarchy of Data Keys and Attributes The Traditional Approach To Data Management Database A collection of
More informationFiles. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?
Files What s it all about? Information being stored about anything important to the business/individual keeping the files. The simple concepts used in the operation of manual files are often a good guide
More informationMCQs~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
More informationNormalization NORMALIZATION. Primary keys (contd.) Primary keys
Normalization NORMALIZATION R L A Ellis Primary keys and foreign keys Functional dependencies Anomalies and their causes First, second, and third normal forms Examples: sitter database Hardware store database
More informationAnnouncements. 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
More informationB2.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
More informationC 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
More informationThe 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
More information3. Relational Model and Relational Algebra
ECS-165A WQ 11 36 3. Relational Model and Relational Algebra Contents Fundamental Concepts of the Relational Model Integrity Constraints Translation ER schema Relational Database Schema Relational Algebra
More informationSchema Refinement, Functional Dependencies, Normalization
Schema Refinement, Functional Dependencies, Normalization MSCI 346: Database Systems Güneş Aluç, University of Waterloo Spring 2015 MSCI 346: Database Systems Chapter 19 1 / 42 Outline 1 Introduction Design
More informationKNOWLEDGE 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
More informationDatabase Design and Normal Forms
Database Design and Normal Forms Database Design coming up with a good schema is very important How do we characterize the goodness of a schema? If two or more alternative schemas are available how do
More information14 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)
More informationSchema 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
More informationLecture 6. SQL, Logical DB Design
Lecture 6 SQL, Logical DB Design Relational Query Languages A major strength of the relational model: supports simple, powerful querying of data. Queries can be written intuitively, and the DBMS is responsible
More informationOptimum 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
More informationNormalisation and Data Storage Devices
Unit 4 Normalisation and Data Storage Devices Structure 4.1 Introduction 4.2 Functional Dependency 4.3 Normalisation 4.3.1 Why do we Normalize a Relation? 4.3.2 Second Normal Form Relation 4.3.3 Third
More informationStock Take Procedure
Stock Take Procedure Overall Business Processes INVENTORY MANAGEMENT Related Business Process FINANCIAL ACCOUNTING Responsible Department WAREHOUSE Involved Departments ACCOUNTING Last Updated 31/12/2010
More informationCh3 Active Database Systems {1{ Applications of Active Rules Internal to the database: { Integrity constraint maintenance { Support of data derivation (including data replication). Extended functionalities:
More informationCS143 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
More informationNormalisation. 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
More informationWhat is a database? The parts of an Access database
What is a database? Any database is a tool to organize and store pieces of information. A Rolodex is a database. So is a phone book. The main goals of a database designer are to: 1. Make sure the data
More informationDesign 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
More informationChapter 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
More informationRELATIONAL DATABASE DESIGN Good Database Design Principles
Good Database Design Principles 1. no redundancy a field is stored in only one table, unless it happens to be a foreign key replication of foreign keys is permissible, because they allow two tables to
More informationSQL Simple Queries. Chapter 3.1 V3.0. Copyright @ Napier University Dr Gordon Russell
SQL Simple Queries Chapter 3.1 V3.0 Copyright @ Napier University Dr Gordon Russell Introduction SQL is the Structured Query Language It is used to interact with the DBMS SQL can Create Schemas in the
More informationImproving 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
More informationDatabase Design for the Uninitiated CDS Brownbag Series CDS
Database Design for the Uninitiated Paul Litwin FHCRC Collaborative Data Services 1 CDS Brownbag Series This is the ninth in a series of seminars Materials for the series can be downloaded from www.deeptraining.com/fhcrc
More informationnormalisation Goals: Suppose we have a db scheme: is it good? define precise notions of the qualities of a relational database scheme
Goals: Suppose we have a db scheme: is it good? Suppose we have a db scheme derived from an ER diagram: is it good? define precise notions of the qualities of a relational database scheme define algorithms
More informationPhysical Design. Meeting the needs of the users is the gold standard against which we measure our success in creating a database.
Physical Design Physical Database Design (Defined): Process of producing a description of the implementation of the database on secondary storage; it describes the base relations, file organizations, and
More informationThe Relational Model. Ramakrishnan&Gehrke, Chapter 3 CS4320 1
The Relational Model Ramakrishnan&Gehrke, Chapter 3 CS4320 1 Why Study the Relational Model? Most widely used model. Vendors: IBM, Informix, Microsoft, Oracle, Sybase, etc. Legacy systems in older models
More informationCSCI-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) mzahran@cs.nyu.edu http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema At that point we
More informationModule 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
More informationETL Process in Data Warehouse. G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT
ETL Process in Data Warehouse G.Lakshmi Priya & Razia Sultana.A Assistant Professor/IT Outline ETL Extraction Transformation Loading ETL Overview Extraction Transformation Loading ETL To get data out of
More informationwww.dotnetsparkles.wordpress.com
Database Design Considerations Designing a database requires an understanding of both the business functions you want to model and the database concepts and features used to represent those business functions.
More informationSQL, PL/SQL FALL Semester 2013
SQL, PL/SQL FALL Semester 2013 Rana Umer Aziz MSc.IT (London, UK) Contact No. 0335-919 7775 enquire@oeconsultant.co.uk EDUCATION CONSULTANT Contact No. 0335-919 7775, 0321-515 3403 www.oeconsultant.co.uk
More informationChapter 7: Relational Database Design
Chapter 7: Relational Database Design Database System Concepts, 5th Ed. See www.db book.com for conditions on re use Chapter 7: Relational Database Design Features of Good Relational Design Atomic Domains
More informationScheme G. Sample Test Paper-I
Scheme G Sample Test Paper-I Course Name : Computer Engineering Group Course Code : CO/CM/IF/CD/CW Marks : 25 Hours: 1 Hrs. Q.1 Attempt Any THREE. 09 Marks a) List any six applications of DBMS. b) Define
More information6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization
6.830 Lecture 3 9.16.2015 PS1 Due Next Time (Tuesday!) Lab 1 Out today start early! Relational Model Continued, and Schema Design and Normalization Animals(name,age,species,cageno,keptby,feedtime) Keeper(id,name)
More informationFunctional 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
More informationAccess 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
More informationInformation Systems Analysis and Design CSC340. 2004 John Mylopoulos Database Design -- 2. Information Systems Analysis and Design CSC340
XX. Database Design Databases Databases and DBMS Data Models, Hierarchical, Network, Relational Database Design Restructuring an ER schema Performance analysis Analysis of Redundancies, Removing generalizations
More informationThere are five fields or columns, with names and types as shown above.
3 THE RELATIONAL MODEL Exercise 3.1 Define the following terms: relation schema, relational database schema, domain, attribute, attribute domain, relation instance, relation cardinality, andrelation degree.
More informationTopics. Database Essential Concepts. What s s a Good Database System? Using Database Software. Using Database Software. Types of Database Programs
Topics Software V:. Database concepts: records, fields, data types. Relational and objectoriented databases. Computer maintenance and operation: storage health and utilities; back-up strategies; keeping
More informationIT2304: Database Systems 1 (DBS 1)
: Database Systems 1 (DBS 1) (Compulsory) 1. OUTLINE OF SYLLABUS Topic Minimum number of hours Introduction to DBMS 07 Relational Data Model 03 Data manipulation using Relational Algebra 06 Data manipulation
More information