Entity-Relationship Modeling II “We don’t live in a world of reality, we live in a world of perceptions.” J. Gerald Simmons.

Slides:



Advertisements
Similar presentations
Relational Database Modeling II We dont live in a world of reality, we live in a world of perceptions. J. Gerald Simmons.
Advertisements

Entity Relationship (E-R) Modeling Hachim Haddouti
Alternative Approach to Systems Analysis Structured analysis
Advanced Data Modeling
Entity Relationship (ER) Modeling
Database Modeling I The cautious seldom err. Confucius.
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
Modern Systems Analysis and Design Third Edition
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
Entity Relationship (E-R) Modeling
System Analysis - Data Modeling
Starting The Process Chapter 5 Database Design For Mere Mortals.
Entity Relationship Diagrams Basic Elements and Rules.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Chapter 10 Structuring System Requirements: Conceptual Data Modeling.
Entity-Relationship Model and Diagrams (continued)
Chapter Five Data Modeling with the Entity-Relationship Model.
Entity Relationship Diagrams
Information Resources Management January 30, 2001.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (E-R) Modeling
Chapter Five Data Modeling with the Entity-Relationship Model.
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
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Entity-Relationship Design
1 Chapter 4 Enhanced E-R Model. 2 Supertypes and Subtypes Subtype: A subgrouping of the entities in an entity type which has attributes that are distinct.
 Keys are special fields that serve two main purposes: ◦ Primary keys are unique identifiers of the relation in question. Examples include employee numbers,
Entity-Relationship Modeling I The cautious seldom err. Confucius.
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
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.
Business Process Modeling
Chapter 5 Entity Relationship (ER) Modelling
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 7 Structuring System Requirements: Conceptual Data Modeling 7.1.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
IS 475/675 - Introduction to Database Design
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
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.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
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.
Database Design – Lecture 4 Conceptual Data Modeling.
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
Modern Systems Analysis and Design Third Edition
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.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Business System Development
Entity Relationship (E-R) Modeling
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

Entity-Relationship Modeling II “We don’t live in a world of reality, we live in a world of perceptions.” J. Gerald Simmons

Class Outline  Using the ER methodology and notation discussed last day, create a completed entity-relationship model for: a simple university faculty database  What are weak entities?  What is a generalized hierarchy?  What are the strengths and weaknesses of the Entity- Relationship model?  What are some guidelines for determining conceptual methodology?

E-R Modeling: University Example  A database is to be set up to record information about faculty, the courses they teach, and the students who take courses. Some courses are taught by teams of faculty members. Step 1. Identify entity types STUDENTFACULTYCOURSE FACULTYCOURSE teaches STUDENTCOURSE takes Step 2. Identify relationships

University Example (cont’d)  Step 3. Determine relationship type. Ask: –Each faculty member teaches how many courses? –Each course is taught by how many faculty? –Each student takes how many courses? –Each course is taken by how many students? Use occurrences diagram to visualize relationship between entities F1C1F2C2F3C3F4C4F5C5F6C6F1C1F2C2F3C3F4C4F5C5F6C6 S1C1S2C2S3C3S4C4S5C5S6C6S1C1S2C2S3C3S4C4S5C5S6C6

University Example (cont’d)  Step 3. Determine Relationship type (cont’d) For FACULTY-teaches-COURSE we are told each faculty member teaches zero, one, or two courses. We are told some courses are taught by zero, one, two, or three faculty. For STUDENT-takes-COURSE each student enrolls in one to six courses and each course is taken by zero or up to 30 students. FACULTYCOURSE teaches MN This is a many-to-many relationship. STUDENTCOURSE takes MN This, too, is a many-to-many relationship.

University Example (cont’d)  Step 4. Determine level of participation FACULTY-teaches-COURSE - level of participation is optional, since sometimes Faculty do not have to teach (e.g., sabbatical); similarly, a course may not have anyone interested in teaching it FACULTYCOURSE MN FACULTYCOURSE teaches MN (0,2)(0,3) STUDENT-takes-COURSE - level of participation is mandatory since students must take at least one course; a course, however, may or may not have students taking it STUDENTCOURSE takes NM (1,6)(0,30)

University Example (cont’d)  Step 5. Assign an identifier for each entity FacultyID, CourseID, StudentID  Step 6. Draw completed E-R diagram COURSESTUDENT taken by CourseID,... StudentID,... FACULTY taught by FacultyID,... M N M N (0,30)(1,6) (0,2) (0,3)

University Example (cont’d)  You are now told that in addition to the relationships given, each student is assigned a faculty advisor who gives direction in choosing courses.  Use occurrences diagram to visualize relationship between entities  We are told each student is advised by exactly one faculty advisor. We can assume that each faculty member advises zero, one, or more students. This means the additional relationship is of type one-to- many or 1:M.  The STUDENT is on the many side of the relationship and must be advised, therefore, faculty is mandatory to student; FACULTY on the one side of the relationship may or may not have a student, therefore, student is optional to faculty. STUDENTFACULTY advises 1M (0,N)(1,1)

University Example (cont’d)  Step 6. Draw completed E-R diagram FACULTY COURSE STUDENT takes taught by CourseID,... StudentID,... FacultyID,... advise s 1 M 1 M 1 M (1,6) (0,30)(0,3) (0,2) (0,N) (1,1) M1 1 M CourseID, FacultyID... StudentID, CourseID...

Weak Entities  an entity that has a dependency on the existence of another entity (mandatory participation) and  has a primary key that is partially or totally derived from the parent entity of the relationship  depict weak entity with a double outline EmployeeID,...EmployeeID, DependentID,... CourseID,...CourseID, SectionID,... ` contains ` has a EMPLOYEE DEPENDENT COURSE SECTION

Generalization Hierarchy  A subtype entity is an entity that contains a set of optional attributes of the supertype entity and inherits its attributes and its relationships from the supertype entity  If the supertype entity is related to exclusive (can belong to only one subtype) subtype entities, indicate with G; if subtypes are overlapping (can belong to more than one), use Gs subtype supertype CLIENT INDIVIDUALCORPORATE The same identifier (e.g., ClientID) is used for the supertype as well as subtype. CONTRACT PRODUCTSSERVICES G Gs

Evaluation of the E-R Model  Using data models to conceptualize the design of a database saves time and money because a completed E-R diagram is the actual blueprint of the database. Its composition must reflect an organization's operations accurately if the database is to meet that organization's data requirements.  The completed E-R diagram also lets the designer communicate more precisely with those who commissioned the database design. It’s easier to correct design flaws at the data modeling stage.  Do not confuse entities and relationships with actual tables. The transformation or decomposition of E-R models will be discussed within the next few weeks.  E-R modeling is an iterative process. Even when complete, ER models generally do not provide a complete picture (e.g., business rules cannot always be shown), therefore, much additional documentation is necessary.

1.Define the problem and define database objectives 2.Analyze current database, assess user requirements, and create data model 3.Design data structures (tables, fields, field specifications, establish keys) 4.Establish table relationships 5.Clarify business rules critical to database design (e.g., required fields, validation rules) 6.Determine and establish user views of data 7.Review data integrity and reiterate design methodology Conceptual Design Methodology

Statement of Purpose 1.Declare a specific purpose for the database to focus and guide its development e.g., “The purpose of the All-Star Talent database is to maintain the data we use in support of the entertainment services we provide to our clientele.” 2.Articulate goals & objectives that define specific tasks “We need to maintain complete entertainer information.” “We need to maintain complete customer information.” “We need to track all customer-entertainer bookings.” “We need to maintain financial records of both payments from customers and payments to entertainers.”

Assessment of User Requirements: What is analyzed?  interview transcripts  meeting minutes  observational notes  business mission and strategy statements  questionnaire results  document analyses business forms reports flow charts presentations computer-generated output (spreadsheets, graphs, etc.) training manuals consultant reports job descriptions

Assessment of User Requirements: Specific requirements  What are subjects/objects for the business?  What characteristics describe each object?  What unique characteristic distinguishes each object from other objects of the same type?  How do you use this data (e.g, summary reports)?  Over what period of time are you interested in this data?  Are all instances of each object the same?  What events occur that imply associations between various objects?  Is each activity or event always handled the same way or are there special circumstances? Goals of analysis of user requirements: collect a list of business goals, entities to track, a database schema, and sample report outputs.

Rules for Conducting User Interviews  Create a quiet, stress-free environment; set a limit of six people  Have an agenda - provide it to participants ahead of time  Focus on the problem at hand; maintain control of the interview  Conduct separate interviews for users and management  Identify the decision maker  Avoid technical jargon  Show concern for user needs  Give everyone equal and undivided attention  Write down everything where it can be seen by participants  Encourage ‘blue sky’ thinking  Arbitrate disputes  Keep the pace of the interview moving  Don’t foreclose your options too soon

A good designer combines the art of design with the science of design. Characteristics of a Database designer  Knowledge of the problem you are trying to solve  Communication skills - extensive discussions with users  Analytical aptitude - keep in mind the broad goals even while poring over the smallest details  Impertinence - question everything!  Impartiality - find best solution  Relax constraints - assume anything is possible  Pay attention to details and definitions  Reframing - iteratively analyze in new way - be creative!