Chapter 2 Database System Design Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba Asper School of Business 3500.

Slides:



Advertisements
Similar presentations
Entity-Relationship (ER) Modeling
Advertisements

Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling and the Entity-Relationship Model
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Systems Development Life Cycle
Data Modeling is an Analysis Activity
Asper School of Business University of Manitoba Systems Analysis & Design Instructor: Bob Travica Analyzing system data: Class diagram Updated: October.
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Chapter 3: Modeling Data in the Organization
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
1 MIS 340: Data Modeling 2 Yong Choi School of Business CSUB.
DATABASE APPLICATION DEVELOPMENT SAK 3408
Chapter 3: Modeling Data in the Organization
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
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 Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Entity-Relationship Modeling I The cautious seldom err. Confucius.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
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.
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.
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
the Entity-Relationship Model
Chapter 3: Modeling Data in the Organization
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.
1 Data Modeling 2 Yong Choi School of Business CSUB.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Chapter 2: Modeling Data in the Organization
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
University of Toronto Department of Computer Science © Steve Easterbrook. This presentation is available free for non-commercial use with attribution.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Data Modeling IST210 Class Lecture.
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:
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
CS 405G: Introduction to Database Systems Lecture 2 : Database Design I.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
IMS 4212: Introduction to Data Modeling—Relationships 1 Dr. Lawrence West, Management Dept., University of Central Florida Relationships—Topics.
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Slide 3- 1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
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.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Lecture # 17 July 28,2012 Data Modeling using the Entity Relationship.
Data Modeling Using the Entity- Relationship (ER) Model
Data Modeling Using the Entity- Relationship (ER) Model
Overview of Entity‐Relationship Model
Presentation transcript:

Chapter 2 Database System Design Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba Asper School of Business 3500 DBMS Bob Travica Updated 2015

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS DBS Development Specifications for storage & access methods (indexes), and forms & reports Class diagram (classes & relationships) and write business rules. Business & information needs. Pros & cons. System require- ments. Business case. Analysis Create data model. Customer(CID, Name,..) SalesPerson(EID, Name..) Order(OrderID, EID, CID, OrderDate..) Adjust data model to a database technology (e.g., relational). Design storage & input/output. List or diagram of normalized tables (schema). Design ( Logical, Physical ) Construction TASK RESULT 2 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Unified Modeling Language (UML) Trendy notation for analyzing systems and often used with the object orientation (OO) approach. Contains specific sorts of diagrams: The class diagram is most important for DB systems. Similar to the old Entity-Relationship diagram (E-R diagram) but more compact. 3 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Class Diagram – Concepts Entity:The aspect of reality recorded in the system. Class: Description of an entity, which includes its attributes (properties) and behavior (methods, procedures). Object:One instance of a class with specific data; a record in a database. Attribute:A data property of a class; an aspects of an entity. Behavior:Procedures (methods, processes, functions) performed by the class. Association: A connection between classes or between entities. 4 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Entity:Customer Class: Customer, includes attributes and behavior (below) Object:12257, Joe Jones... (a specific customer) Attributes:CustID, Name... Behavior:AddCustomer, DeleteCustomer... (CRUD) Association: Class Customer is related to class Order reflecting relationship between entities Customer and Order. Examples from Pet Store Application 5 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Associations  Associations (Relationships) reflect business specified in business rules*  Sometimes common-sense rules (Figure A) NOTE: Assumed way of reading is left-right and top-down. If the relationship is drawn that way, the arrowhead is not necessary. Arrowheads needed when these rules are not followed (Figure B). places  (A) Customer Order  belongs to (B) Customer Product Search Profile  Sometimes rules unique to an organization (Figure B) 6 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Association Degree refers to the number of classes involved in an association: 1) Class with itself – unary (below); rare Degree of Association Employee manager worker  manages 2) Between 2 classes – binary (previous slide); most frequent and most important!) 3) Between 3 or more classes – N-ary; rare 7 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Example: An employee must work in only one department, and one (each) department has one or more employees. Multiplicity (Cardinality*) of Associations Multiplicity refers to the number of objects participating in a relationship. Department Employee works in * Just maximum multiplicity is often used, and associations are classified on it as well. Department Employee works in 1 * Example: many-to-one (M:1) relationship 8 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS  One-to-many (1:M) - examples: Customer—Order, Client—Account  Many-to-many (M:N) - examples: Order—Item, Student—Course  One-to-one (1:1) - example: Customer—BillingAddress, Citizen-- SocaiInsuranceUser (IncomeTaxPayer…) Types of Associations based on Multiplicity 9 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Procedure for Determining Multiplicity (Form A question) And…  1.Ask the multiplicity question: One (each) object on the left side of the association is associated with how many objects on the right side? Minimally, maximally? Department Employee works in Department Employee works in Write the numbers/asterisks on the right side. 10 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS 3. Ask the same question from the other side of the relationship: One (each) object on the right side of the association is associated with how many objects on the left side? Minimally, maximally? Department Employee <employs 1..1 Department Employee <employs * 4. Write the numbers/asterisks on the left side. Or  Note: You need to memorize the multiplicity question! 11 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS 1. How many objects on the left side are associated with one (each) object on the right side? 2. Write the numbers/asterisks of the left side. Procedure for Determining Multiplicity (Form B question) Note: We usually need to ask just about maximum multiplicity. 3. How many objects on the right side are associated with one (each) object on the left side? 4. Write the numbers/asterisks on the right side. Department Employee works in  * 12 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS NOTE: Some imprecision in Fig. 2.8 p. 49 in 5 th ed. (p th ed.): “Order” is called “Sale” in sentence two. Notation for Multiplicity  Multiplicity options:  0 (zero)  1 (one)  * (many); also labeled as M or N  specific number, if known (3, 10); e.g., in part-whole relationship Customer Order Item * 0..* 1..*. places contains Order_Item 13 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Business Rules for Cardinality - Read/Write  1) One customer can place one or more orders, and each order is placed by one and only one customer.  2) Each order can contain one or more items, and an item can be listed on no (0) order or on many orders. * Business Rules: If min. multiplicity >= 1, association is mandatory; If min. multiplicity = 0, association is optional. Customer Order Item * 0..* 1..*. places contains Order_Item 14 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS N-ary Association  Degree of association => 3. The above diagram shows ternary association, not three binary associations.  Components are assembled into Products by Employees. Simultaneous, inter-dependent relationships. Read multiplicity.  Support to inventory scheduling, quality control, performance measurement.  But, the data model is not complete as shown! Employee Component Product * * * * * * NOTE: Some imprecision in Fig. 2.9 on p. 49 in 5 th ed. (p. 46 in 4 th ed.). An association between Employee and Component missing; incorrect way of stating M:M multiplicity. assembled by assembles assembled in 15 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS N-ary Association with Associative Class  N-ary associative class Assembly introduced. Product ProdID Name Employee EmpID Name Component CompID Type Name Assembly Date Time EmpIDProdIDCompIDDateTime 11A /01/0207:15 11A /01/0207:30 11A /01/0207:45 11A /01/0207:55 12A /01/0213:00 12A /01/0315:30 assembled by assembles assembled in  The key in Assembly combines keys from source associated classes. Its own attributes are Date and Time. Table Assembly: 16 of 17

DBSYST DDBBSSYYSSTTEMEMSSDDBBSSYYSSTTEMEMSSS Focus on Keys: Generic vs. Unique  Product: specific model of car (ProdID is a generic key signifying a group of things, many instances)  Component: car door (CompID is a generic key)  Employee: assembly worker (EmpID is a unique key signifying a specific person, one and only one instance)  This design can use unique keys (e.g., serial numbers) for products and components. 17 of 17