Gegevens Analyse Les 5: van ERD naar DSD.

Slides:



Advertisements
Similar presentations
Convert ER to Relational Database Entity relation Entity relation Attributes attributes Attributes attributes Primary key primary key Primary key primary.
Advertisements

Database Lecture Notes Mapping ER Diagrams to Tables 2 Dr. Meg Murray
(wrapping up from last week)
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 David M. Kroenke’s Chapter Three: The Relational Model and Normalization.
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 6-1 COS 346 Day 7.
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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 Strong Entity Patterns: 1:1 Strong Entity Relationships.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
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.
Database – Part 2a Dr. V.T. Raja Oregon State University.
Transforming Data Models into Database Designs
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.
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 Six Professor Adams’ Slides. Note that entities are shadowed, tables are not. Note that entities have no physical existence (blueprint) Note.
DATABASE DESIGN I IST 210: Organization of Data IST210 1.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
David M. Kroenke and David J. Auer Database Processing: F undamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
Database Design Using Entity-Relationship Models Transformation of Entity-Relationship Models into Relational Database Design Trees, Networks, and Bills.
Database Design IST210 Class Lecture
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Data Modeling IST210 Class Lecture.
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.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
The Relational Model J.G. Zheng Jan 2010 CIS 8040 Database Management Systems.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Relational Theory and Design
Gegevens Analyse Les 3: Normaliseren. Chapter Premise We have received one or more tables of existing data The data is to be stored in a new database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 3-1 What Makes Determinant Values Unique? A determinant is unique in.
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.
1 SY306: Web and Databases for Cyber Operations Slide Set: 11 Databases - Relational Model.
Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
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.
FEN Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Six: Transforming Data Models into Database Designs.
Database vs File System Integrated Data Reduced Data Duplication Program/Data Independence Easier representation for user Separate/Isolated data Appl.
Database Design I IST 210: Organization of Data IST2101.
Chapter Six: Transforming Data Models into Database Designs 6-1.
Chapter 5 Database Design
Chapter 4: Logical Database Design and the Relational Model
Transforming Data Models
IST 210: Organization of Data
Database Design – Lecture 4
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:
Database Processing: David M. Kroenke’s Chapter Three:
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Processing: David M. Kroenke’s Chapter Six:
Copyright © 2018, 2015, 20 Pearson Education, Inc. All Rights Reserved Database Concepts Eighth Edition Chapter # 2 The Relational Model.
Database Processing: David M. Kroenke’s Chapter Six:
Database Processing: David M. Kroenke’s Chapter Six:
Presentation transcript:

Gegevens Analyse Les 5: van ERD naar DSD

Steps for Transforming a Data Model into a Database Design

Create a Table for Each Entity EMPLOYEE (EmployeeNumber, EmployeeName, Phone, Email, HireDate, ReviewDate, EmpCode) Primary key is designated by key symbol Note shadowless table

Select the Primary Key The ideal primary key is short, numeric and fixed Surrogate keys meet the ideal, but have no meaning to users

Specify Column Properties: Null Status Null status indicates whether or not the value of the column can be NULL Begin intermezzo: Deze stof wordt verder behandeld in vervolgvakken.

Specify Column Properties: Data Type Generic Data Types: CHAR(n) VARCHAR(n) DATE TIME MONEY INTEGER DECIMAL

Specify Column Properties: SQL Server Data Types Einde intermezzo.

Verify Normalization The tables should be normalized based on the data model Verify that all tables are: BCNF 4NF Wij hebben dit al gedaan!

Create 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

Create Relationships: 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 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”

Create Relationships: 1:N Strong Entity Relationships

Create Relationships: 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

Create Relationships: N:M Strong Entity Relationships The solution is to create an intersection table that stores data about the corresponding rows from each entity The intersection table consists only of the primary keys of each table which form a composite primary key Each table’s primary key becomes a foreign key linking back to that table COMPANY_PART_INT (CompanyName, PartNumber)

Create Relationships: N:M Strong Entity Relationships COMPANY_PART_INT (CompanyName, PartNumber) FIG 6.10

Relationships Using ID-Dependent Entities: Association Relationships An intersection table: Holds the relationships between two strong entities in an N:M relationship Contains only the primary keys of the two entities: As a composite primary key As foreign keys An association table: Has all the characteristics of an intersection table PLUS it has one or more columns of attributes specific to the associations of the other two entities

Relationships Using ID-Dependent Entities: Association Relationships QUOTATION (CompanyName, PartNumber, Price)

Relationships Using ID-Dependent Entities: Multivaled (meerwaardige) Attributes As a data model As a set of tables

Relationships Using ID-Dependent Entities: Archetype/Instance Pattern As a data model As a set of tables

Relationships Using Weak Entities: Archetype/Instance Pattern As a data model As a set of tables