Mappings & Normal Form Guarantees. Can Mappings of Diagrams Yield Normalized Schemas? “Yes”—but only if canonical. Most (?) diagrams are canonical. Mappings.

Slides:



Advertisements
Similar presentations
ER Model For a college DB
Advertisements

Conceptual Design using the Entity-Relationship Model
Schema Refinement: Normal Forms
Database Management Systems, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
Carnegie Mellon Carnegie Mellon Univ. Dept. of Computer Science Database Applications C. Faloutsos Integrity Constraints.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
603 Database Systems Senior Lecturer: Laurie Webster II, M.S.S.E.,M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 6 A First Course in Database Systems.
Functional Dependencies, Normalization Rose-Hulman Institute of Technology Curt Clifton.
NestedRelations: 1 Nested Relations Flat schemas often have replicated data values in their relations. Nested schemas allow us to collapse some of these.
Chapter Design Objectives Obtain the theoretically “best” design (normalize) –Remove redundancy and update anomalies –Remove nulls –Minimize the.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 15 Basics of Functional Dependencies and Normalization for Relational.
XNF: 1 XML and NNF A Standard Form for XML Documents (XNF) Properties –As few hierarchical trees as possible –No redundant data values in any tree Method.
Chapter Abstraction Concrete: directly executable/storable Abstract: not directly executable/storable –automatic translation (as good as executable/storable)
OSM—Normalize Then Map. ER Model Instance Type  RackRate Room Date  Guest Rate Discount Date  Discount Rate = (1 – Discount/100)  RackRate includes.
Normal Form Design addendum by C. Zaniolo. ©Silberschatz, Korth and Sudarshan7.2Database System Concepts Normal Form Design Compute the canonical cover.
Chapter Nested Schemes Flat schemes often have replicated data values. Nested schemes allow us to collapse some of these replicated data values.
Organizing Data Chapter 5. Data Hierachy Table = Entities X Attributes Entities = Records Attributes = Fields.
The Entity-Relationship (ER) Model CS541 Computer Science Department Rutgers University.
XNF-1 XML and NNF A Standard Form for XML Documents (XNF) Properties –As few hierarchical trees as possible –No redundant data values in any tree Method.
OSM & Allegro. OSM Object-oriented Systems Modeling Components: –Object Relationship Model Object sets—lexical and non-lexical Relationship sets Generalization/specialization.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
CostAnalysis: 1 Cost Analysis Rule-of-Thumb Guidelines As a guide, consider denormalizing if: –redundancy is minimal and update anomalies are not expected.
CS 3630 Database Design and Implementation. First Normal Form (1NF) No multi-value attributes Done when mapping E-R model to relational schema DBDL 2.
Chapter Implementation Faithful translation of a design into a target environment Design should be free of target-environment dependencies Should.
Design Algorithm Essentials 1.Combine functional edges with the same tail object set(s) into a scheme. (The tail object set(s) and any others in a 1-1.
MVDs: 1 Join Dependencies—Example Let r = A B C = A B |  | A C 1 a x 1 a 1 x 1 a y 1 b 1 y 1 b x 2 a 2 y 1 b y 2 b 2 a y 2 b y Observe: r =  AB r | 
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Amity School of Engineering & Technology E-R Diagram for a University Enterprise.
Chapter 16 (p481 – 485, ) Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
A Guide to SQL, Eighth Edition Chapter Two Database Design Fundamentals.
ER Diagrams, Data Structure Diagrams and Relationship Types using the Footy Tips Database.
Q1: What is DBMS and explain its architecture. Q2: Explain Data Independence in detail. Q3: What is database user and explain the types of database user.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Chapter 4 Functional Dependencies and Normalization for Relational Databases Copyright © 2004 Pearson Education, Inc.
1 A Guide to MySQL 2 Database Design Fundamentals.
Lecture 1 of Advanced Databases Basic Concepts Instructor: Mr.Ahmed Al Astal.
CSC 411/511: DBMS Design Dr. Nan Wang 1 Schema Refinement and Normal Forms Chapter 19.
Chapter 3: Relational Model  Structure of Relational Databases  Normal forms (chap. 7)  Reduction of an E-R Schema to Relational (Sect. 2.9)  Relational.
1 CS 3630 Database Design and Implementation. 2 Sets Foundation of relational database. Basic Operations Power set Mapping.
CSE314 Database Systems Basics of Functional Dependencies and Normalization for Relational Databases Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E.
An Entity Relationship (ER) Diagram is a graphic that shows the interrelationship between entities in a database.
IST 318 – DB Administration
Functional Dependencies. FarkasCSCE 5202 Reading and Exercises Database Systems- The Complete Book: Chapter 3.1, 3.2, 3.3., 3.4 Following lecture slides.
IST 210 Normalization 2 Todd Bacastow IST 210. Normalization Methods Inspection Closure Functional dependencies are key.
1 Conceptual Design using the Entity- Relationship Model.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
Second Normal Form (2NF) A relation R is in 1NF, and every non-primary-key attribute is fully functionally dependent on the primary key Then R is in 2NF.
Extended ER Mappings & Models. General Principle #1 Graphical representations dictate cardinality relationships among attributes. When graphical representations.
MIS3053 Database Design And Applications The University Of Tulsa Professor: Akhilesh Bajaj Normal Forms Lecture 2 © Akhilesh Bajaj, 2000, 2002, 2003,2004.
Order Database – ER Diagram Prepared by Bryan Borcher Spring 2014.
Chapter 8 Relational Database Design. 2 Relational Database Design: Goals n Reduce data redundancy (undesirable replication of data values) n Minimize.
EDIT WP5 Internet Platform for Cybertaxonomy Data Modelling on UML Basis Gubányi A.-Kiss, V.-Kilián, I. (Hungarian Natural History Museum) Meeting: HNHM.
5 1 Normalization of Database Tables. 5 2 Database Tables and Normalization Normalization –Process for evaluating and correcting table structures to minimize.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
1 CSC 1035 Supplement for Chapter 2 Functional Dependencies.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 The Entity-Relationship Model Chapter 2.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Order Database – ER Diagram
Order Database – ER Diagram
SEEM3430: Information Systems Analysis and Design
Lecture 4 Database design IV Normal Forms: Summary.
Order Database – ER Diagram
Order Database – ER Diagram
Order Database – ER Diagram
IST 318 Database Administration
Order Database – ER Diagram
Order Database – ER Diagram
Relationships among FDs and ERDs.
MIS2502: Data Analytics Relational Data Modeling 3
Presentation transcript:

Mappings & Normal Form Guarantees

Can Mappings of Diagrams Yield Normalized Schemas? “Yes”—but only if canonical. Most (?) diagrams are canonical. Mappings created to make this so. Many argue that if a conceptual-model diagram is not canonical, it is not a good quality diagram.

Canonical ER Diagrams Attributes atomic No FDs among attributes (except when the lhs is a key for an entity or relationship set) Non-binary relationship sets fully reduced No redundant relationship sets “such that the mapping yields a normalized schema”

Non-Canonical ER Diagram Type  RackRate RoomNr Date  GuestNr Rate Discount Date  Discount Rate = (1 – Discount/100)  RackRate Includes =  Package,Description (Has |  | IsSignedUpFor) IsSignedUpFor =  GuestNr,Description (Has |  | Includes) HasReservationFor = |  |(Package GuestNr, GuestNr Description, RoomNr Date GuestNr Discount Rate) includes has Room RoomNr Rate has reservation for Guest is signed up for Activity Name Description Duration Date NrInParty Type Rack Rate Discount PackageDeal GuestNr Package not atomic FD among attributes not reduced redundant relationship set

Map—Then Normalize Not 1NF: Name not atomic Not 2NF: Date  Discount Not 3NF: Type  RackRate Not PJNF: |  |(Package GuestNr, GuestNr Description, RoomNr Date GuestNr Rate Discount) Room(RoomNr, Type, RackRate) Guest(GuestNr, Name, NrInParty, Package) Activity(Description, Duration) HasReservationFor(RoomNr, Date, GuestNr, Rate, Discount, Package, Description) IsSignedUpFor(GuestNr, Description) Includes(Package, Description)

Map—Then Normalize Not 1NF: Name not atomic Not 2NF: Date  Discount Not 3NF: Type  RackRate Not PJNF: |  |(Package GuestNr, GuestNr Description, RoomNr Date GuestNr Rate Discount) Room(RoomNr, Type) RoomType(Type, RackRate) Guest(GuestNr, FirstName, LastName, NrInParty, Package) Activity(Description, Duration) HasReservationFor(RoomNr, Date, GuestNr, Rate) DateDiscount(Date, Discount) Includes(Package, Description) redundant: subsumed in Guest |  | Includes

Normalize—Then Map Type  RackRate RoomNr Date  GuestNr Rate Discount Date  Discount Rate = (1 – Discount/100)  RackRate Includes =  Package,Description (Has |  | IsSignedUpFor) IsSignedUpFor =  GuestNr,Description (Has |  | Includes) HasReservationFor = |  |(Package GuestNr, GuestNr Description, RoomNr Date GuestNr Discount Rate) includes has Room RoomNr Rate has reservation for Guest is signed up for Activity Name Description Duration Date NrInParty Type Rack Rate Discount PackageDeal GuestNr Package not atomic FD among attributes not reduced redundant relationship set Fix the problems in the diagram, then map.

Normalize—Then Map RoomNr Date  GuestNr Rate Rate = (1 – Discount/100)  RackRate includes has Room RoomNr Rate has reservation for Guest Activity Name Description Duration Date NrInParty Rack Rate Discount PackageDeal GuestNr Package has Room Type Type Date Discount LastNameFirstName

Normalize—Then Map RoomNr Date  GuestNr Rate Rate = (1 – Discount/100)  RackRate includes has Room RoomNr Rate has reservation for Guest Activity Name Description Duration Date NrInParty Rack Rate Discount PackageDeal GuestNr Package has Room Type Type Date Discount LastNameFirstName Room(RoomNr, Type) RoomType(Type, RackRate) Guest(GuestNr, FirstName, LastName, NrInParty, Package) Activity(Description, Duration) DateDiscount(Date, Discount) HasReservationFor(RoomNr, Date, GuestNr, Rate) Includes(Package, Description)