Developing ER-Diagram

Slides:



Advertisements
Similar presentations
ER Modeling Case Studies
Advertisements

Entity Relationship Diagrams
Database Design: ER Modelling (Continued)
Database development (MIS 533) MBS in Management Information Systems and Managerial Accounting Systems (2007 / 2008) Fergal Carton Business Information.
the Entity-Relationship (ER) Model
Lecture plan Outline of DB design process Entity-relationship model
Entity-Relationship (ER) Modeling
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
© Copyright 2011 John Wiley & Sons, Inc.
Enhanced/Extended Relationship-Diagram
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Database Systems: Design, Implementation, and Management Tenth Edition
Mapping ER to Relational Model
Entity Relationship (E-R) Modeling Hachim Haddouti
Data & Process Modeling
IT420: Database Management and Organization
Systems Development Life Cycle
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.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Data.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity Relationship Diagrams
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Lesson-19 Data Modeling and Analysis
CS424 PK, FK, FD Normalization Primary and Foreign Keys Primary and foreign keys are the most basic components on which relational theory is based. Primary.
Modern Systems Analysis and Design Third Edition
BIS310: Week 7 BIS310: Structured Analysis and Design Data Modeling and Database Design.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
PowerPoint Presentation for Dennis, Wixom, & Roth Systems Analysis and Design, 3rd Edition Copyright 2006 © John Wiley & Sons, Inc. All rights reserved..
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
Sample Entity Relationship Diagram (ERD)
1 CSE323 การวิเคราะห์และออกแบบระบบ (Systems Analysis and Design) Lecture 05: Data Modeling and Analysis.
Mid term Exam COVERS chapters 1-3, 7-8 Two parts In class Take home part (given on Oct 29 th, Due Nov5th in class)
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
CSCI 3140 Module 2 – Conceptual Database Design Theodore Chiasson Dalhousie University.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Design Principles – Lecture 3
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
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.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
IFS310: Module 6 3/1/2007 Data Modeling and Entity-Relationship Diagrams.
Entity Relationship Modeling
Chapter 9 Structuring System Data Requirements Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design, 2 nd Edition Copyright 2003 © John Wiley & Sons, Inc. All rights reserved.
DBMS ER model-2 Week 6-7.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
1 Documenting Solutions Todd Bacastow Penn State University Geog 468 GIS Analysis & Design.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Modeling data in the Organization
Entity Relationship Modeling
Systems Analysis and Design
Lecture on Data Modeling and Analysis
Data Modelling Chapter 7
Practice of ER modeling
Practice of ER modeling
Entity Relationship Diagrams
Database Management system
Entity Relationship Model
Presentation transcript:

Developing ER-Diagram Indra Budi indra@cs.ui.ac.id

Data Modeling Process Specifying entities Specifying relationships Determining identifiers (key attribute) Specifying attributes, and Specifying domains Specifying cardinality & participation Specifying specialization & generalization concepts is necessary 2

Specifying Entity Entity – a class of persons, places, objects, events, or concepts about which we need to capture and store data. Named by a singular noun Persons: agency, contractor, customer, department, division, employee, instructor, student, supplier. Places: sales region, building, room, branch office, campus. Objects: book, machine, part, product, raw material, software license, software package, tool, vehicle model, vehicle. Events: application, award, cancellation, class, flight, invoice, order, registration, renewal, requisition, reservation, sale, trip. Concepts: account, block of time, bond, course, fund, qualification, stock. Teaching Notes: Prompt the students for additional examples. Have them classify their example(s). Obtain a data model from a source other than the textbook. Ask the students to classify the entities. 3

Specifying Relationship Examine every combination of two entities and see whether there is a possible relationship between them This is often documented using a matrix that lists the entity names on both axes. A symbol is entered at the intersection of each row and column to indicate the existence of a possible relationship. This technique becomes unusable if the model is large. Look at the requirements documents to find relationships indicated by the documents. The two techniques can be used together 4

Identifiers One or more attributes can serve as the entity identifier, uniquely identifying each entity instance Concatenated identifier consists of several attributes 5

Specifying Attributes Attribute – a descriptive property or characteristic of an entity. Synonyms include element, property, and field. Just as a physical student can have attributes, such as hair color, height, etc., a data entity has data attributes Compound attribute – an attribute that consists of other attributes. Synonyms in different data modeling languages are numerous: concatenated attribute, composite attribute, and data structure. 6

Specifying Domain A domain is the set of valid data properties and values for an attribute. It can be imagined as the source of the possible values of that attribute, including type definition, initial value and value constraints. The use of domains allows attributes to inherit the properties of their assigned domains, and also allows the database administrator to change attribute properties by changing the domain properties. Domains can thus be used to enforce data standards throughout the model. Some organizations use data dictionaries to document and standardize domains and their properties. 7

Cardinality refers to the number of times instances in one entity can be related to instances in another entity One instance in an entity refers to one and only one instance in the related entity (1:1) One instance in an entity refers to one or more instances in the related entity (1:N) One or more instances in an entity refer to one or more instances in the related entity (M:N) 8

Participation Sometimes called modality Refers to whether or not an instance of a child entity can exist without a related instance in the parent entity Not Null means that an instance in the related entity must exist for an instance in another entity to be valid Null means that no instance in the related entity is necessary for an instance in another entity to be valid (min,max) participation 9

ERD - Design Guidelines Best practices rather than rules Entities should have many occurrences Avoid unnecessary attributes Clearly label all components Apply correct cardinality and modality Break attributes into lowest level needed Labels should reflect common business terms Assumptions should be clearly stated 10

True/False A conceptual schema is a complete logical view of the database. An implementational schema shows physical storage using a particular product or technique In E-R modeling, an attribute may be either composite or multi-value, but it cannot be both The degree of a relationship is expressed as the relationship’s maximum cardinality All weak entities must have a minimum cardinality of 1 on the entity on which it depends 11

Multiple Choice The representation of a particular entity is called a(n) ______________. entity class entity relationship entity instance entity attribute None of the above. Supertype / subtype entities are said to have a(n) __________________ relationship. HAS-A IS-A Recursive redundant multi-value 12

Multiple Choice (cont) In terms of generalization hierarchies, the characteristic of “inheritance” means that: the attributes of an instance of the supertype include the attributes of the subtype. an instance of the supertype must belong to one of the subtypes. the attributes of an instance of the subtype include the attributes of the supertype. there is a redundant relationship among instances of the subtype. the attributes of different subtypes must not overlap with each other. 13

Multiple Choice (cont) Minimum cardinality refers to ……. the most instances of one entity class that can be involved in a relationship with one instance of another entity class the minimum number of entity classes involved in a relationship whether or not an instance of one entity class is required to be related to an instance of another entity class whether or not an entity is a weak entity None of the above. 14

Fill in blank In a generalization hierarchy, the ……..entity contains the attributes that are common to all subtypes. Generalization hierarchies have a characteristic called …….which means that entities in the subtypes have all the attributes of the supertype. Relationships among entities of a single entity are sometimes called ….. Relationships When designing a data model the users’ views must be translated into the developers’ …….schema. 15

Exercise A company database needs to store information about employees (identifed by ssn, with salary and phone as attributes), departments (identifed by dno, with dname and budget as attributes), and children of employees (with name and age as attributes). Employees work in departments; each department is managed by an employee; a child must be identi.ed uniquely by name when the parent (who is an employee; assume that only one parent works for the company) is known. We are not interested in information about a child once the parent leaves the company. Draw an ER diagram that captures that information. 16

Addition to Group Presentation on Monday Each of the clinics in the hospital is identified by a unique name. There are two types of clinics: Local and distant. Clinics located at the main campus of the hospital are local and the remaining ones are distant. Some distant clinics are jointly operated by another health institution XYZ Healthcare. A director is responsible for each clinic. The director is also a doctor. Each doctor may serve as the director of one and only one clinic but may serve as the assistant director of another (one) clinic. There are a large number of laboratories at the hospital; some labs are managed by one clinic, whereas others are managed jointly by two or more clinics. Doctors are assigned to one clinic; each clinic has many doctors. Each patient is assigned to one primary doctor. A doctor takes care of many patients. Each patient has a number of tests done at a number of labs; each lab can carry out a number of tests. Draw an EER Diagram 17