Conceptual and Logical Design

Size: px
Start display at page:

Download "Conceptual and Logical Design"

Transcription

1 Introduction to Database Systes Mapping ER Models to Relational Scheas Werner Nutt Conceptual and Logical Design Conceptual Model: PRODUCT BUYS PERSON price ssn Relational Model: 2

2 Mapping an E-R Diagra to a Relational Schea We cannot store date in an ER schea (there are no ER database anageent systes) We have to translate our ER schea into a relational schea What does translation ean? 3 Translation: Principles Maps ER scheas to relational scheas ER instances to relational instances Ideally, the apping should be one-to-one in both directions not lose any inforation Difficulties: what to do with ER-instances that have identical attribute values, but consist of different entities? in which way do we want to preserve inforation? 4

3 Mapping Entity Types to Relations For every entity type create a relation Every atoic attribute of the entity type becoes a relation attribute Coposite attributes: include all the atoic attributes Derived attributes are not included (but reeber their derivation rules) Relation instances are subsets of the cross product of the doains of the attributes Attributes of the entity key ake up the priary key of the relation faily no. of students courseno equip COURSE subject 5 Mapping Entity Types to Relations (cntd.) faily no. of students courseno equip COURSE subject (,, faily) COURSE (courseno, subject, equip) 6

4 Mapping Many:any Relationship Types to Relations Create a relation with the following set of attributes: priary keys of each entity type participating in the relationship N (degree of relationship) U priary_key(e i ) U {a,,a M } i= attributes of the relationship type (if any) faily labark no. of students courseno equip ENROLLED COURSE exaark subject 7 Mapping Many:any Relationship Types to Relations (cntd.) faily labark no. of students courseno equip ENROLLED COURSE exaark subject ENROL(, courseno, labark, exaark) Foreign Key ENROL() references () Foreign Key ENROL(courseno) references COURSE(courseno) 8

5 Mapping Many:one Relationship Types to Relations faily slot roono TUTOR Idea: Post the priary key Given E at the any end of relationship and E2 at the one end of the relationship, add inforation to the relation for E The priary key of the entity at the one end (the deterined entity) becoes a foreign key in the entity at the any end (the deterining entity). Include any relationship attributes with the foreign key entity E U priary_key(e2) U {a,,a n } relation for entity E priary key for E2, is now a foreign key to E2 attributes on the relationship type (if any) 9 Mapping Many:one Relationship Types to Relations: Exaple faily slot roono TUTOR The relation (,, faily) is extended to (,, faily, tutor, roono, slot) and the constraint Foreign Key (tutor,roono) references (,roono) 0

6 Mapping one:any Relationship Types to Relations (cntd.) faily tutor roono slot s fred jones bush B s2 ary brown kahn IT206 2B s3 sue sith goble A s4 fred bloggs goble 2.82 A s5 peter jones zobel B s6 jill peters kahn IT206 2A roono kahn IT206 bush 2.26 goble 2.82 zobel 2.34 watson IT22 woods IT204 capon A4 lindsey 2.0 barringer 2.25 Mapping One:any Relationship Types to Relations (cntd.) faily slot roono TUTOR Another Idea: If the relationship type is optional to both entity types, and an instance of the relationship is rare, and there are any attributes on the relationship then create a new relation with the set of attributes: priary_key(e) U priary_key(e2) U {a,,a } priary key for E, is now a foreign key to E; also the PK for this relation priary key for E2, is now a foreign key to E2 attributes on the relationship type (if any) 2

7 Mapping One:any Relationship Types to Relations (cntd.) faily slot roono TUTOR TUTOR(, staff, rono, slot) and Copare with the apping of any:any relationship types! Foreign key TUTOR() references () Foreign key TUTOR(staff, roono) references (, roono) 3 Mapping One:any Relationship Types to Relations (cntd.) faily s fred jones s2 ary brown s3 sue sith s4 fred bloggs s5 peter jones s6 jill peters TUTOR tutor roono slot s bush B s2 kahn IT206 2B s3 goble A s4 goble 2.82 A s5 zobel B s6 kahn IT206 2A roono kahn IT206 bush 2.26 goble 2.82 zobel 2.34 watson IT22 woods IT204 capon A4 lindsey 2.0 barringer

8 Optional Participation of the Deterined Entity ( one end ) A student entity instance ust participate in a relationship instance of REG A school entity instance need not participate in a relationship instance of REG faily hons faculty REG SCHOOL SCHOOL (hons, faculty) (,, faily,??? ) 5 Optional Participation of the Deterined Entity faily hons s fred jones ca s2 ary brown cis s3 sue sith cs s4 fred bloggs ca s5 peter jones cs s6 jill peters ca SCHOOL hons faculty ac accountancy is inforation systes cs coputer science ce coputer science i edicine a atheatics hons can t be NULL because it is andatory for a student to be registered for a school not null constraint No student is registered for i, so i doesn t occur as a foreign key value (but that s no proble) 6

9 Optional Participation of the Deterinant Entity ( any end ) faily slot roono TUTOR A student entity instance need not participate in a relationship instance of TUTOR A staff entity instance ust participate in a relationship instance of TUTOR 7 Optional Participation of the Deterinant Entity. (,, faily, tutor, roono, slot) (, roono) Integrity constraint: π,roono \ π tutor,roono = 2. (,, faily) (, roono) TUTOR(, tutor, roono, slot) Do we also need an integrity constraint? 8

10 Optional Participation of the Deterinant Entity (cntd.) faily tutor roono slot s fred jones bush B s2 ary brown kahn IT206 2B s3 sue sith goble A s4 fred bloggs goble 2.82 A s5 peter jones zobel B s6 jill peters kahn IT206 2A roono kahn IT206 bush 2.26 goble 2.82 zobel 2.34 watson IT22 woods IT204 capon A4 lindsey 2.0 barringer Mapping One:one Relationship Types to Relations year roono YEAR YEARTUTOR Post the priary key of one of the entity types into the other entity type as a foreign key, including any relationship attributes with it or Merge the entity types together Which constraint holds in this case? YEAR year yeartutor zobel 2 bush 3 capon roono year kahn IT206 NULL bush goble 2.82 NULL zobel 2.34 watson IT22 NULL woods IT204 NULL capon A4 3 lindsey 2.0 NULL barringer 2.25 NULL 20

11 Multi-Valued Attributes For each ulti-valued attribute of E i, create a relation with the attributes priary_key(e i ) U ulti-valued attribute The priary key coprises all attributes faily faily s fred jones s2 ary brown contact _CONTACT contact s Mr. Jones s Mrs Jones s2 Bill Brown s2 Mrs Jones s2 Billy-Jo Woods 2 Mapping Roles and Recursive Relationships roono appraiser appraisee APPRAISAL How can the entity appear in both of its roles? (, roono, appraiser, approono ) 22

12 Multiple Relationships between Entity Types. Treat each relationship type separately 2. Represent distinct relationships by different foreign keys drawing on the sae relation SUPERVISE faily roono EXAMINE (, roono) (,, faily,??? ) (,, faily,??? ) EXAMINER(??? ) SUPERVISOR(??? ) EXAMINER-SUPERVISOR(??? ) 23 Non-binary Relationship roono faily p TUTORS slot courseno equip n COURSE subject COURSE(courseno, subject, equip) (,, faily) (staff, roono) TUTORS(??? ) 24

13 Weak Entities Strong entity type Identifying entity for ORDER Identifying entity for LINE_ITEM CUSTOMER CUST-ORDER c- address Weak entity type Identifying entity for LINE_ITEM ORDER orderid date ORDER-MAKEUP Weak entity type LINE_ ITEM lineno quantity 25 Mapping Weak Entities to Relations Create a relation with the attributes: n priary_key(e 0 ) U U discriinator(e i ) U {a,,a n } i= Priary key of identifying strong entity type Discriinators of identifying weak entity types Attributes of the weak entity type CUSTOMER c- address CUST-ORDER ORDER orderid date 26

14 Association Entity Types An entity type that represents a relationship type: faily courseno equip COURSE subject STUD_ENROL ENROL COURSE_ENROL labark exaark 27 Association Entity Types We have: COURSE(courseno, subject, equip) (,, faily) faily courseno equip COURSE subject STUD_ENROL ENROL COURSE_ENROL labark exaark Then: ENROL(courseno,, labark, exaark) 28

15 Translation of the University Diagra faily REG hons SCHOOL faculty (,, faily, hons, tutor, tutorroo, slot, year) labark YEARREG year YEAR ENROL(, courseno, labark,exaark) ENROL TUTOR COURSE(courseno, subject, equip) exaark courseno subject n COURSE equip slot TEACH YEARTUTOR n roono appraisee appraiser APPRAISAL (lecturer,roono, appraiser, approo) TEACH(courseno, lecturer,lecroo ) YEAR(year, yeartutor, yeartutorroo) SCHOOL(hons, faculty) 29 Exercise: Supervision of PhD Students A database needs to be developed that keeps track of PhD students: For each student store the and atriculation nuber. Matriculation nubers are unique. Each student has exactly one address. An address consists of street, town and post code, and is uniquely identified by this inforation. For each lecturer store the, staff ID and office nuber. Staff ID's are unique. Each student has exactly one supervisor. A staff eber ay supervise a nuber of students. The date when supervision began also needs to be stored. 30

16 Exercise: Supervision of PhD Students For each research topic store the title and a short description. Titles are unique. Each student can be supervised in only one research topic, though topics that are currently not assigned also need to be stored in the database. Tasks: a) Design an entity relationship diagra that covers the requireents above. Do not forget to include cardinality and participation constraints. b) Based on the ER-diagra fro above, develop a relational database schea. List tables with their attributes. Identify keys and foreign keys. 3 Translating of Hierarchies: Options To store inforation about these classes, We have to define appropriate relations. faily For each relation, we have to define: set of attributes priary key In principle, there are three options: year d thesis title UNDERGRADUATE POSTGRADUATE A. Create a relation for each entity type in the schea, i.e., for both, superclass and subclasses B. Create only relations for subclasses C. Create only one relation, for the superclass 32

17 Translation into Relations: Option A. Create a relation for the superclass 2. For each subclass, create a relation over the set of attributes priary_key(superclass) U attributes of subclass The key for each subclass relation is: priary_key(superclass) Inclusion constraint (foreign keys): π key (superclass) π key (subclass i ) Covering constraint ( n = nuber of subclasses): n U π key (subclass i ) π key (superclass) i= Disjointness constraint: π key (subclas s i ) π key (subclass j ) = for i j year UNDERGRADUATE faily d thesis title POSTGRADUATE 33 Translation into Relations: Option B Create only relations for subclasses. Each subclass becoes a relation over the set of attributes: attributes of superclass U attributes of subclass The key for each subclass relation is: priary_key(superclass) Works only if coverage is total and disjoint Partial coverage: entities that are not in a subclass are lost faily Overlapping classes: redundancy Recovery of the superclass: OUTER UNION on the subclass relations year d thesis title In SQL: UNION JOIN, Outer join on the coon attributes UNDERGRADUATE POSTGRADUATE 34

18 Translation into Relations: Option C Create a single relation over the set of attributes n attributes of superclass U attributes of subclass i U { class } i= The key is: priary_key(superclass) faily Drawback: any not-applicable nulls Benefit: No need for joins Disjoint coverage: one attribute class which indicates the subclass the tuple represents Overlapping coverage: class has to represent a set of classes Partial coverage: class is null entity is fro superclass year UNDERGRADUATE d thesis title POSTGRADUATE 35 Applying the Three Translations (Overlapping Coverage) payroll no A. (payrollno,, lengthofservice) ACADEMIC(payrollno, level) TECHNICAL(payrollno, project) ADMIN(payrollno, grade) length of service level o ACADEMIC TECHNICAL project grade ADMIN B. ACADEMIC(payrollno,, lengthofservice, level) TECHNICAL(payrollno,, lengthofservice, project) ADMIN(payrollno,, lengthofservice, grade) C. (payrollno,, lengthofservice, level, project, grade, class, class2, class3) or (payrollno,, lengthofservice, level, project, grade, class) 36 class = powerset of classes

19 Specialisation Lattice with Shared Subclass payroll no Staff dept d no_hours title d task Manager salary Hourly Staff Acadeic Technical Adin Salaried Staff expertise phone Adin Manager Exercise: For each of the approaches A, B, C, decide Which tables need to be created? Which are the attributes? And which are their possible values? 37 References In preparing these slides I have used several sources. The ain ones are the following: Books: A First Course in Database Systes, by J. Ullan and J. Wido Fundaentals of Database Systes, by R. Elasri and S. Navathe Slides fro Database courses held by the following people: Enrico Franconi (Free University of Bozen-Bolzano) Carol Goble and Ian Horrocks (University of Manchester) 38

CS530 Database Architecture Models. Database Model. Prof. Ian HORROCKS. Dr. Robert STEVENS. and Design The Relational

CS530 Database Architecture Models. Database Model. Prof. Ian HORROCKS. Dr. Robert STEVENS. and Design The Relational 02 - The Relational Database Model CS530 Database Architecture Models and Design Prof. Ian HORROCKS Dr. Robert STEVENS In this Section Topics Covered The basics of the relational model in the context of

More information

Introduction to Database Systems. The Relational Data Model

Introduction to Database Systems. The Relational Data Model Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different

More information

Introduction to Database Systems. The Relational Data Model. Werner Nutt

Introduction to Database Systems. The Relational Data Model. Werner Nutt Introduction to Database Systems The Relational Data Model Werner Nutt 1 4. The Relational Data Model 4.1 Schemas 1. Schemas 2. Instances 3. Integrity Constraints 2 Different Schemas are Based on Different

More information

Two hours UNIVERSITY OF MANCHESTER. January Answer any THREE questions. Answer each question in a separate book

Two hours UNIVERSITY OF MANCHESTER. January Answer any THREE questions. Answer each question in a separate book Two hours UNIVERSITY OF MANCHESTER Database Architecture Models and Design January 2004 Answer any THREE questions Answer each question in a separate book The use of electronic calculators is not peritted.

More information

a) Figure 1 shows a small part of an Extended-Entity-Relationship model describing the personnel department of a research company.

a) Figure 1 shows a small part of an Extended-Entity-Relationship model describing the personnel department of a research company. a) Figure shows a sall part of an Extended-Entity-Relationship odel describing the personnel departent of a research copany. GivenNae FailyNae relationship telephone NInuber NextOfKin contact Eployee d

More information

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7

Ch 9: Mapping EER to Relational. Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7 Ch 9: Mapping EER to Relational Follow a seven-step algorithm to convert the basic ER model constructs into relations steps 1-7 Additional steps for EER model for specialization/generalization steps 8a

More information

ER to Relational Mapping

ER to Relational Mapping ER to Relational Mapping 1 / 19 ER to Relational Mapping Step 1: Strong Entities Step 2: Weak Entities Step 3: Binary 1:1 Relationships Step 4: Binary 1:N Relationships Step 5: Binary M:N Relationships

More information

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model

Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model Chapter 9: Relational DB Design byer/eer to Relational Mapping Relational Database Design Using ER-to- Relational Mapping Mapping EER Model Constructs to Relations Relational Database Design by ER- and

More information

CS 338 The Enhanced Entity-Relationship (EER) Model

CS 338 The Enhanced Entity-Relationship (EER) Model CS 338 The Enhanced Entity-Relationship (EER) Model Bojana Bislimovska Spring 2017 Major research Outline EER model overview Subclasses, superclasses and inheritance Specialization and generalization Modeling

More information

Entity Relationship Data Model. Slides by: Shree Jaswal

Entity Relationship Data Model. Slides by: Shree Jaswal Entity Relationship Data Model Slides by: Shree Jaswal Topics: Conceptual Modeling of a database, The Entity-Relationship (ER) Model, Entity Types, Entity Sets, Attributes, and Keys, Relationship Types,

More information

CMP-3440 Database Systems

CMP-3440 Database Systems CMP-3440 Database Systems Database Architecture Lecture 02 zain 1 Database Design Process Application 1 Conceptual requirements Application 1 External Model Application 2 Application 3 Application 4 External

More information

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1 CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #5: Entity/Relational Models---Part 1 E/R: NOT IN BOOK! IMPORTANT: Follow only lecture slides for this topic! Differences

More information

Conceptual Modeling in ER and UML

Conceptual Modeling in ER and UML Courses B0B36DBS, A7B36DBS: Database Systems Practical Classes 01 and 02: Conceptual Modeling in ER and UML Martin Svoboda 21. and 28. 2. 2017 Faculty of Electrical Engineering, Czech Technical University

More information

Conceptual Data Modeling

Conceptual Data Modeling Conceptual Data odeling A data model is a way to describe the structure of the data. In models that are implemented it includes a set of operations that manipulate the data. A Data odel is a combination

More information

Chapter 17. Methodology Logical Database Design for the Relational Model

Chapter 17. Methodology Logical Database Design for the Relational Model Chapter 17 Methodology Logical Database Design for the Relational Model Chapter 17 - Objectives How to derive a set of relations from a conceptual data model. How to validate these relations using the

More information

SVY2001: Databases for GIS

SVY2001: Databases for GIS SVY200: Databases for GIS Lecture 0: From ER & EER odels to Relation Scheme. Dr Stuart Barr School of Civil Engineering & Geosciences University of Newcastle upon Tyne. Email: S.L.Barr@ncl.ac.uk Lecture

More information

Lecture3: Data Modeling Using the Entity-Relationship Model.

Lecture3: Data Modeling Using the Entity-Relationship Model. College of Computer and Information Sciences - Information Systems Dept. Lecture3: Data Modeling Using the Entity-Relationship Model. Ref. Chapter12 Prepared by L. Nouf Almujally & Aisha AlArfaj Rev. by

More information

Chapter 2 ENTITY RELATIONSHIP MODEL

Chapter 2 ENTITY RELATIONSHIP MODEL INTRODUCTION Chapter 2 ENTITY RELATIONSHIP MODEL Data model is used to describe data, data relationship and constraints on data. A number of different data models have proposed. They can broadly be classified

More information

MIS Database Systems Entity-Relationship Model.

MIS Database Systems Entity-Relationship Model. MIS 335 - Database Systems Entity-Relationship Model http://www.mis.boun.edu.tr/durahim/ Ahmet Onur Durahim Learning Objectives Database Design Main concepts in the ER model? ER Diagrams Database Design

More information

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables

Entity-Relationship Modelling. Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables Entity-Relationship Modelling Entities Attributes Relationships Mapping Cardinality Keys Reduction of an E-R Diagram to Tables 1 Entity Sets A enterprise can be modeled as a collection of: entities, and

More information

0. Database Systems 1.1 Introduction to DBMS Information is one of the most valuable resources in this information age! How do we effectively and efficiently manage this information? - How does Wal-Mart

More information

CS3200 Database Design Spring 2018 Derbinsky. Entity-Relationship (ER) Diagrams. Lecture 7

CS3200 Database Design Spring 2018 Derbinsky. Entity-Relationship (ER) Diagrams. Lecture 7 Lecture 7 . Context Outline Design & Implementation Process 2. Goals of Conceptual Design 3. Entity-Relationship (ER) Model 4. One ER Diagrammatic otation 5. Requirements Elicitation 6. Approaches to Conceptual

More information

The Entity-Relationship Model. Steps in Database Design

The Entity-Relationship Model. Steps in Database Design The Entity-Relationship Model Steps in Database Design 1) Requirement Analysis Identify the data that needs to be stored data requirements Identify the operations that need to be executed on the data functional

More information

Conceptual Design with ER Model

Conceptual Design with ER Model Conceptual Design with ER Model Lecture #2 1/24/2012 Jeff Ballard CS564, Spring 2014, Database Management Systems 1 See the Moodle page Due February 7 Groups of 2-3 people Pick a team name Homework 1 is

More information

The Entity-Relationship Model. Overview of Database Design

The Entity-Relationship Model. Overview of Database Design The Entity-Relationship Model Chapter 2, Chapter 3 (3.5 only) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview of Database Design Conceptual design: (ER Model is used at this stage.)

More information

Relational DB Design by ER- and EER-to-Relational Mapping Design & Analysis of Database Systems

Relational DB Design by ER- and EER-to-Relational Mapping Design & Analysis of Database Systems Relational DB Design by ER- and EER-to-Relational Mapping 406.426 Design & Analysis of Database Systems Jonghun Park jonghun@snu.ac.kr Dept. of Industrial Engineering Seoul National University outline

More information

Translation ER/EER to relational

Translation ER/EER to relational Database technology Lecture 4: Mapping of EER model to relations Jose M. Peña jose.m.pena@liu.se Translation ER/EER to relational Migrate from mini world model to a model understandable by a DBMS. 1 EER

More information

Chapter 2. Database Design. Database Systems p. 25/540

Chapter 2. Database Design. Database Systems p. 25/540 Chapter 2 Database Design Database Systems p. 25/540 Database Design Phases requirements analysis specification conceptual design conceptual schema logical design logical schema physical design physical

More information

Database Management

Database Management 204320 - Database Management Chapter 9 Relational Database Design by ER and EERto-Relational Mapping Adapted for 204320 by Areerat Trongratsameethong Copyright 2011 Pearson Education, Inc. Publishing as

More information

CMSC 424 Database design Lecture 3: Entity-Relationship Model. Book: Chap. 1 and 6. Mihai Pop

CMSC 424 Database design Lecture 3: Entity-Relationship Model. Book: Chap. 1 and 6. Mihai Pop CMSC 424 Database design Lecture 3: Entity-Relationship Model Book: Chap. 1 and 6 Mihai Pop Database Design Steps Entity-relationship Model Typically used for conceptual database design info Conceptual

More information

Relational Model: History

Relational Model: History Relational Model: History Objectives of Relational Model: 1. Promote high degree of data independence 2. Eliminate redundancy, consistency, etc. problems 3. Enable proliferation of non-procedural DML s

More information

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling

Conceptual Database Design. COSC 304 Introduction to Database Systems. Entity-Relationship Modeling. Entity-Relationship Modeling COSC 304 Introduction to Database Systems Entity-Relationship Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Conceptual Database Design Conceptual database design

More information

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems

1/24/2012. Chapter 7 Outline. Chapter 7 Outline (cont d.) CS 440: Database Management Systems CS 440: Database Management Systems Chapter 7 Outline Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys Relationship

More information

MTAT Introduction to Databases

MTAT Introduction to Databases MTAT.03.105 Introduction to Databases Lecture #4 Entity-Relationship Modelling Ljubov Jaanuska (ljubov.jaanuska@ut.ee) Lecture 3. Summary So far we have been dealing with a relational database (PCA.db)

More information

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model.

Database Design. Database Design I: The Entity-Relationship Model. Entity Type (con t) Representation in Relational Model. Database Design Database Design I: The Entity-Relationship Model Chapter 5 Goal: specification of database schema Methodology: Use E-R R model to get a high-level graphical view of essential components

More information

LECTURE 3: ENTITY-RELATIONSHIP MODELING

LECTURE 3: ENTITY-RELATIONSHIP MODELING LECTURE 3: ENTITY-RELATIONSHIP MODELING Ref. Chapter11 + Appendix F from Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. 1 IS220 : D a t

More information

Entity Relationship Modelling

Entity Relationship Modelling Entity Relationship Modelling P.J. M c.brien Imperial College London P.J. M c.brien (Imperial College London) Entity Relationship Modelling 1 / 49 Introduction Designing a Relational Database Schema How

More information

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018

course 3 Levels of Database Design CSCI 403 Database Management Mines Courses ERD Attributes Entities title 9/26/2018 3 Levels of Database Design CSCI 403 Database Management 13 Database Modeling with Entity-Relationship Diagrams Conceptual (this lecture) Understand data entities & relationships between them Communication

More information

ER-to-Relational Mapping

ER-to-Relational Mapping Lecture 9 1 1. Context 2. The Algorithm Outline 2 Database Design and Implementation Process 3 Data Models 4 Example ERD 5 Resulting Relational Schema 6 Step 1: Regular Entity Types i. For each regular/strong

More information

Conceptual Data Models for Database Design

Conceptual Data Models for Database Design Conceptual Data Models for Database Design Entity Relationship (ER) Model The most popular high-level conceptual data model is the ER model. It is frequently used for the conceptual design of database

More information

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling

COSC 304 Introduction to Database Systems. Entity-Relationship Modeling COSC 304 Introduction to Database Systems Entity-Relationship Modeling Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Conceptual Database Design Conceptual database design

More information

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Data Modeling. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke Data Modeling Yanlei Diao UMass Amherst Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 Outline v Conceptual Design: ER Model v Relational Model v Logical Design: from ER to Relational 2 Conceptual

More information

Enhanced Entity- Relationship Models (EER)

Enhanced Entity- Relationship Models (EER) Enhanced Entity- Relationship Models (EER) LECTURE 3 Dr. Philipp Leitner philipp.leitner@chalmers.se @xleitix LECTURE 3 Covers Small part of Chapter 3 Chapter 4 Please read this up until next lecture!

More information

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald

CS/INFO 330 Entity-Relationship Modeling. Announcements. Goals of This Lecture. Mirek Riedewald CS/INFO 330 Entity-Relationship Modeling Mirek Riedewald mirek@cs.cornell.edu Announcements Office hour update (see class homepage) First homework assignment will be available from CMS later today Some

More information

Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping

Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Chapter 7 Relational Database Design by ER- and EERR-to-Relational Mapping Copyright 2004 Pearson Education, Inc. Chapter Outline ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types

More information

Conceptual Data Modeling and the Entity- Relationship Model. Department of Computer Science Northern Illinois University September 2014

Conceptual Data Modeling and the Entity- Relationship Model. Department of Computer Science Northern Illinois University September 2014 Conceptual Data Modeling and the Entity- Relationship Model Department of Computer Science Northern Illinois University September 2014 Data Models A means of describing the structure of the data A set

More information

Contents. Database. Information Policy. C03. Entity Relationship Model WKU-IP-C03 Database / Entity Relationship Model

Contents. Database. Information Policy. C03. Entity Relationship Model WKU-IP-C03 Database / Entity Relationship Model Information Policy Database C03. Entity Relationship Model Code: 164323-03 Course: Information Policy Period: Spring 2013 Professor: Sync Sangwon Lee, Ph. D 1 Contents 01. Overview of Database Design 02.

More information

CIS 330: Web-driven Web Applications. Lecture 2: Introduction to ER Modeling

CIS 330: Web-driven Web Applications. Lecture 2: Introduction to ER Modeling CIS 330: Web-driven Web Applications Lecture 2: Introduction to ER Modeling 1 Goals of This Lecture Understand ER modeling 2 Last Lecture Why Store Data in a DBMS? Transactions (concurrent data access,

More information

Enhanced Entity-Relationship (EER) Modeling

Enhanced Entity-Relationship (EER) Modeling CHAPTER 4 Enhanced Entity-Relationship (EER) Modeling Copyright 2017 Ramez Elmasri and Shamkant B. Navathe Slide 1-2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes

More information

Informatics 1: Data & Analysis

Informatics 1: Data & Analysis Informatics 1: Data & Analysis Lecture 4: From ER Diagrams to Relational Models Ian Stark School of Informatics The University of Edinburgh Friday 26 January 2018 Semester 2 Week 2 https://blog.inf.ed.ac.uk/da18

More information

How to translate ER Model to Relational Model

How to translate ER Model to Relational Model How to translate ER Model to Relational Model Review - Concepts 2 Relational Model is made up of tables A row of table = a relational instance/tuple A column of table = an attribute A table = a schema/relation

More information

Entity Relationship Modelling

Entity Relationship Modelling Entity Relationship Modelling P.J. M c.brien Imperial College London P.J. M c.brien (Imperial College London) Entity Relationship Modelling 1 / 48 Introduction Maintaining a Relational Database Schema

More information

Chapter 2: Entity-Relationship Model

Chapter 2: Entity-Relationship Model Chapter 2: Entity-Relationship Model! Entity Sets! Relationship Sets! Design Issues! Mapping Constraints! Keys! E-R Diagram! Extended E-R Features! Design of an E-R Database Schema! Reduction of an E-R

More information

CMPT 354 Database Systems I

CMPT 354 Database Systems I CMPT 354 Database Systems I Chapter 2 Entity Relationship Data Modeling Data models A data model is the specifications for designing data organization in a system. Specify database schema using a data

More information

DATABASE MANAGEMENT SYSTEM

DATABASE MANAGEMENT SYSTEM DATABASE MANAGEMENT SYSTEM For COMPUTER SCIENCE DATABASE MANAGEMENT. SYSTEM SYLLABUS ER model. Relational model: relational algebra, tuple calculus, SQL. Integrity constraints, normal forms. File organization,

More information

Topic 5: Mapping of EER Diagrams to Relations

Topic 5: Mapping of EER Diagrams to Relations Topic 5: Mapping of EER Diagrams to Relations Olaf Hartig olaf.hartig@liu.se Recall: DB Design Process 2 Running Example 3 Algorithm for Mapping from the ER Model to the Relational Model Step 1: Map Regular

More information

Chapter (4) Enhanced Entity-Relationship and Object Modeling

Chapter (4) Enhanced Entity-Relationship and Object Modeling Chapter (4) Enhanced Entity-Relationship and Object Modeling Objectives Concepts of subclass and superclass and the related concepts of specialization and generalization. Concept of category, which is

More information

Informatics 1: Data & Analysis

Informatics 1: Data & Analysis Informatics 1: Data & Analysis Lecture 4: From ER Diagrams to Relational Models Ian Stark School of Informatics The University of Edinburgh Friday 24 January 2014 Semester 2 Week 2 http://www.inf.ed.ac.uk/teaching/courses/inf1/da

More information

A Deeper Look at Data Modeling. Shan-Hung Wu & DataLab CS, NTHU

A Deeper Look at Data Modeling. Shan-Hung Wu & DataLab CS, NTHU A Deeper Look at Data Modeling Shan-Hung Wu & DataLab CS, NTHU Outline More about ER & Relational Models Weak Entities Inheritance Avoiding redundancy & inconsistency Functional Dependencies Normal Forms

More information

Chapter 6: Entity-Relationship Model

Chapter 6: Entity-Relationship Model Chapter 6: Entity-Relationship Model Database System Concepts, 5th Ed. See www.db-book.com for conditions on re-use Chapter 6: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram

More information

Conceptual Design. The Entity-Relationship (ER) Model

Conceptual Design. The Entity-Relationship (ER) Model Conceptual Design. The Entity-Relationship (ER) Model CS430/630 Lecture 12 Slides based on Database Management Systems 3 rd ed, Ramakrishnan and Gehrke Database Design Overview Conceptual design The Entity-Relationship

More information

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2) SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay Lecture #10 Process Modelling DFD, Function Decomp (Part 2) Let us continue with the data modeling topic. So far we have seen

More information

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization.

OBJECTIVES. How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization. 7.5 逻辑数据库设计 OBJECTIVES How to derive a set of relations from a conceptual data model. How to validate these relations using the technique of normalization. 2 OBJECTIVES How to validate a logical data model

More information

CS2 Current Technologies Lecture 5: Data Modelling and Design

CS2 Current Technologies Lecture 5: Data Modelling and Design T E H U N I V E R S I T Y O H F R G E D I N B U CS2 Current Technologies Lecture 5: Data odelling and Design Chris Walton (cdw@dcs.ed.ac.uk) 25 February 2002 Conceptual odelling 1 Designg effective database

More information

Roadmap of This Lecture. Weak Entity Sets Extended E-R Features Reduction to Relation Schemas Database Design UML*

Roadmap of This Lecture. Weak Entity Sets Extended E-R Features Reduction to Relation Schemas Database Design UML* E-R Model (II) 1 Roadmap of This Lecture Weak Entity Sets Extended E-R Features Reduction to Relation Schemas Database Design UML* 2 Weak Entity Sets An entity set that does not have a primary key is referred

More information

ER modeling. Lecture 4

ER modeling. Lecture 4 ER modeling Lecture 4 1 Copyright 2007 STI - INNSBRUCK Today s lecture ER modeling Slides based on Introduction to Entity-relationship modeling at http://www.inf.unibz.it/~franconi/teaching/2000/ct481/er-modelling/

More information

Outline. Note 1. CSIE30600 Database Systems ER/EER to Relational Mapping 2

Outline. Note 1. CSIE30600 Database Systems ER/EER to Relational Mapping 2 Outline ER-to-Relational Mapping Algorithm Step 1: Mapping of Regular Entity Types Step 2: Mapping of Weak Entity Types Step 3: Mapping of Binary 1:1 Relation Types Step 4: Mapping of Binary 1:N Relationship

More information

Translating an ER Diagram to a Relational Schema

Translating an ER Diagram to a Relational Schema Translating an ER Diagram to a Relational Schema CS386/586 Introduction to Database Systems, Lois Delcambre 1999-2009 Slide 1 Translate each entity set into a table, with keys. Entity set: represented

More information

Course Notes on From Entity-Relationship Schemas to Relational Schemas

Course Notes on From Entity-Relationship Schemas to Relational Schemas Course Notes on From Entity-Relationship Schemas to Relational Schemas The chapter deals with practical database design: the construction of a relational schema from an E-R schema this stage of database

More information

High-Level Database Models (ii)

High-Level Database Models (ii) ICS 321 Spring 2011 High-Level Database Models (ii) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1 Logical DB Design: ER to Relational Entity sets to

More information

ENTITY-RELATIONSHIP MODEL. CS 564- Spring 2018

ENTITY-RELATIONSHIP MODEL. CS 564- Spring 2018 ENTITY-RELATIONSHIP MODEL CS 564- Spring 2018 WHAT IS THIS LECTURE ABOUT E/R Model: entity sets, attribute relation: binary, multi-way relationship roles, attributes on relationships subclasses (ISA) weak

More information

Database Design Process

Database Design Process Database Design Process Real World Functional Requirements Requirements Analysis Database Requirements Functional Analysis Access Specifications Application Pgm Design E-R Modeling Choice of a DBMS Data

More information

Smarter Balanced Assessment Consortium Claims, Targets, and Standard Alignment for Math

Smarter Balanced Assessment Consortium Claims, Targets, and Standard Alignment for Math Sarter Balanced Assessent Consortiu s, s, Stard Alignent for Math The Sarter Balanced Assessent Consortiu (SBAC) has created a hierarchy coprised of clais targets that together can be used to ake stateents

More information

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1 Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1 Chapter 4 Enhanced Entity-Relationship (EER) Modeling Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Chapter Outline EER stands for

More information

Databases. Dr. Richard E. Turner March 5, 2013

Databases. Dr. Richard E. Turner March 5, 2013 Databases Dr. Richard E. Turner (ret26@cam.ac.uk) March 5, 2013 Big-data: Databases Database = structured collection of data Everywhere: Facebook, MySpace, Google, Android (sqlite3), Amazon,... Amazon

More information

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd.

Databases Model the Real World. The Entity- Relationship Model. Conceptual Design. Steps in Database Design. ER Model Basics. ER Model Basics (Contd. The Entity- Relationship Model CS 186 Fall 2002: Lecture 2 R &G - Chapter 2 A relationship, I think, is like a shark, you know? It has to constantly move forward or it dies. And I think what we got on

More information

Lecture 10. Spring 2018 Borough of Manhattan Community College

Lecture 10. Spring 2018 Borough of Manhattan Community College Lecture 10 Spring 2018 Borough of Manhattan Community College 1 Chapter Objectives In this lecture you will learn: The limitations of the basic concepts of the Entity-Relationship (ER) model and the requirements

More information

MIT Database Management Systems Lesson 03: ER-to-Relational Mapping

MIT Database Management Systems Lesson 03: ER-to-Relational Mapping MIT 22033 Database Management Systems Lesson 03: ER-to-Relational Mapping By S. Sabraz Nawaz Senior Lecturer in MIT Department of Management and IT, SEUSL Chapter Outline ER-to-Relational Mapping Algorithm

More information

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called Q.1 Short Questions Marks 1. Considering functional dependency, one in which removal from some attributes must affect dependency is called 01 A. full functional dependency B. partial dependency C. prime

More information

E-R Diagram to Relational Schema

E-R Diagram to Relational Schema Database Design ICOM 5016 Database Systems Database Design Amir H. Chinaei Department of Electrical and Computer Engineering University of Puerto Rico, Mayagüez Slides are adapted from: The first step

More information

Logical Database Design. ICT285 Databases: Topic 06

Logical Database Design. ICT285 Databases: Topic 06 Logical Database Design ICT285 Databases: Topic 06 1. What is Logical Database Design? Why bother? Bad logical database design results in bad physical database design, and generally results in poor database

More information

RDBMS (Relational Database Management Systems)

RDBMS (Relational Database Management Systems) RDBMS (Relational Database Management Systems) 1 Introduction to DBMS Data and Information Where data is some meaningful fact or figure, information is the processed data on which decisions and actions

More information

SAMPLE FINAL EXAM SPRING/2H SESSION 2017

SAMPLE FINAL EXAM SPRING/2H SESSION 2017 SAMPLE FINAL EXAM SPRING/2H SESSION 2017 School of Computing, Engineering and Mathematics Complete your details in this section when instructed by the Exam Supervisor at the start of the exam. You should

More information

Database Design Phases. History. Entity-relationship model. ER model basics 9/25/11. Entity-relationship (ER) model. ER model basics II

Database Design Phases. History. Entity-relationship model. ER model basics 9/25/11. Entity-relationship (ER) model. ER model basics II CO 597A: Principles of Database and Information ystems Entity-relationship (ER) model Database Design Phases 1. characterize user needs 2. conceptual design structure of data * Entity-relationship model

More information

begin [atomic] operation, operation, { commit rollback} end

begin [atomic] operation, operation, { commit rollback} end Set Processing Languages standard, simple data structure RELATION abstracted retrievals RELATIONAL ALGEBRA abstracted updating INSERT, DELETE, UPDATE transaction indivisible set of active operations begin

More information

COIS Databases

COIS Databases Faculty of Computing and Information Technology in Rabigh COIS 342 - Databases Chapter 4 Enhanced Entity-Relationship and UML Modeling Adapted from Elmasri & Navathe by Dr Samir BOUCETTA First Semester

More information

Detailed Data Modelling: Attribute Collection and Normalisation of Data

Detailed Data Modelling: Attribute Collection and Normalisation of Data Detailed Data Modelling IMS1002 /CSE1205 Systems Analysis and Design Detailed Data Modelling: Attribute Collection and Normalisation of Data The objective of detailed data modelling is to develop a detailed

More information

Module 2 : Entity-Relationship Model 15

Module 2 : Entity-Relationship Model 15 Module 2 : Entity-Relationship Model 15 Module-02 Entity Relationship Data Model 2.1 Motivation Data modeling is an essential step in the process of creating any Database Application. It helps Database

More information

Database Design and the E-R Model (7.4, )

Database Design and the E-R Model (7.4, ) CSL 451 Introduction to Database Systems Database Design and the E-R Model (7.4, 7.6-7.8) Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan!

More information

download instant at Database System Concepts

download instant at   Database System Concepts QUESTION BANK FOR INSTRUCTORS VERSION DATED: June 17, 2003 TO ACCOMPANY Database System Concepts Fourth Edition Abraham Silberschatz Yale University Henry F. Korth Lehigh University S. Sudarshan Indian

More information

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II

PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore ) Department of MCA. Solution Set - Test-II PES Institute of Technology Bangalore South Campus (1 K.M before Electronic City,Bangalore 560100 ) Solution Set - Test-II Sub: Database Management Systems 16MCA23 Date: 04/04/2017 Sem & Section:II Duration:

More information

LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER)

LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER) LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER) Ref. Chapter12 from Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. IS220 : D at

More information

Entity Relationship Modelling

Entity Relationship Modelling Entity Relationship Modelling Overview Database Analysis Life Cycle Components of an Entity Relationship Diagram What is a relationship? Entities, attributes, and relationships in a system The degree of

More information

High Level Database Models

High Level Database Models ICS 321 Fall 2011 High Level Database Models Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/21/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Database

More information

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model.

E-R Model. Hi! Here in this lecture we are going to discuss about the E-R Model. E-R Model Hi! Here in this lecture we are going to discuss about the E-R Model. What is Entity-Relationship Model? The entity-relationship model is useful because, as we will soon see, it facilitates communication

More information

Course on Database Design Carlo Batini University of Milano Bicocca Part 5 Logical Design

Course on Database Design Carlo Batini University of Milano Bicocca Part 5 Logical Design Course on Database Design Carlo atini University of Milano icocca Part 5 Logical Design 1 Carlo atini, 2015 This work is licensed under the Creative Commons Attribution NonCommercial NoDerivatives 4.0

More information

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement

Overview of db design Requirement analysis Data to be stored Applications to be built Operations (most frequent) subject to performance requirement ITCS 3160 Data Base Design and Implementation Jing Yang 2010 Fall Class 12: Data Modeling Using the Entity-Relationship (ER) Model Overview of db design Requirement analysis Data to be stored Applications

More information

Data Modeling Using the Entity-Relationship (ER) Model

Data Modeling Using the Entity-Relationship (ER) Model CHAPTER 3 Data Modeling Using the Entity-Relationship (ER) Model Copyright 2017 Ramez Elmasri and Shamkant B. Navathe Slide 1-1 Chapter Outline Overview of Database Design Process Example Database Application

More information

Chapter 7: Entity-Relationship Model. Chapter 7: Entity-Relationship Model

Chapter 7: Entity-Relationship Model. Chapter 7: Entity-Relationship Model Chapter 7: Entity-Relationship Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 7: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram

More information

Database Management Systems. Chapter 2 Part 2

Database Management Systems. Chapter 2 Part 2 Database Management Systems Chapter 2 Part 2 Introduction to Database Design Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Class Hierarchies Classify entities sets into Super-class and

More information