Data modeling using ER1 Entity relationship diagrams.

Slides:



Advertisements
Similar presentations
Entity Relationship Diagrams
Advertisements

Conceptual Data Modeling: ER
Entity Relationship (ER) Modeling
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity Relationship (ER) Modeling
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
Entity-Relation Modeling Hun Myoung Park, Ph.D., Public Management and Policy Analysis Program Graduate School of International Relations International.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
The (min,max) notation (1,1) (0,1) (1,N) (1,1). SUMMARY OF ER-DIAGRAM NOTATION FOR ER SCHEMAS Meaning ENTITY TYPE WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING.
APPENDIX C DESIGNING DATABASES
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity-Relationship Model
© 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.
the Entity-Relationship Model
CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
Chapter 3: Modeling Data in the Organization
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Entities and Attributes
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Conversion from ER diagram to relational model
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Chapter 2: 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.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
Database Systems Lecture # 7 8 th Feb, Conceptual and Logical Design Person buys Product name pricenamessn Conceptual Model: Relational Model: (plus.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
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.
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:
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.
Chapter 7 Data Modeling with Entity Relationship Diagrams
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
Chapter 3 Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Databases Illuminated Chapter 3 The Entity Relationship Model.
Data Modelling Using Entity-Relationship (ER) Model
advanced data modeling
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 3: Data Modeling Using the Entity-Relationship (ER) Data Model
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
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.
Conversion from ER diagram to relational model 1 ER is a visual model The relational model is a matemathical model.
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
Comp 1100 Entity-Relationship (ER) Model
Entity-Relationship Model
Chapter 3 Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity- Relationship (ER) Model
Entity Relationship Diagram
ER model Ashima Wadhwa.
Entity-Relationship Model
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Entity-Relationship Model
Database Design – Lecture 4
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Entity-Relationship Model
Entity-Relation Modeling
Database Modeling using Entity Relationship Model (E-R Model)
Entity-Relationship Diagram (ERD)
Entity Relation Model Tingting Zhang.
ER MODELING Instructor: SAMIA ARSHAD
Presentation transcript:

Data modeling using ER1 Entity relationship diagrams

Data modeling using ER2 Why analyze data? Insight in data - and structures of data. –Create a structure in “unstructured” data Prior to designing a database A part of the systems development process.

Data modeling using ER3 ER modeling ER modeling is a widely used technique for data analysis. Many notations (syntax) for ER diagrams –Different book  different notations –Diagrams can be drawn using Visio or a similar tool.

Data modeling using ER4 Entities with attributes Characteristics of an entity –An important ”thing” in the world we model. –Entities have attributes (data) –Similar to a class in OOA, but has no methods / functions. Notation (my version) –Entity: Rectangle –Attribute: Oval

Data modeling using ER5 Types of attributes Simple or composite attributes –simple (atomic) e.g. age Notation: Oval –composite address = street + number + ZIP code + town Notation: Oval connected to several ”sub” ovals.

Data modeling using ER6 Types of attributes II Single valued or multi-valued –Single valued e.g. CPR –Multi-valued e.g. phone number One person may have several phones Notation: Double oval –An attribute may be composite and multi- valued!

Data modeling using ER7 Types of attributes III Derived: Calculated from other attributes e.g. sum or average –Notation: Oval with a dashed border An attribute with no value has value NULL –Values does not exist. –Value unknown.

Data modeling using ER8 Entities An entity type is like a class –Naming convention: Substantive, singular Every “instance” of the entity must be unique –Identified by a key, one or more attributes Notation for keys: Underline the name of the attribute(s)

Data modeling using ER9 Relationships Relationships between entities. Notation: Rhomb Similar to association in OOA. Relationships may have attributes –Notation: Oval

Data modeling using ER10 Relationships II Binary relationship –Relationship between 2 entities (normal) Relationships, higher degree –Relationship between more entities (rare) Recursive relationships –Relationship of 2 entities belonging to the same entity type e.g. an employee with a relation to another to a boss (another employee)

Data modeling using ER11 Cardinality 1-1very rare –1 entity of type A has a relation to at most 1 entity of type B and vice versa 1 husband ~ 1 wife 1-many, 1-Nvery common –1 entity of type A may have relation to many entities of type B, not vice versa. 1 department ~ many employees

Data modeling using ER12 Cardinality II Many - many, N-Mcommon –1 relation of type A may have relations to many entities of type B and vice versa. 1 employee ~ many projects 1 project ~ many employees

Data modeling using ER13 Cardinality notation Step into the entity type and look at the other entity through the relation. –How many entities of the other type do you see? –Write the number on far end of the relation.

Data modeling using ER14 (min, max) cardinality Often you’re only concerned with max. cardinalities. Sometimes you want both (min, max) cardinality. –Note: Cardinalities placed in the other end of the relation!!!

Data modeling using ER15 History History: More generations of relations –Cardinality goes up 1 man ~ many wives [not simultaneously] –Put a timestamp / period on the relation (attribute on the relation) Relation marriage: start_date, end_date –end_date may be NULL :-)

Data modeling using ER16 Total participation Ordinary relation –An entity may be related to another entity. Total participation –En entity must be related to another entity. –Min. cardinality 1 (not 0) –Notation: Double line on the relation

Data modeling using ER17 Diagramming tools Drawing –Microsoft Visio [now a part of MS Office] Diagramming to generate tables –You draw ER, the tool generates tables Reverse engineering –You have the tables, the tools generates ER. Don’t use tools early in the process - use pen and paper!!!

Data modeling using ER18 Best practice Procedure (best practice) 1.find entities and [easy] attributes 2.relationships 3.cardinalities 4.keys 5.total participation