Databases Illuminated Chapter 3 The Entity Relationship Model.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Systems Development Life Cycle
Text-Book Chapters (7 and 8) Entity-Relationship Model
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Databases Revision.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Lecture Eleven Entity-Relationship Modelling
Modeling Data The Entity Relationship Model (ER) For Database Design.
Information Resources Management February 13, 2001.
1–1 The E-R Model Prof. Sin-Min Lee Department of Computer Science.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Chapter 3: Modeling Data in the Organization
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Chapter 4 Entity Relationship (ER) Modeling
Chapter 2: Entity-Relationship Model (Continued)
Entity-Relationship (E-R) Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Data Modeling Using the Entity-Relationship Model
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
1 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
the Entity-Relationship Model
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Chapter 4 The Relational Model.
Chapter 3 The Relational Model Transparencies Last Updated: Pebruari 2011 By M. Arief
Entity-Relationship Model
Chapter 5 Entity–Relationship Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Entity Relationship Modeling
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
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.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
©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.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan Lecture-03 Introduction –Data Models Lectured by, Jesmin Akhter.
advanced data modeling
Data Modeling Using the Entity-Relationship (ER) Data Model.
1 Database Systems Entity Relationship (E-R) Modeling.
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.
©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.
IT 5433 LM2 ER & EER Model. Learning Objectives: Explain importance of data modeling Define and use the entity-relationship model Define E/R terms Describe.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Data Modeling Using the Entity- Relationship (ER) Model
Entity Relationship Model
Entity-Relationship Model
Chapter 7 Entity-Relationship Model
Outline of the ER Model By S.Saha
Entity-Relationship Model
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 7: Entity-Relationship Model
Presentation transcript:

Databases Illuminated Chapter 3 The Entity Relationship Model

Purpose of E-R Model Facilitates database design Express logical properties of mini-world of interest within enterprise - Universe of Discourse Conceptual level model Not limited to any particular DBMS E-R diagrams used as design tools A semantic model – captures meanings

Symbols used in E-R Diagram Entity – rectangle Attribute – oval Relationship – diamond Link - line

Entity Object that exists and that can be distinguished from other objects Can be person, place, event, object, concept in the real world Can be physical object or abstraction Entity instance is a particular person, place, etc. Entity type is a category of entities Entity set is a collection of entities of same type-must be well-defined Entity type forms intension of entity – permanent definition part Entity instances form extension of entity – all instances that fulfill the definition at the moment In E-R diagram, rectangle represents entity set

Attributes Defining properties or qualities of entity type Represented by oval on E-R diagram Domain – set of allowable values for attribute Attribute maps entity set to domain May have null values for some entity instances – no mapping to domain for those instances May be multi-valued – use double oval on E-R diagram May be composite – use oval for composite attribute, with ovals for components May be derived – use dashed oval

Keys Superkey: attribute or set of attributes that uniquely identifies an entity Composite key: key with more than one attribute Candidate key: superkey such that no proper subset of its attributes is also a superkey (minimal superkey –no unnecessary attributes) Primary key: candidate key actually used for identifying entities and accessing records Alternate key: candidate key not used for primary key Secondary key: attribute or set of attributes used for accessing records, but not necessarily unique Foreign key: term used in relational model (but not in the E-R model) for an attribute that is primary key of a table and is used to establish a relationship, usually with another table, where it appears as an attribute also

Relationships Connections or interactions between entity instances Represented by diamond on E-R diagram Relationship type – category of relationships Relationship set – collection of relationships of same type, consists of relationship instances – relationships that exist at a given moment Type forms intension; set forms extension of relationship Relationship can have descriptive attributes Degree of relationship –Binary – links two entity sets; set of ordered pairs –Ternary – links three entity sets; ordered triples –N-ary – links n entity sets; ordered n-tuples –Note: ternary relationships may sometimes be replaced by two binary relationships (see next 2 slides)

Ternary Relationship

Two Binary Relationships

Cardinality of Relationships Number of entity instances to which another entity can map under the relationship One-to-one: X:Y is 1:1 is each entity in X is associated with at most one entity in Y and each entity in Y with at most one entity in X. One-to-many: X:Y is 1:M is each entity in X can be associated with many entities in Y, but each entity in Y with at most one entity in X. Many-to-many: X:Y is M:M if each entity in X can be associated with many entities in Y, and each entity in Y with many entities in X (many=more than one) The next slide shows several representation methods

Showing Cardinalities on an E-R Diagram

Relationship Participation Constraints Total participation –Every member of entity set must participate in the relationship –Represented by double line from entity rectangle to relationship diamond Partial participation –Not every entity instance must participate –Represented by single line from entity rectangle to relationship diamond

Roles Role: function that an entity plays in a relationship Optional to name role of each entity, but helpful in cases of –Recursive relationship – entity set relates to itself –Multiple relationships between same entity sets

Existence Dependency and Weak Entities Entity Y is existence dependent on entity X is each instance of Y must have a corresponding instance of X Y must have total participation in its relationship with X If Y does not have its own candidate key, Y is called a weak entity, and X is strong entity Weak entity may have a partial key, a discriminator, that distinguishes instances of the weak entity that are related to the same strong entity Use double rectangle for weak entity, with double diamond for relationship connecting it to its strong entity Note: not all existence dependent entities are weak – the lack of a key is essential to definition

ER Diagram Example