Overview of Entity‐Relationship Model

Slides:



Advertisements
Similar presentations
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Advertisements

Systems Development Life Cycle
Data Modeling is an Analysis Activity
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Database Design & Mapping
System Analysis - Data Modeling
Chapter 3: Modeling Data in the Organization
DATABASE APPLICATION DEVELOPMENT SAK 3408
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Chapter 3: Modeling Data in the Organization
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
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.
Entity-Relationship modeling Transparencies
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 7th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
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.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization Modern Database Management 10 th Edition Jeffrey.
Chapter 3: Modeling Data in the Organization
Chapter 3: Modeling Data in the Organization
Chapter 5 Entity–Relationship Modeling
Chapter 2: Modeling Data in the Organization
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Conceptual Data Modeling, Entity Relationship Diagrams
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
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 
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 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 2: Modeling Data in the Organization Modern Database Management 11 th Edition.
Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling Management Information Systems Robert.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship Modeling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Pree Thiengburanathum, CAMT, Chiang Mai University 1 Database System Modeling Data in the Organization October 31, 2009 Software Park, Bangkok Thailand.
Chapter 2: Modeling Data in the Organization
Chapter 3 1 Chapter 3: Modeling Data in the Organization.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Chapter 3: Modeling Data in the Organization
Data Modeling Using the Entity- Relationship (ER) Model
Modeling data in the Organization
TMC2034 Database Concept and Design
Tables and Their Characteristics
Database Design – Lecture 4
Overview of Entity‐Relationship Model
Entity-Relation Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
ER MODELING Instructor: SAMIA ARSHAD
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

Overview of Entity‐Relationship Model Entity‐Relationship Model is a detailed, logical representation of the data for an organization or for a business area. What are the entities and relationships in the enterprise? What information about these entities and their relationships should we store in the database? What are the integrity constraints or business rules that holds? The model must be as ‘open’ as possible and not tied to any technology or to any particular business methodology. Introduced in 1976 by Peter Chen. ISE230

Overview of Entity‐Relationship Model (2) The E‐R model is usually expressed as an E‐R diagram. Widespread CASE tool‐support No standard notation for E‐R modeling/diagram. Chen, Martin, Crow Foot and many other notations. E‐R Model is the mainstream approach for data modeling. Communication tool between various stakeholders. ISE230

Data Definitions in Data Modeling Term – word or phrase with specific meaning Examples: course, rental car, flight, reservation Fact – association between two or more terms ‘A course is a module of instruction in a particular subject area’ ‘A customer may request a model of a car from a rental branch on a particular date’ A good data definition is: Related to business, not technical, characteristics Meaningful and self‐documenting Composed of words from an approved list. ISE230

Entities and Entity Sets Entity: A person, place, object, event, or concept in the user environment about which the organization wishes to maintain data. More examples on page 93 and 94 of 8th Edition. Entity Type (or Entity Set) – collection of entities Often corresponds to a table. Entity instance – A single occurrence of an entity type. Often corresponds to a row in a table. Player Match Team Ground ISE230

What Should an Entity Be? SHOULD BE: An object that will have many instances in the database. An object that will be composed of multiple characteristics/attributes. SHOULD NOT BE: A user of the database system. An output of the database system (e.g., a report). Rules (conventions) for naming entities. Singular (e.g. Player) vs. Plural names (e.g. Players) ISE230

Attributes Property or characteristic of an entity set. An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Examples: Player name, Career runs, Number of centuries scored, etc. Domain: The set of permitted values for each attribute. Rules/Conventions for naming attributes too. ISE230

Attribute Classes Simple vs. Composite Attribute Single‐Valued vs. Multi‐valued Attribute Stored vs. Derived Attributes Identifier Attributes Required vs. Optional Attributes ISE230 10

Composite Attributes An attribute broken into many parts: compound data values. ISE230

Multi‐valued Attributes Multiple data values for one attribute are allowed ISE230

Derived Attributes Value can be computed from other attributes Example: Age, given Date of Birth Career Runs Player Name Centuries Player Average ISE230

Identifiers (aka Keys) Identifier (or Key) is an attribute (or combination of attributes) that uniquely identifies individual instances of an entity type Simple vs. Composite Identifier Date FlightNumber FlightID Destination Flight ISE230

Characteristics of Identifiers Will not change in value No intelligent/dynamic identifiers (e.g., containing locations or people that might change) Example: Captain’s name as an identifier of the team (YYoounisElevenn)) Will not be null/empty It is recommended to substitute new, simple keys for long, composite keys Candidate Identifier is an attribute that could be a key It satisfies the requirements for being an identifier ISE230

Relationships Links/Association between entities – modeled as connecting lines. Relationship Types: Modeled as association between entity types Relationship Instances: Links between specific entity instances Player Team Inzimam‐ul‐Haq Brian Lara Rana Naveed Pakistan Lahore Badshah West Indies Sachin Tendulkar India ISE230

Cardinality of Relationships One‐to‐One Each entity in the relationship will have exactly one related entity One‐to‐Many An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity Many‐to‐Many Entities on both sides of the relationship can have many related entities on the other side ISE230

Cardinality Constraints Cardinality Constraints ‐ the number of instances of one entity that can or must be associated with each instance of another entity Minimum Cardinality If zero, then relationship is optional If one or more, then mandatory (MUST hold) Maximum Cardinality The maximum number of entity instances that could be association with the target entity in the relationship. ISE230

One‐to‐One Relationship One entity instance associated with only (maximum) one target entity instance A manager is associated One team is managed by with only one team at most, or there is no manager. only one manager at most or not managed at all. ISE230 20

One‐to‐One Relationship (2) Optional cardinalities A person is married to at most one other person, or may not be married at all ISE230

Many‐to‐Many Relationship Many entity instances associated with either optionally or mandatory many target entity instances Many teams can have same or many players. One or more players are associated with none or more teams. ISE230

One‐to‐Many Relationship One entity instance associated with optionally or mandatory many target entity instances. ISE230

Examples of multiple relationships Entities can be related to one another in more than one way Employees and departments ISE230

Examples of multiple relationships Professors and courses (fixed upper limit constraint) ISE230

Degree of Relationships Degree of a relationship is the number of entity types that participate in it Unary Relationship Binary Relationship Ternary Relationship ISE230

Degree of relationships: Notations Entities of two different types related to each other One entity related to another of the same entity type Entities of three different types related to each other ISE230 27

Degree of relationships: Examples a) Unary relationships ISE230

Degree of relationships: Examples b) Binary relationships ISE230

Degree of relationships: Examples c) Ternary relationship Note: a relationship can have attributes of its own ISE230 30

Binary Relationships with Attributes Here, the date completed attribute pertains specifically to the employee’s completion of a course…it is an attribute of the relationship ISE230 31

An associative entity (CERTIFICATE) Associative entity is like a relationship with an attribute, but it is also considered to be an entity in its own right. Note that the many‐to‐many cardinality between entities in previous figure has been replaced by two one‐to‐many relationships with the associative entity. ISE230

Ternary relationship as an associative entity ISE230

Associative Entities When should a relationship with attributes instead be an associative entity? All relationships for the associative entity should be many The associative entity could have meaning independent of the other entities The associative entity preferably has a unique identifier, and should also have other attributes The associative entity may participate in other relationships other than the entities of the associated relationship Ternary relationships should be converted to associative entities ISE230

Multi‐valued Attributes vs. Relationships simple composite ISE230

Strong vs. Weak Entities Strong Entity Type: One that exists independently of other entity types. Strong entity instances always have a unique identifier Identifier is underlined with single‐line Examples: Student, Employee, Course Weak Entity Type: One whose existence depends on a strong entity (called Identifying Owner). It only has a partial identifier Partial identifier is underlined with double‐line Entity box has double line Example: Employee versus EmployeeCredentials ISE230

Conclusion Summary Essential Reading What is Next? Basic business rules are data names and definitions Data modeling notations frequently used today is the entity‐relationship data model. E‐R model constructs: entities, entity types, relationships, relationship types, attributes, identifiers, cardinality constraints. Essential Reading Modern Database Management (8th Ed.), Chapter 3 What is Next? More on ER and Enhanced E‐R Model ISE230