Modeling Data The Entity Relationship Model (ER) For Database Design.

Slides:



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

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
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.
System Analysis - Data Modeling
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
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.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
1 Data Modelling Which data to include in the database.
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.
Data Modeling Using the Entity-Relationship Model
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
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,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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
Chapter 3: Modeling Data in the Organization
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Chapter 5 Entity–Relationship Modeling
Entity Relationship Modeling
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) Modeling.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
©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.
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.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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.
1 Entity-Relationship Model © Pearson Education Limited 1995, 2005.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
1 Database Systems Entity Relationship (E-R) Modeling.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
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.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
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
Entity Relationship Model
Entity-Relationship Model
Entity-Relationship Model
Database Modeling using Entity Relationship Model (E-R Model)
Chapter 7: Entity-Relationship Model
Entity Relation Model Tingting Zhang.
Presentation transcript:

Modeling Data The Entity Relationship Model (ER) For Database Design

Purpose of E-R Model Enterprise schema Conceptual level model –Abstract model of database –Independent of DBMS Facilitates database design –E-R diagrams are used as design tools –Precedes the implementation phase Semantic model –Captures meanings & some constraints

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

An entity with attributes Employee empID name salary

A simple relationship between two entities salary name budgetdID name Works_InDepartmentEmployee empID

Entity A person, place, event, object, or some “concept” in the real world –It exists and can be distinguished from other objects Entity instances are particular persons, places… –They form the extension of the entity They will be the data Entity types are categories of entities –They form the intension of the entity They are the permanent definition part –Entity sets are collections of entities of the same type They must be well-defined

Attribute Defining properties or characteristics of an entity type A domain is the set of allowable values for an attribute Attributes may be –simple –composite – off-shoot ovals –null –multi-valued – double oval –Derived – broken oval

Relationship Connections / interactions between entity instances Relationship type – category of relationships –forms intension A relationship set is a collection of relationships of the same type A relationship instance is one that exists at a given moment –set with instances forms extension A relationship can have descriptive attributes of its own

Some modeling problems Painter – painting Student – teacher Patient – doctor Parent – child Husband – wife Customer – account Shopping cart – item

Keys Fundamental concept in database design Superkey –An attribute or set of attributes that uniquely identifies an entity Candidate key –A minimal superkey Primary key –The candidate key that is distinguished by the database designer to be used to identify entities and access records Secondary key –An attribute or set of attributes used for accessing records, but not necessarily unique Foreign key –A very important concept that we’ll study in relational model

About relationships Types –Binary, ternary (or more) –Recursive –Multiple Cardinalities Relationships with attributes Participation constraints Roles of entities Issues of existence dependency & weak entities

Types of relationships Binary – relate just two entities Ternary – relate 3 entities ABR C AB R

Recursive relationships Student Roommate An entity is related to itself

Multiple relationships Two entities with more than one relationship connecting them EmployeeDepartment Works in Manages

Cardinality of relationships One-to-one: Each instance of entity A is associated with at most one instance of entity B, and vice-versa One-to-many: Each instance of entity A can be associated with many instances of entity B, but each instance of entity in B is associated with at most one instance of entity A. Many-to-many: Each instance of entity A can be associated with many instances of entity B, and vice- versa ABR

Relationships with attributes StudentClass Enroll Grade The grade a particular student receives is associated with his/her instance of enrollment in a particular class

Relationship participation constraints Total participation – Fig. 3.9 ( p. 137 in hand-out ) –Every member of an entity set must participate in the relationship Use double line from entity rectangle to relationship diamond Partial participation –Not every entity instance must participate Use single line from entity rectangle to relationship diamond

Roles A role is the 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 An entity Y is existence dependent on another entity X if each instance of Y must have a corresponding instance of X If so, then Y must have total participation in its relationship with X EmployeeDependent R

ER Diagram Example See Figure 3.12, p. 141 in hand-out