DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.

Slides:



Advertisements
Similar presentations
Entity Relationship (ER) Modeling
Advertisements

Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship (ER) Modeling
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
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.
FIS 431/631 Financial Information Systems: Analysis and Design REA Modeling Joe Callaghan Oakland University Department of Accounting & Finance.
Database Design & Mapping
Chapter 3: Modeling Data in the Organization
Modeling Data The Entity Relationship Model (ER) For Database Design.
Ch5: Software Specification. 1 Descriptive specifications  Describe desired properties of system  Three types:
DATABASE APPLICATION DEVELOPMENT SAK 3408
Information Resources Management January 30, 2001.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
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.
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,
Entity-Relationship Modeling I The cautious seldom err. Confucius.
Data Modeling Using the Entity-Relationship Model
© 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.
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
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.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization Modern Database Management 10 th Edition Jeffrey.
Chapter 3: Modeling Data in the Organization
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Chapter 5 Entity Relationship (ER) Modelling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Chapter 2: Modeling Data in the Organization
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.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
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.
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 2: Modeling Data in the Organization Modern Database Management 11 th Edition.
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.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Databases Illuminated Chapter 3 The Entity Relationship Model.
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
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
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.
Chapter 2: Modeling Data in the Organization
Chapter 3 1 Chapter 3: Modeling Data in the Organization.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
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.
Overview of Entity‐Relationship Model
Database Systems: Design, Implementation, and Management Tenth Edition
Presentation transcript:

DATABASEMODELSDATABASEMODELS

 A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.  4 models ◦ Entity relationship model ◦ Hierarchical model ◦ Network model ◦ Relational model

 IEEE defines ER diagram as ‘ a diagram that depicts a set of real-world entities and the logical relationships among them’  It contains: ◦ Data Objects (Entities) ◦ Attributes ◦ Relationships

 Definition: ◦ An entity is an object or event, real or abstract, about which we would like to store data. Entity is the abbreviation of entity type. It represent a set of entity instances which can be described by the same set of attribute types. The value of the same attribute for each entity instance may be different.

An entity has the following  Name  Description  Identifier  Properties: Estimated number (Max., Min., Average) of entity instances  entity instances  Attributes that describe the Entity Types  Examples of entity type instances

Entity TypesEntity Instance VendorABC Co. EmployeeTarun CourseMBA Department Marketing Department

 Tangible or Intangible Things ◦ The nouns that are used to describe the problem domain will often correspond to the major Entity Types of the system. ◦ Examples: Product, Sensor, and Employee, Department, and Sale Office.  Resources ◦ Any resources that an organization needs to manage should be represented as an Entity Type. ◦ Examples: Inventory, Machine, Bank Account, and Customer.  Roles Played ◦ Roles can be played by persons or organizational units. ◦ Examples: Customers, Managers, and Account representatives.  Events ◦ Events are incidents that occur. An event often involve an interaction between two Entity Types or an action that changes the status of an Entity Type. ◦ Examples: Sale, Delivery, and Registration of a motor vehicle.

 External entity – (anything that produces or consumes information)  Thing (e.g. report or display)  Occurrence or events (e.g. registeration)  Role (e.g. salesperson)  Organizational unit (e.g. accounting department)  Place (e.g. warehouse)  Structure (e.g. File) Data Object can be

Data Attributes describe the properties of a data object. Attributes that identify entities are known as key attributes, that describes an entity are known as non-key attributes. Data attributes are used to perform the following function  Naming the instance of the data object  Description of instance Attributes

 an entity has a set of attributes  attribute defines property of an entity  it is given a name  attribute has value for each entity  value may change over time

 The connection of data objects or entities with each other is known as relationship. car personcar person Basic connection between data objects owns Relationship between data objects

14  Degree of a relationship is the number of entity types that participate in it ◦ Unary Relationship ◦ Binary Relationship ◦ Ternary Relationship

15 Degree of relationships – from Figure 3-2 Entities of two different types related to each other Entities of three different types related to each other One entity related to another of the same entity type

16 Figure 3-12 Examples of relationships of different degrees a) Unary relationships

17 Figure Examples of relationships of different degrees (cont.) b) Binary relationships

18 Examples of relationships of different degrees (cont.) c) Ternary relationship Note: a relationship can have attributes of its own

 Cardinality is the specification of the number of occurrences (instances) of one object that relates to the number of instances of another object.  One-to one relationship  One-to many relationship  Many-to-many relationship

20  One-to-One ◦ Each entity in the relationship will have exactly one related entity  One-to-Many ◦ An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity  Many-to-Many ◦ Entities on both sides of the relationship can have many related entities on the other side

E1 E2 E1 E2 One-to-Many Many-to-Many One-to-One 1:1 1:M M:N

 The number of Entity Instances involved in the Relationship Instances Grouping in a Relationship Type.  Three Forms of Cardinality 1.One-to-one (1:1) DEPARTMENT has MANAGER Each DEPARTMENT has one and only one MANAGER Each MANAGER manages one and only one DEPARTMENT 2.One-to-many (1:m) CUSTOMER places ORDER Each CUSTOMER sometimes (95%) place one or more ORDERs Each ORDER always is placed by exactly one CUSTOMER 3.Many-to-many (m:n) INSTRUCTOR teaches COURSE Each INSTRUCTION teaches zero, one, or more COURSEs Each COURSE is taught by one or more INSTRUCTORs

 Modality describes the possibility that whether a relationship between the entities is required or not.  The modality of a relationship is 0 if the relationship is optional, and the modality is 1 if an occurrence of the relationship is essential.

24 Figure Examples of cardinality constraints a) Mandatory cardinalities A patient must have recorded at least one history, and can have many A patient history is recorded for one and only one patient

25 Figure Examples of cardinality constraints (cont.) b) One optional, one mandatory An employee can be assigned to any number of projects, or may not be assigned to any at all A project must be assigned to at least one employee, and may be assigned to many

26 Sample E-R Diagram (Figure )

E-R Diagram : Examples

Modality: the customer is required to have an order Modality: the customer can arrive without any order Cardinality: single customer Placed a given order Cardinality: customer has Many order customerorder

29  Strong entities ◦ exist independently of other types of entities ◦ has its own unique identifier ◦ identifier underlined with single-line  Weak entity ◦ dependent on a strong entity (identifying owner)…cannot exist on its own ◦ does not have a unique identifier (only a partial identifier) ◦ Partial identifier underlined with double-line ◦ Entity box has double line  Identifying relationship ◦ links strong entities to weak entities

30 Strong entity Weak entity Identifying relationship