Chapter Six Professor Adams’ Slides. Note that entities are shadowed, tables are not. Note that entities have no physical existence (blueprint) Note.

Slides:



Advertisements
Similar presentations
Designing tables from a data model (Chapter 6) One base table for each entity.
Advertisements

Fundamentals, Design, and Implementation, 9/e Chapter 8 Database Redesign.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Database Systems: Design, Implementation, and Management Tenth Edition
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
System Analysis - Data Modeling
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 9.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke Database Processing Chapter 6 Transforming Data.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 10.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 8.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 10.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 COS 346 Day 7.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 8-1 COS 346 Day 17.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming ER Models into Database.
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming ER Models into Database.
Transforming Data Models into Database Designs
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
Database Design.  Define a table for each entity  Give the table the same name as the entity  Make the primary key the same as the identifier of the.
Entity-Relationship modeling Transparencies
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
Chapter 4 The Relational Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 5-1 Chapter Objectives Learn how to transform E-R data models into relational.
Chapter 5 Entity–Relationship Modeling
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
Database Design IST210 Class Lecture
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Slide Chapter 5 The Relational Data Model and Relational Database Constraints.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 8/1 Copyright © 2004 Please……. No Food Or Drink in the class.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Gegevens Analyse Les 5: van ERD naar DSD.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
1 SY306: Web and Databases for Cyber Operations Slide Set: 11 Databases - Relational Model.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
Mapping ER to Relational Model Each strong entity set becomes a table. Each weak entity set also becomes a table by adding primary key of owner entity.
Chapter 3 The Relational Model. Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between mathematical.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
Lecture # 24 Introduction to SQL Muhammad Emran Database Systems.
Database Design I IST 210: Organization of Data IST2101.
Chapter Six: Transforming Data Models into Database Designs 6-1.
Logical Database Design and the Rational Model
Chapter 5 Database Design
Chapter 4: Logical Database Design and the Relational Model
Transforming Data Models
Chapter 4: Part B Logical Database Design and the Relational Model
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
COS 346 Day 8.
Transforming Data Models into Database Designs
Database Processing: David M. Kroenke’s Chapter Six:
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Processing: David M. Kroenke’s Chapter Six:
Database Processing: David M. Kroenke’s Chapter Six:
Database Processing: David M. Kroenke’s Chapter Six:
Presentation transcript:

Chapter Six Professor Adams’ Slides

Note that entities are shadowed, tables are not. Note that entities have no physical existence (blueprint) Note the use of the key symbol to indicate the primary key

Surrogate Keys A surrogate key is a DBMS-supplied identifier of each row in a table Surrogate keys are unique and they never change Surrogate keys are assigned when row is created and destroyed when row is deleted. Surrogate key values are “the best” primary keys because they are designed to be short, numeric, and fixed They are necessary when there is not obvious primary key, or when the rows are not unique.

Surrogate Key Disadvantages Their values have no meaning to the user Another disadvantage arises when data are shared among different databases. (see description of problems on page 173)

Candidate (alternate) keys There is no difference between the terms candidate key and alternate key The image shows a notation for specifying alternate keys.

Column Properties – Null Status Null status –Can a column have a null value or not –Null means null values are allowed (not that values are null) –See (BTW) on p. 175 Data type Default value Data Constraints

Column Properties – data type Null status Data type –Each DBMS has different data types money vs currency date vs datetime –Some SQL Server data types –Generic specifications CHAR(n), VARCHAR(n), DATE, TIME, MONEY, INTEGER,DECIMAL Default value Data Constraints

Specify Column Properties: SQL Server Data Types

Specify Column Properties: Oracle Data Types

Column Properties – Default value Null status Data type Default value –A default value is a value supplied by the DBMS when a new row is created. –constant, string, function result –May be supplied by a trigger Data Constraints

Column Properties – Data constraints Null status Data type Default value Data Constraints –Domain constraints Limit column values to a particular set of values –Range constraints Limit values to a particular interval of values –Interrelation constraints Limit a column’s values in comparison with other columns in the same or other tables

Verify Normalization Are the tables in Boyce-Codd normal form? –Is every determinant in every relation a candidate key? –Does every determinant uniquely determine a row? Have all multi-valued dependencies been removed? –Is there still a condition in any relation with three or more attributes in which independent attributes appear to have relationship they do not have?

Relationships Strong Relationships 1:1 1:N N:M ID-Dependent Entities Mixed Entity Relationships Subtype Relationships Recursive Relationships 1:1 1:N N:M Ternary & Higher Order Relationships

1:1 Strong Entity Relationships Place the key of one entity in the other entity as a foreign key: –Either design will work – no parent, no child –Minimum cardinality considerations may be important: O-M will require a different design that M-O, and One design will be very preferable

Choice we made ClubMember(MemberNumber, , phone, LockerNumber) Locker(LockerNumber, LockerRoom, LockerSize)

1:N Strong Entity Relationships Place the primary key of the table on the one side of the relationship into the table on the many side of the relationship as the foreign key (foreign key doesn’t have to be unique) The one side is the parent table and the many side is the child table, so “Place the key of the parent in the child”

N:M Strong Entity Relationships In an N:M strong entity relationship there is no place for the foreign key in either table: –A COMPANY may supply many PARTs –A PART may be supplied by many COMPANYs

N:M Strong Entity Relationships Create an intersection table