E-R DIAGRAMS TO RELATIONAL SCHEMA

Slides:



Advertisements
Similar presentations
WHAT D IS RAW, UNPROCESSED FACTS AND FIGURES COLLECTED, STORED AND PROCESSED BY COMPUTERS.
Advertisements

1 Assignment 4 Map entities with relationships to relational schemas. Use DBDL to describe the table schemas.
Mapping an ERD to a Relational Database To map an ERD to a relational database, five rules are defined to govern how tables are constructed. 1)Rule for.
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 6 Database Design Using Entity- Relationship Models.
Database Architecture The Relational Database Model.
Lecture 3 The Relational DB Model. Learning Objectives That the relational database model takes a logical view of data That the relational model’s basic.
DATA MODELING AND DATABASE DESIGN
What we’ve learnt Doc 5.69 Doc 5.70 Section 1-3. A simple database Related objects Tables hold the data Forms, reports, queries to access the data.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
ER/EER to Relational Mapping Chapter 9. STEP 1 ENTITY TYPE E (non weak) -> NEW RELATION T RELATION T: – includes all simple attributes (non composite,
Week 7-8 DBMS ER-Relational Mapping. ER-Relational Mapping.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 5 (Part a): Logical Database Design and the Relational Model Modern Database Management.
Howard Paul. Sequential Access Index Files and Data File Random Access.
CHAPTER 2 : RELATIONAL DATA MODEL Prepared by : nbs.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Relational Data Model and Relational Database Constraints تنبيه.
Transformation of an ER Model into a Relational Database Schema Translating to Software.
PRJ566 : Project Planning and Management Converting Class Diagram to Relational Schema.
Database Design Chapters 17 and 18.
Order Database – ER Diagram
CSIS 115 Database Design and Applications for Business
Relational Database Design by ER- and ERR-to-Relational Mapping
Tables & Relationships
Relational Database Design by ER- and EER-to- Relational Mapping
Revised: 2 April 2004 Fred Swartz
Databases – Exam questions
Tables and Their Characteristics
Database Design – Lecture 4
Relational Database Design by ER- and EERR-to-Relational Mapping
Relational Database Design by ER-to-Relational Mapping
INF385T: Information Modeling — Class 11 Relational Database Design from ER Models Presented November 2 Karen Wickett,
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
Order Database – ER Diagram
Design a Relational Database Identify Database Purpose
Lecture # 13 (After 1st Exam)
Chapter 5 STUDENT-COURSE
Assignment 4 Map entities with relationships to relational schemas.
Constraints AND Examples
Chapter (9) ER and EER-to-Relational Mapping, and other Relational Languages Objectives How a relational database schema can be created from a conceptual.
Implementation of Entity Relationships
OO models with relational databases
Figure Specialization Hierarchy
Entity Relationships and Normalization
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Order Database – ER Diagram
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 4 The Relational Model Pearson Education © 2009.
CS4222 Principles of Database System
Foreign key (FK) is defined as follows:
Session 2 Welcome: The seventh learning sequence
CS 3630 Database Design and Implementation
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
The Relational Model Transparencies
Database Design Chapters 17 and 18.
Relational Database Design by ER- and EER-to-Relational Mapping
Database Design and Development
Database Design and Development
Chengyu Sun California State University, Los Angeles
CMPE/SE 131 Software Engineering March 9 Class Meeting
DBMS ER-Relational Mapping
Relationship Problems—Topics
Mapping an ERD to a Relational Database
Constraints AND Examples
Chapter (7) ER-to-Relational Mapping, and other Relational Languages
Practice makes perfect!
Mapping an ERD to a Relational Database
Summary of Transformation Rules
Chapter 3 The Relational Model
Relational Database Design by ER-to-Relational Mapping
Presentation transcript:

E-R DIAGRAMS TO RELATIONAL SCHEMA

Three Rules For each entity create a table; include the attributes of the entity as fields of the table; be sure to designate a primary key. For each (1:M) relation take the PK from the one-side table and embed it in the many-side table and designate it as a foreign key. For each (M:N) relation create a new table. The PK’s of the two table involved in the relation should be made fields of this table and their combination may be the PK of the new table. In addition each of those PK’s are FK’s pointing at the corresponding tables from which they came. Appropriate other attributes may be included in this table.

(1:M) Relation E1 A1a A1b E2 A2a A2b t1 C1a PK C1b t2 C2a PK C2b C1a FK C1a C1b 1 Phillies 2 Eagles C2a C2b C1a 1 Mike 2 Chooch 3 Doc

(N:M) Relation E1 A1a A1b E2 A2a A2b t1_t2 C1a PK FK C2a PK FK t2 C2b t1 C1a PK C1b C1a C2a 1 2 3 C2a C2b 1 CSC240-21 2 HIS201-01 3 MTH120-12 C1a C1b 1 John 2 Mary