ER MODELING Instructor: SAMIA ARSHAD

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Chapter 6: Entity-Relationship Model (part I)
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.
Entity Relationship (ER) Modeling
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.
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)
Modern Systems Analysis and Design Third Edition
Data Modeling Using the Entity-Relationship Model
© 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.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 3: Modeling Data in the Organization
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
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 (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
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:
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
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.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
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
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Data Modeling Using the Entity-Relationship (ER) Data Model.
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.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
CS263 Lecture 3 – ER models The E-R model is a detailed, logical representation of the data for an organisation or business area It should be understandable.
Entity Relationship (E-R) Model
Entity Relationship Diagram
Entity-Relationship Model
TMC2034 Database Concept and Design
Entity Relationship Model
Entity-Relationship Model
Tables and Their Characteristics
Database Design – Lecture 4
Overview of Entity‐Relationship Model
Entity-Relation Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems Instructor Name: Lecture-9.
Database Modeling using Entity Relationship Model (E-R Model)
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 3: Modeling Data in the Organization
Chapter 4 Entity Relationship (ER) Modeling
Chapter 7: Entity-Relationship Model
Entity-Relationship Diagram (ERD)
Entity Relation Model Tingting Zhang.
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

ER MODELING Instructor: SAMIA ARSHAD Lecture 17 ER MODELING Instructor: SAMIA ARSHAD

ER Modeling Entity relationship model defines the conceptual view of database. It works around real world entity and association among them. It should be understandable to both the user and to the IT technologist. It must be flexible enough so that it can be used and understood in practically any environment where information is modelled. At view level, ER model is considered well for designing databases.

ER Modeling It is expressed in terms of entities in the business environment, the relationships (or associations) among those entities and the attributes (properties) of both the entities and their relationships The E-R model is usually expressed as an E-R diagram

Entity An entity is an object or concept about which you want to store information. e.g. person, place, object, event, concept. Attribute Characteristics of an entity Relationship Specify the relations among entities

Example

Entity Set Entity Set is a collection of entities that share common properties or characteristics. Each entity set is given a name, since this name represents a set of items, it is always singular. It is placed inside the box representing the entity set.

Entity Types  Entities based on their characteristics are classified as follows.  Strong Entities Weak Entities Recursive Entities Composite Entities

Strong Entity An entity set that has a primary key is termed as strong entity set. Weak Entity An entity set that does not have sufficient attributes to form a primary key is termed as a weak entity set. Recursive Entity A recursive entity is one in which a relation can exist between occurrences of the same entity set. This occurs in a unary relationship. Composite Entities If a Many to Many relationship exist we must create a bridge entity to convert it into 1 to Many. Bridge entity composed of the primary keys of each of the entities to be connected. The bridge entity is known as a composite entity. A composite entity is represented by a diamond shape with in a rectangle in an ER Diagram.

Example of Weak and Strong entity

Attributes An attribute is a property or characteristic of an entity type, for example the entity EMPLOYEE may have attributes Employee_Name and Employee_Address. In ER diagrams place attributes name in an ellipse with a line connecting it to its associated entity Attributes may also be associated with relationships An attribute is associated with exactly one entity or relationship

Attributes Types In Entity Relationship(ER) Model attributes can be classified into the following types. Simple and Composite Attribute Single Valued and Multi Valued attribute Stored and Derived Attributes

Simple versus composite attributes Some attributes can be broken down into meaningful component parts, such as Address, which can be broken down into Street_Address, City..etc. The component attributes may appear above or below the composite attribute on an ER diagram Provide flexibility to users. A simple (atomic) attribute is one that cannot be broken down into smaller components

A composite attribute

Single-Valued versus Multivalued Attribute It frequently happens that there is an attribute that may have more than one value for a given instance, e.g. EMPLOYEE may have more than one Skill. A multivalued attribute is one that may take on more than one value – it is represented by an ellipse with double lines

Stored versus Derived Attributes Some attribute values can be calculated or derived from others e.g., if Years_Employed needs to be calculated for EMPLOYEE, it can be calculated using Date_Employed and Today's_Date A derived attribute is one whose value can be calculated from related attribute values (plus possibly other data not in the database) A derived attribute is signified by an ellipse with a dashed line.

Entity with a multivalued attribute (Skill) and derived attribute (Years_Employed)

Identifier attribute Identifier attribute or Key is an attribute (or combination of attributes) that uniquely identifies individual instances of an entity type, such as Student_ID To be a candidate identifier, each entity instance must have a single value for the attribute, and the attribute must be associated with each entity The identifier attribute is underlined, such as Student_ID

Identifier attribute

Composite Identifier A Composite Identifier is when there is no single (or atomic) that can serve as an identifier Flight_ID is a composite identifier that has component attributes Flight_Number and Date – this combination is required to uniquely identify individual occurrences of Flight Flight_ID is underlined, while its components are not

Composite key attribute

Relationships A relationship is an association among the instances of one or more entity types that is of interest to the organization Relationship Type is a meaningful association between (or among) entities – implying that the relationship allows us to answer questions that could not be answered given only the entity types. It is denoted by a diamond symbol

Relationship (Completes)

Relationship instance Is an association between (or among) entity instances, where each relationship includes exactly one entity from each participating entity type. For example, in the following figure each line represents a relationship instance between one employee and one course, indicating that the employee has completed that course

Relationship types Unary relationship Binary relationship Ternary relationship

Unary relationship Is between the instances of a single entity type (also called recursive relationships) ‘Is_Married_To’ is a one-to-one relationship between instances of the PERSON entity type

Binary relationships Between the instances of two entity types, and is the most common type of relationship encountered in data modelling. Instructor Works in Department

Ternary relationships A ternary relationship is a simultaneous relationship among the instances of 3 entity types It is the most common relationship encountered in data modelling

Cardinality Cardinality is a constraint on a relationship specifying the number of entity instances that a specific entity may be related to via the relationship. The three classifications are: one-to-one one-to-many and many-to-many.

Cardinality Cardinality notation: Notation that shows relationships between entities. Crow’s foot notation: A type of cardinality notation. It is called crow's foot notation because of the shapes, which include circles, bars, and symbols, that indicate various possibilities. A single bar indicates one, a double bar indicates one and only one, a circle indicates zero, and a crow's foot indicates many.

Crow's foot notation is a common method of indicating cardinality Crow's foot notation is a common method of indicating cardinality. The four examples show how you can use various symbols to describe the relationships between entities.

Examples

Composite Entity each employee has involved in many projects and in each project, there is involvement of many employees

Attributes on relationships Attributes may be associated with a many-to-many (or one-to-one) relationship, as well as with an entity e.g., an organisation may want to record the date when an employee completes each course In the following diagram, the relationship ‘Completes’ joins the EMPLOYEE and COURSE entities, and Date_Completed is joined to this as it is a property of the relationship ‘Completes’

Attribute on a relationship