Chapter 2 Modeling Data in the Organization

Slides:



Advertisements
Similar presentations
Database Design The process of finding user requirement
Advertisements

Entity-Relationship Modeling (ER-M)
Entity Relationship (E-R) Modeling Hachim Haddouti
ENTITY RELATIONSHIP MODELLING
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Information Resources Management February 6, 2001.
Information Resources Management January 30, 2001.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Systems Analysis and Design in a Changing World, 6th Edition
The Enhanced E-R (EER) Model
Chapter 2 Modeling Data in the Organization
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
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.
Instructor :Huda Al-Omair
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Chapter 5 Entity Relationship (ER) Modelling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
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.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Design 3: Advanced Data Modeling Concepts CS 320.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Weak Entity Sets A weak entity is an entity that cannot exist in a database unless another type of entity also exists in that database. Weak entity meets.
Entity Relationship Modeling
advanced data modeling
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Introduction to Database Systems
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Data Modeling and Entity-Relationship Model I
Entity Relationship (E-R) Model
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Let try to identify the conectivity of these entity relationship
Chapter 4: Part B Logical Database Design and the Relational Model
Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling
Tables and Their Characteristics
Chapter 7: Entity-Relationship Model
Entity-Relationship Modelling
Chapter 7 Entity-Relationship Model
Outline of the ER Model By S.Saha
Chapter 5 STUDENT-COURSE
Entity Relationship Diagram
Overview of Entity‐Relationship Model
Database Systems: Design, Implementation, and Management Tenth Edition
Data Modeling with Entity Relationship Diagrams (Cont.)
Entity-Relationship Modelling
MIS2502: Data Analytics Relational Data Modeling
Database Systems Instructor Name: Lecture-11.
Data Modeling for Database Design 2
Database Modeling using Entity Relationship Model (E-R Model)
CHAPTER 2 - Database Requirements and ER Modeling
Chapter 4 Entity Relationship (ER) Modeling
Chapter 7: Entity-Relationship Model
Entity-Relationship Diagram (ERD)
Mapping an ERD to a Relational Database
MIS2502: Data Analytics Relational Data Modeling 2
Database Management system
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

Chapter 2 Modeling Data in the Organization Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga University Spokane, WA 99258 chen@gonzaga.edu

Review Q: (#11; p.85) Four types of cardinality constraints are: (Fig 2-26)

Q: (#11; p.85) Four types of cardinality constraints are: a. Optional one: b. Mandatory one:

Q: (#11; p.85 (cont.) c. Optional Many: d. Mandatory Many

Review Q: (#12; p. 85) Another example of Weak Entity Phone Call (see below) is an example of a weak entity because a phone call must be placed by a PERSON. In this simple example, PHONE CALL is related to only one other entity type, thus, it is not necessary to show the identifying relationship; however, if this data model were ever expanded so that PHONE CALL related to other entity types, it is good practice to always indicate the identifying relationship.

Review Q: (#13; p.85 ) Degree of Relationship? a. Unary (one entity type): b. Binary (two entity types):

Q: (#13; 101) Degree of Relationship (cont.) c. Ternary (three entity types):

Problems and Exercises

#7) Exercise: Note: Assume Student Name is unique and available to be used as the identifier.

#7 (version b). Notes: Assume that Student_Name is the identifier. Age cannot be calculated without date-of-birth.

What tables are needed in order to produce the report? #10 – Figure 2-26 (p. 103) What tables are needed in order to produce the report? Student Course/ Course_Section Instructor

#10 NOTE: The addition of Semester and Year attributes on the Registers_for relationship allows this diagram (and resulting database) to reflect multiple semesters of data.

Grade Semester Year STUDENT COURSE INSTRUCTOR Student_id Name Address Major COURSE Course_id Title Instructor_id Register-for teaches INSTRUCTOR Instructor_id Instructor_Name Office

QUESTIONS: 1. John Smith is taking five courses (BMIS441, ACCT464, ACCT363, BFIN422 and MGMT400) in Fall 2013, can we create the course information in either STUDENT or COURSE table? 2. If Yes/How? If No/Why and how to solve the problem? Issues to discuss: 1. Can we insert additional records with other information (e.g., grades etc.) directly to “STUDENT” entity or “COURSE” entity directly? 2. If Yes/How? If No/Why and how to solve the problem?

Grade Semester Year STUDENT COURSE INSTRUCTOR Student_id Name Address Major COURSE Course_id Title Instructor_id Register-for teaches INSTRUCTOR Instructor_id Instructor_Name Office

STUDENT COURSE INSTRUCTOR Student_id Name Course_id Address Title Major COURSE Course_id Title Instructor_id REGISTRATION Student_id Course_id Grade Semester Year teaches INSTRUCTOR Instructor_id Instructor_Name Office

STUDENT COURSE INSTRUCTOR Student_id Name Course_id Address Title Major COURSE Course_id Title Instructor_id was registered Register-for REGISTRATION Student_id Course_id Grade Semester Year teaches INSTRUCTOR Instructor_id Instructor_Name Office

#11) Exercise: Note: attributes are omitted from the ERD solutions for this Problem and Exercise (Part I: a-c) a. Figure 2-5 b. Figure 2-10a c. Figure 2-11b

d.) Exercise: Figure 2-12 Part II: d-f

e) Figure 2-13c f.) Figure 2-14

12.) Part II. Exercise: (p.103)

12.) Part II. Exercise: (cont.)

Q: (#15; 103) Degree of Relationship? Figure 2-11a A binary relationship with an attribute Attribute on a relationship (Link Attribute/Associative)

#15 (p.103) Figure 2-11a (Modified)

Course_ID Student_ID Advisor_ID Advisor_ID (fk) 20.) HW: STUDENT and ADVISORs ERD Course_ID Student_ID Advisor_ID Advisor_ID (fk)

20.) HW: STUDENT and ADVISORs ERD Course_ID Student_ID Advisor_ID

20.) HW: STUDENT and ADVISORs ERD

ADVISING Course_ID Student_ID Advisor_ID Student_ID Semeter Advisor_ID 20.) HW: STUDENT and ADVISORs ERD Course_ID Student_ID Advisor_ID ADVISING Semeter Year Student_ID Advisor_ID

Course_ID Student_ID Advisor_ID Advisor_ID (fk) 20.) HW: STUDENT and ADVISORs ERD Course_ID Student_ID Advisor_ID Advisor_ID (fk)

#21) Figure 2-4a Revised for Sarbanes-Oxley compliance purposes Appropriate entities

13.

17. a Yes, the attribute names do generally follow the guidelines for naming attributes.

17. b Assignment: All three entities participate in the Assigned relationship that is modeled as an associative entity Assignment, since the Assign_Date for each Chemist’s assignment to a particular project and equipment item must be tracked. However, EQUIPMENT and PROJECT do not need to participate in any assignments. All entities can have multiple assignments.

17. c Note: SECTION is modeled as a weak entity. It could have been modeled as a multivalued attribute; however, using a weak entity is better, since SECTION may have a relationship with another entity. A multivalued attribute could not be used to show this relationship.

17. d Both Admits and Treats relationships were created since the patient could be treated by other PHYSICIANs in addition to the admitting PHYSICIAN. Hospital was not included as an entity in this case as there was insufficient information in the scenario write-up to indicate that the data model needed to allow for multiple hospitals (e.g., in the case of a large health-care organization). The current ERD does not allow for the tracking of multiple admissions over time by different physicians. The ERD would need a M:N relationship between PHYSICIAN and PATIENT in order to track that kind of data. If the date of admission needs to be tracked, under the circumstances of tracking multiple admissions over time, the ERD could be revised to show Date Admitted as an attribute of the M:N Admits relationship, just as Treatment Detail is an attribute of the Treats relationship. The ERD could also be revised to show ADMISSION and TREATMENT DETAIL associative entities (with corresponding attributes) instead of the M:N relationships currently discussed. Both Admits and Treats relationships were created since the patient could be treated by different PHYSICIANs than the admitting PHYSICIAN.

17h. Note to Instructor: This problem and exercise is a good lead-in for Chapter 3 modeling notation for the Extended Entity Relationship Diagram (EERD). The P&E offers several chances to provide better representation in the EERD (with subtyping) than the ERD notation that is provided in Chapter 2. Using EERD notation, a single LEGAL ENTITY can be shown as a supertype, with subtypes of DEFENDANT and PLAINTIFF. The ‘type’ (person or Organization) characteristic of both DEFENDANT and PLAINTIFF may also be considered for further subtyping. The solution presented here is a valid answer to the P&E, given the limitations of basic ERD notation and what is currently known about the situation.   This P&E also provides the instructor with an opportunity to discuss how history might be modeled if the business assumption regarding the tracking of Net Worth for both Plaintiff and Defendant was changed from only being concerned with Net Worth at the time of the CASE, to wanting to track the Net Worth over time of each party to the CASE. Refer to the chapter section on “Modeling Time-Dependent Data” and Figure 2-19 for more information on how this ERD could be revised.

17h.

17. i

18. PVFC ERD

19. Emerging Electric ERD

22.

22 (cont.) Entities: Employee: An employee of the firm. An employee works for one sales office and may manage one sales office. It is not explicitly indicated that the employee can only manage the office that he/she works for. This would require a business rule.   Sales Office: The office where real estate is sold. Property: Buildings for sale, such as houses, condos and apartment buildings. Owner: The individual who owns one or more properties. Attributes on Employee: Employee ID: A unique identifier for an employee. This attribute must be unique. Employee Name: The name of the employee. Attributes on Sales Office: Office Number: A unique identifier for the office. Office Location: The physical location of the sales office. This data may be made up of the city and state.

22 (cont.) Attributes on Property: Property ID: The unique identifier for the property. Property Location: A composite attribute that consists of the street address, city, state, and Zip Code.   Attributes on Owner: Owner ID: The unique identifier for the owner. Owner Name: The name of the owner. Relationship: Is Assigned: An employee is assigned to one sales office. A sales office may have many employees assigned but must have at least one employee. Manages: An employee may manage one sales office or no sales office. Each sales office is managed by one employee. A business rule is needed here in order to indicate that an employee can only manage the sales office in which he or she works. Lists: Each property is listed by only one sales office. Each sales office can list one, none, or many properties. Owns: Each property has one or more owners. Each owner can own one or more properties. Percent Owned is an attribute on Owns; it tracks the percent of property that a particular owner owns.

26. Stillwater Antiques ERD

27. A.M. Honka School of Business ERD

28. Wally’s Wonderful World of Wallcoverings ERD:

29. Peck and Paw ERD