1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (ER) Modeling
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity Relationship (ER) Modeling
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity-Relationship Model
Data Modeling using the Entity-Relationship (ER) Model
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Entity Relationship (E-R) Modeling
Chapter Five Data Modeling with the Entity-Relationship Model.
Information Resources Management January 30, 2001.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship Model
Chapter 4 Entity Relationship (E-R) Modeling
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
CSCI 6442 Entity-Relation Data Modeling Copyright 2012, David C. Roberts, all rights reserved.
APPENDIX C DESIGNING DATABASES
Entity-Relationship Design
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Entities and Attributes
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity Relationship (ER) Modelling
Chapter 5 Entity–Relationship Modeling
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Switch off your Mobiles Phones or Change Profile to Silent Mode.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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)
Chapter 7 Data Modeling with Entity Relationship Diagrams
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
Description and exemplification of entity-relationship modelling.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
In this session, you will learn to: Map an ER diagram to a table Objectives.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Entity Relationship Modeling
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.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Entity Relationship (E-R) Model
Entity-Relationship Model
Tables and Their Characteristics
Database Design – Lecture 4
Database Systems: Design, Implementation, and Management Tenth Edition
Review of Week 1 Database DBMS File systems vs. database systems
ER MODELING Instructor: SAMIA ARSHAD
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling

2 ER Modeling BUAD/American University Entity-Relationship (ER) model The was originally proposed by Peter Chen [Chen76], as way to unify the network and relational database views. Simply stated: – the ER model is a conceptual data model that views the real world as entities and relationships. A basic component of the model is the Entity- Relationship diagram which is used to visually represents data objects.

3 ER Modeling BUAD/American University Uses of ER model  Maps well to the relational model  Constructs used in the ER model transformed into relational tables.  Can be used to by the database designer to communicate the design to the end user.  Model can be used as a design plan

4 ER Modeling BUAD/American University Basic Elements of E-R Modeling Views the real world as entities and associations between entities. Entities are the principal data object about which information is to be collected Relationships represents an association between two or more entities.

5 ER Modeling BUAD/American University E-R diagram is as important to the database designer as a blueprint is to an architect and builder. Completed E-R diagram is the actual blueprint of the database. Its composition must reflect a businesses operations accurately if the database is to meet that organization's data requirements. It forms the basis for a final check on whether the included entities are appropriate and sufficient, on the attributes found within those entities, and on the relationships between those entities. Used as cross-check against the proposed data dictionary entries. Lets the designer communicate more precisely with the stakeholders Finally, the completed E-R diagram serves as the implementation guide to those who create the actual database.

6 ER Modeling BUAD/American University ER Notation  Entities: represented by labeled rectangles. The label is the name of the entity. Entity names should be singular nouns.  Relationships: represented by a solid line connecting two entities with a diamond in the middle. The name of the relationship is written in the Diamond. Relationship names should be verbs.  Attributes, Attributes are represented by ovals and are connected to the entity with a line. Each oval contains the name of the attribute it represents.. Attributes which are identifiers are underlined. Attribute names should be singular nouns.  Connectivity and Cardinality of relationships is represented by a line ending with 1, M,N. Existence is represented by placing a circle the line.  Optional existence is shown by placing a circle next to the entity that is optional.

7 ER Modeling BUAD/American University Entities Entities are usually recognizable concepts, either concrete or abstract, such as person, places, things, or events which have relevance to the database Examples of entities are EMPLOYEES, PROJECTS, INVOICES An entity is analogous to a table in the relational model. Sometimes referred to as Entity Type or Entity Set.

8 ER Modeling BUAD/American University Entity instance (occurrence) An instance is an individual instance of an entity. An instance is analogous to a row in the relational table

9 ER Modeling BUAD/American University Relationships Represents an association between two or more entities. An example of a relationship would be: –employees are assigned to projects –projects have activities –Departments manage one or more projects

10 ER Modeling BUAD/American University Relationships Between Entities

11 ER Modeling BUAD/American University Classifying Relationships Relationships are classified by: – degree, –connectivity, cardinality, –direction, –existence

12 ER Modeling BUAD/American University Connectivity and Cardinality The actual number of related instances for each of the two entities. The basic types of connectivity for relations are: –one-to-one, –one-to-many, and –many-to-many.

13 ER Modeling BUAD/American University One-to-One (1:1) relationship At most one instance of a entity A is associated with one instance of entity B. “for each employee there exists a unique office and for each office there exists a unique employee”

14 ER Modeling BUAD/American University One-to-many (1:N) relationships For one instance of entity A, there are zero, one, or many instances of entity B However for one instance of entity B, there is only one instance of entity A. Examples of a 1 to Many relationships include: –A department has many employees; –Each employee is assigned to one department.

15 ER Modeling BUAD/American University Many-to-Many (M:N) relationships For one instance of entity A, there are zero, one, or many instances of entity B and For one instance of entity B there are zero, one, or many instances of entity A. An example is: –Employees can be assigned to no more than two projects at the same time –Projects must have assigned at least three employees Cannot be directly translated to relational tables, Must be transformed into two or more one-to-many relationships using Composite (associative) entities.

16 ER Modeling BUAD/American University Resolving a Many to Many Relationship The composite entity, RENTAL, is composed of at least the primary keys of the two entities it bridges, because the RENTAL's foreign keys must point to the primary keys of the two entities CUSTOMER and TAPE. A tape that is never rented will never show up in the RENTAL entity, RENTAL has become optional to TAPE.

17 ER Modeling BUAD/American University Direction of Relationship Indicates the originating entity of a binary relationship. The entity from which a relationship originates is the parent entity; The entity where the relationship terminates is the child entity. The direction of a relationship is determined by its connectivity. In a one-to-one relationship the direction is from the independent entity to a dependent entity. If both entities are independent, the direction is arbitrary. With one-to-many relationships, the entity occurring once is the parent. The direction of many-to-many relationships is arbitrary.

18 ER Modeling BUAD/American University Existence Denotes whether the existence of an entity instance is dependent upon the existence of another, related, entity instance. The existence of an entity in a relationship is defined as either mandatory or optional. If an instance of an entity must always occur for an entity to be included in a relationship, then it is mandatory. An example of mandatory existence is the statement "every project must be managed by a single department". If the instance of the entity is not required, it is optional. An example of optional existence is the statement, "employees may be assigned to work on projects".

19 ER Modeling BUAD/American University Attributes Attributes describe the entity of which they are associated. A particular instance of an attributes is a value. –For example, ”Peter" is one value of the attribute First_Name. A domain is the collection of all possible values an attribute can have. The domain of Name is a character string.

20 ER Modeling BUAD/American University Attributes on an ER model

21 ER Modeling BUAD/American University Attribute properties An instance of an attribute is a value, drawn from given domain, which presents the set of possible values of the attribute. Types: –Single vs multivalued Single: Social insurance number Multi: students in a course –Simple vs composite –Composite: Address consisting of Street number, City, state Zip –Stored vs derived attribute Stored: Individual grade of a student Derived: Average grade in a class –Key attribute - identifier

22 ER Modeling BUAD/American University Entity identifier One or more of the attributes that can uniquely identify each instance of a given entity type Example –Employee Employee No –Project Project No Relationship identifier –A means of identifying each relationship instance. –Usually a composite identifier consisting of the identifiers of the two entity types that it relates –Example Works(Employee No, Project No)

23 ER Modeling BUAD/American University Relational Tables based on ER model

24 ER Modeling BUAD/American University Generalization (Inheritance) Specifies that two or more entities that share common attributes can be generalized into a higher level entity type called a supertype or generic entity. (called superclass in object modeling) The lower-level of entities become the subtype, or categories, to the supertype. Subtypes are dependent entities. (called subclass in object modeling) Generalization occurs when two or more entities represent categories of the same real-world object. For example, Salaried Employees and Hourly Employees represent categories of the same entity, Employees. In this example, Employees would be the supertype; Salaried Employees and Hourly Employees would be the subtypes.

25 ER Modeling BUAD/American University Generalization Example

26 ER Modeling BUAD/American University Overlapping Generalization