1 Data Modeling : ER Model…. Lecture 06. 2 Summary so for …. ER Model Entity, Attribute, Key Relationships Instance Diagram.

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

Text-Book Chapters (7 and 8) Entity-Relationship Model
CS157A Lecture 3 ER Diagram Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Extended E-R Model: Basic Symbols
Lecture Eleven Entity-Relationship Modelling
Modeling Data The Entity Relationship Model (ER) For Database Design.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
1 Data Modelling Which data to include in the database.
Chapter 2: Entity-Relationship Model (Continued)
Entity-Relationship (E-R) Model
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Reduction of an E-R Schema to Tables A database which conforms to an E-R diagram can be represented.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
The Entity-Relationship Model. 421B: Database Systems - ER Model 2 Overview of Database Design q Conceptual Design -- A first model of the real world.
Entity-Relationship Diagrams
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
the Entity-Relationship Model
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
1 Data Modeling : ER Model Lecture Why We Model  We build models of complex systems because we cannot comprehend any such system in its entirety.
Entity-Relationship Model
Entity-Relationship Model Ch. 3
Entity Relationship Modeling
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Chapter 3: Relational Model I Structure of Relational Databases Structure of Relational Databases Convert a ER Design to a Relational Database Convert.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Relational Model  Structure of Relational Databases  Normal forms (chap. 7)  Reduction of an E-R Schema to Relational (Sect. 2.9)  Relational.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
1 E-R Model (II) Keys To identify records in a table Candidate Key Primary Key Alternate Key Composite Key.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R Model.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Computing & Information Sciences Kansas State University Wednesday, 24 Sep 2008CIS 560: Database System Concepts Lecture 12 of 42 Wednesday, 24 September.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
ICOM 5016 – Introduction to Database Systems Lecture 9 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Computing & Information Sciences Kansas State University Friday, 26 Sep 2008CIS 560: Database System Concepts Lecture 13 of 42 Friday, 26 September 2008.
Entity-Relation Model. E-R Model The Entity-Relationship (ER) model was originally proposed by Peter in 1976 ER model is a conceptual data model that.
1 Database Systems Entity Relationship (E-R) Modeling.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 2 © Akhilesh Bajaj, 2000, 2002, 2003, 2004,
CS157A Lecture 4 ER Model 2 Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
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.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 7: Entity-Relationship.
Lecture 26 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Topic 3: ER – Entity Relationship Model (ERM) 6/12/
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 17 July 28,2012 Data Modeling using the Entity Relationship.
Entity-Relationship Model
Presentation transcript:

1 Data Modeling : ER Model…. Lecture 06

2 Summary so for …. ER Model Entity, Attribute, Key Relationships Instance Diagram

3 RELATIONSHIP CARDINALITY is a constraint on a relationship it characterizes relationships further given as (mapping) cardinality : how many entities of an entity set participate in a relationship especially useful for binary relationships

4 RELATIONSHIP CARDINALITY… a relationship set R between entity sets A and B may be one of the following one-to-one : one entity in A associated with at most one entity in B one-to-many : one entity in A may be associated with zero/more number of entities in B. However, one entity in B can be associated with at most one entity from A. many-to-one : reverse of above definition (like a mathematical function)

5 RELATIONSHIP CARDINALITY… many-to-many : one entity in A may be associated with any number of entities in B, and vice-versa. EXAMPLES : relationship set TEACHES from TEACHER to COURSE is one-to-many (TAUGHT-BY from COURSE to TEACHER is many-to-one) relationship STUDY between STUDENT and COURSE is many-to-many

6 EXISTENCE DEPENDENCE existence dependency : another important constraint existence of entity ‘a’ may depend on existence of another entity ‘b’: ‘b’ is called dominant entity and ‘a’ is called subordinate entity

7 EXISTENCE DEPENDENCE… there exists existence dependency of TEACHER on DEPT as no teacher can be appointed without fixing her department Subordinate entity has its own key and may participate in more relationship

8

9

10 E-R Diagram : Examples

11 Add some attributes to entities here Courses may have another course as pre-requisite

12

13

14

15 Describe the real-world mapped above in words. Can you represents this : a supplier may supply same part many times Note : Relationship ‘supplies’ could also be ternary (by involving warehouse)

16 TERNARY RELATIONSHIPS be sure that your model reflects real-world correctly ternary (or, of higher order) relationships are harder to understand is a ternary equivalent to two binary? if not, which one is correct in a given situation?

17 TERNARY RELATIONSHIPS… consider shipments data where parts are supplied to projects by suppliers in certain quantities; given : S1 supplies 40 number of P1 to J1 we lose context if we replace it by S1 supplies 40 of P1 S1 supplies to J1 thus, ternary relationship is not same as two binary relationships

18

19

20 WEAK ENTITY does not have a primary key on its own they are related to one/more ‘strong’ entities they often can be visualized as multivalued attribute or group of attributes they either have a ‘partial’ key or we add one to distinguish between those which are related to same strong entity

21 WEAK ENTITY… examples: branches of a bank interviews between candidates and companies viewed as entities (not relationships) so that they can participate further in relationships E-R diagrams follow

22

23 WEAK ENTITY… partial key (BrName in example) also called discriminatory attribute a weak entity can participate further in relationships with other entities a weak entity can also have weak entities dependent on in primary key of weak entity = primary key of its strong entity + discriminating attribute of weak entity within the context of strong entity

24 shows weak entity depending on two strong entities.

25 EXTENDED E-R MODEL extensions to capture more meaning concepts of generalization, aggregation and sub-set hierarchies added Similar to OO concepts : inheritance, composite objects