Entity-Relationship Diagrams

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Chapter 6: Entity-Relationship Model (part I)
Entity-Relationship (ER) Modeling
Text-Book Chapters (7 and 8) Entity-Relationship Model
System Analysis - Data Modeling
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
Entity Relationship Diagrams Basic Elements and Rules.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity Relationship Diagrams
Entity Relationship Diagrams
Information Resources Management January 30, 2001.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Modern Systems Analysis and Design Third Edition
Entity-Relationship Design
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Data Modeling Using the Entity-Relationship Model
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.
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.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
ZEIT2301 – Database Design Entity-Relationship Diagrams
Data Modeling ERM ERD.
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 2. FUNDAMENTAL OF ENTITY RELATIONSHIP (ER)
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Conceptual Data Modeling, Entity Relationship Diagrams
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
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.
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.
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.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling Management Information Systems Robert.
ITTelkom Entity Relationship Diagram (1) CS2343 Perancangan Basisdata Relasional.
Entity Relationship Modeling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
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.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Lecture 91 Introduction to Data Analysis and Logic Specification Objectives l Draw an entity-relationship diagram, and explain the types of entity relationships.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Lecture 5 Entity Relationship Modeling
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
Tables and Their Characteristics
Outline of the ER Model By S.Saha
Entity Relationship Diagrams
MIS2502: Data Analytics Relational Data Modeling
Database Modeling using Entity Relationship Model (E-R Model)
Review of Week 1 Database DBMS File systems vs. database systems
MIS2502: Data Analytics Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling 2
Entity Relation Model Tingting Zhang.
Presentation transcript:

Entity-Relationship Diagrams

Solutions to Homework #1

Project Partners, Inc. Data Flow Diagram

Project Partners, Inc. Data Flow Diagram

Project Partners, Inc. Data Flow Diagram

Project Partners, Inc. Process Details

Project Partners, Inc. Process Details

Project Partners, Inc. Process Details

Project Partners Information Requirements Consider this list to be the minimum set of data. Client information (Company name, address) Project name and description. This includes the starting and ending dates of the engagement; identifier of the underlying contract and an indication of the type of engagement (I.e., fixed price vs time & materials); and the client’s project manager information (their name, address, phone, and fax). List of PPI’s standard project activities Each of these activities includes its activity id, description, and an indicator of whether it is normally billable. Activities which are normally billable include analysis, design, programming, etc. Some activities (e.g., proposal preparation, vacation, sick time, etc.) are always considered to be overhead and hence are never billable.

Project Partners Information Requirements List of PPI’s standard project activities Note that it is PPI’s policy to “charge” anything to a project that can be attributable to a project or engagement, irrespective of whether it is billable and therefore to be included on an invoice. Please note that these are not specific instances of consultant’s activities, but a list of possible activities that could be entered by someone using the time sheet entry system. Standard billing rate for each class of consultant Other information related to the class of consultant should include a title and brief description. Assignment information Each consultant who can record billable time for a project should have information pertaining to the beginning and ending dates of their billable involvement along with their actual billing rate for the project. Non-billable time may be charged by the consultants or by other individuals to a given project. This insures that all time spent on a project is recorded even if it is never included in an invoice to the client.

Project Partners Information Requirements Timesheet information The information which appears on a consultant’s timesheet includes: Client company identifier and name project id and name; client’s project manager name, address, and phone number type of work performed (generally drawn from a list of standard activities, such as analysis, design, programming, testing, implementation, etc.) brief narrative description of the work performed the amount of time, in hours and fractions, spent on each activity an indication of whether the time should be billed to the client Consultant information Information about each consultant should include their id, name, consultant billing class, and phone number where they can be reached at the client site. Remember that a consultant may work at more than one client in any given period of time.

Entity-Relationship Diagrams

Entity-Relationship Diagram A model that represents system data by entity and relationship sets.

ERD Elements Entities Relationships Identifiers Attributes Things about which you collect information Relationships Means of association between entities Identifiers Unique attributes of entities Attributes Characteristic or property of the entity that is of interest

ERD Symbols Entities: rectangle Relationships: diamond on a line with cardinality indicated (1 to M) or lines with “chicken feet” Identifiers: underlined text Attributes: text by the entity (if shown at all on diagram)

Sample ERDs Order Part Supplier Entity attributes: ORDER 1 CAN HAVE 1 ORDER: #, DATE, PART #, QUANTITY PART: #, DESCRIPTION, UNIT PRICE, SUPPLIER # SUPPLIER: #, NAME, ADDRESS Order 1 CAN HAVE 1 Part PART M CAN HAVE 1 Supplier SUPPLIER

Entity Sets Each individual object is called an entity. A collection of such entities is an entity set. Example: Joe, Jill, and Mary represent entities. They are all ascribed to the entity set, PERSON. Example: A collection of projects is the project entity set.

Relationship Relationship Relationship set One interaction between one or more entities For example: if a person works on a project, there is a relationship between that person and the project Relationship set A collection of such relationships. A component in an E-R diagram that represents a set of relationships with the same properties.

Notes on Entities and Relationships We can actually see entities, but we cannot see relationships. For example: Entity sets: Person; project Relationship: People work on projects. This becomes the relationship set “Work” Persons The set of people, set of projects and set of working relationships. Work Projects

Entity-Relationship Structures Persons are in departments Persons work on projects Persons Parts Supply Suppliers Projects use parts Suppliers supply parts Warehouses hold parts Hold Are-In Work-On Use Warehouses More complex relationship: See persons and parts Depts Projects

Entities can have multiple relationships Companies Leases Owns Vehicles

More than two entity sets can be associated with the same relationship set Relationship sets that include only two entities are known as binary. More than two are known as N-ary. Customers Buy Stores Each relationship in this set includes a person, a part bought by the person, and the store where the purchase was made. Parts A person, a part bought by the person, and the store where the purchase was made

It is always possible to remove an N-ary relationship by replacing it with an entity set. Purchase Of By From Parts Customer Stores

Exercise Employees are in departments Each department has sections.

Departments Have Are in is not needed Are in Sections Employ Persons

Departments Have Are in is not needed Sections Employ Persons

Identifiers One of the attributes of an entity or relationship set is called the identifier It has one important property: its values identify unique entities in the entity set.

Identifiers are underlined here PERSON-ID NAME ADDRESS PROJECT-ID TIME-SPENT START-DATE BUDGET Persons Work Projects The set of people, set of projects and set of working relationships.

Convention for Identifiers in Relationships Use the identifiers of the entities that participate in the relationship as the relationship identifiers. Identifiers are not file keys here. At this stage, they are the identifiers of entities that participate in the relationship.

Cardinality The number of relationships in which one entity can appear. An entity can appear in: one (1) relationship; any variable number (N) of relationships; and a maximum number of relationships

Cardinality - Example Persons N Work M Projects PERSON-ID NAME ADDRESS PROJECT-ID TIME-SPENT START-DATE BUDGET Persons N A persona can appear in more than one WORK relationship, and so can a project. If there was a limit to the number of times an entity can take part in the relationship, then N or M would be replaced by the actual maximum number. Work M Projects The set of people, set of projects and set of working relationships.

Cardinality - Example Manager 1 Manage N Projects MANAGER-ID NAME ADDRESS PERSON-ID PROJECT-ID TIME-SPENT START-DATE BUDGET Manager 1 Here a project has one (1) manager, whereas a manager can manage any number (N) of projects. Manage N Projects The set of people, set of projects and set of working relationships.

Cardinality - Example Manager 1 Manage N Projects MANAGER-ID NAME ADDRESS PERSON-ID PROJECT-ID TIME-SPENT START-DATE BUDGET Manager 1 The denotes optional participation on the project. If it is mandatory, then there is no placed there. Manage N Projects The set of people, set of projects and set of working relationships.

Issues in building an ER-Diagram How to choose entities, relationships and attributes How to choose names What steps should be followed

Choosing Atrributes Attributes, just like entity and relationship sets, should express simple concepts. E-R diagrams should not contain multivalued or structured attributes For example: PERSON-ID DATE-OF-BIRTH QULIFICATION* (asterisk means it is multivalued-repeating) ADDRESS (NUMBER, STREET, SUBURB) PERSONS Non-simple attributes Addresses has structured attributes. These should be replaced in the final diagram by relationships.

Ex: Removing multivalued and structured attributes PERSON-ID DATE-OF-BIRTH Persons PERSON-ID QUALIFICATION HAVE LIVE-AT PERSON-ID NUMBER STREET SUBURB QUALIFICATION NUMBER STREET SUBURB QUALIFICATIONS ADDRESSES

Choosing Object Set Names Remember, that one goal of E-R modeling is to produce a model that is easily understood by users as well as computer personnel. Entity sets are labeled as nouns Relationship sets are labeled by verbs Relationship sets are structured as prepositions when modeling structural relationships (see PURCHASES example [building has rooms])

Where to begin Start with entity sets Look at how entities interact with each other and model this in terms of relationship sets Then add cardinality to the system Add attributes and choose identifiers

Dependent Entities A dependent entity set depicts a set of entities whose existence depends on other entities. INVOICE-NO INVOICE-DATE INVOICES PROJECTS PROJECT-ID DATE-STARTED INVOICE- LINES PROJECT-ID TASK-NO BUDGET INVOICE-NO LINE-NO AMOUNT TASKS Note: dependent entities have composite identifiers

Machines Machines N Use N Use M M Projects PROJECTS Machine Availability Use N Use M M Projects PROJECTS

SUBSETS Example: generic: loan applications Different types of loan applications which have unique attributes

PERSONS STUDENTS TEACHERS N N TAKES TEACHES M M COURSES Occurrence diagram for entity set PERSONS and its subsets PERSON-ID NAME ADDRESS PERSONS PERSON-ID MAJOR STUDENTS TEACHERS PERSON-ID DATE-HIRED N N PERSON-ID COURSE-NO SEMESTER-TAKEN RESULT PERSON-ID COURSE-NO SEMESTER-TAUGHT TAKES TEACHES M M COURSES COURSE-NO COURSE-NAME

STAFF STUDENTS CLUB-MEMBERS N USE M COURTS STUDENT-ID STAFF-ID MAJOR MEMBER-NO STAFF STAFF-ID DATE-JOINED MEMBER-NO. STUDENTS CLUB-MEMBERS MEMBER-NO. MEMBER-GRADE DATE-JOINED-CLUB COMBINING SUBSETS FROM A NUMBER OF ENTITIES N USE MEMBER-NO COURT-NO NO-TIMES-USED M COURTS COURT-NO LOCATION