Lecture plan Outline of DB design process Entity-relationship model

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship Diagrams
Chapter 6: Entity-Relationship Model
Entity Relationship (E-R) Modeling
Chapter 7 System Models.
Requirements Engineering Process
Chapter 1 The Study of Body Function Image PowerPoint
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Conceptual / semantic modelling
Database Design: ER Modelling (Continued)
Configuration management
Database Design Process
Chapter Information Systems Database Management.
Database Design The process of finding user requirement
Conceptual Design using the Entity-Relationship Model
Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
the Entity-Relationship (ER) Model
Relational Database Design Via ER Modelling
Chapter 6: ER – Entity Relationship Diagram
Functional Dependencies and Normalization for Relational Databases
25 seconds left…...
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Entity-Relationship Model
Enhanced/Extended Relationship-Diagram
Chapter 31 Chapter 3 Data Modeling Using the Entity-Relationship Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Copyright © 2007 Ramez Elmasr and Shamkant B. Navathei Week 3 Outline Overview of Database Design Process Example Database Application (COMPANY) ER Model.
Chapter 4 Entity Relationship (ER) Modeling
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
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
Data Modeling Using the Entity-Relationship Model
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.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Entities and Attributes
Chapter 5 Entity–Relationship Modeling
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling Using the Entity-Relationship
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
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:
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Data Modeling Using the Entity-Relationship (ER) Data Model (Based on Chapter 3 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 3)
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
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.
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Comp 1100 Entity-Relationship (ER) Model
Logical Database Design and the Rational Model
Chapter 3 Data Modeling Using the Entity-Relationship Model
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
ER model Ashima Wadhwa.
Entity-Relationship Model
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
Database Modeling using Entity Relationship Model (E-R Model)
Review of Week 1 Database DBMS File systems vs. database systems
Conceptual Data Modeling Using Entities & Relationships
Presentation transcript:

Lecture plan Outline of DB design process Entity-relationship model Entities and attributes Relationships Jane Reid, BSc/IT DB, QMUL, 7/1/02

DB design process [1] Requirements collection and analysis Users’ data requirements Users’ functional requirements (using software engineering tools, e.g. data flow diagrams) Jane Reid, BSc/IT DB, QMUL, 7/1/02

DB design process [2] Conceptual design Creation of conceptual schema Concise description of users’ data requirements Uses high-level conceptual data model, e.g. Entity-relationship model Data model operations used to specify user operations from functional analysis Compatibility check and possible modification Jane Reid, BSc/IT DB, QMUL, 7/1/02

DB design process [3] Logical design / data model mapping Uses implementation data model, e.g. relational data model Conceptual schema transformed from high-level data model to implementation data model Jane Reid, BSc/IT DB, QMUL, 7/1/02

DB design process [4] Physical design Internal storage structures, access paths, file organisation specified Application programs designed and implemented Jane Reid, BSc/IT DB, QMUL, 7/1/02

Entity-relationship model High-level conceptual modelling technique for DB applications DB application = DB + associated programs Application programs need to be designed, implemented and tested ER model used for conceptual design of DB applications Jane Reid, BSc/IT DB, QMUL, 7/1/02

Entities and attributes An entity is an object with a physical or conceptual existence Attributes are the particular properties which describe the entity An individual attribute has a value Jane Reid, BSc/IT DB, QMUL, 7/1/02

Simple vs composite attributes Can be divided into smaller subparts which Represent more basic attributes with independent meanings Can form a hierarchy Useful if attribute must be handled sometimes as a unit and sometimes as components Simple (atomic) attributes are not divisible Jane Reid, BSc/IT DB, QMUL, 7/1/02

Single- vs multi-valued attributes Single-valued attributes have a single value for a particular entity Multi-valued attributes Have a set of values for a particular entity May have lower/upper bounds on the number of values allowed Jane Reid, BSc/IT DB, QMUL, 7/1/02

Stored vs derived attributes Are related to another attribute Are derivable from a stored attribute May be derivable from related entities Stored attributes Are not derivable from any other source Jane Reid, BSc/IT DB, QMUL, 7/1/02

Null attribute values Used to denote value of an attribute for a particular entity which is Non-applicable Unknown Exists but is missing Not known if it exists or not Jane Reid, BSc/IT DB, QMUL, 7/1/02

Complex attributes Composite attributes Multi-valued attributes Components grouped between parentheses () Components separated by commas Multi-valued attributes Displayed between braces {} Composite and multi-valued attributes can be nested in an arbitrary way Jane Reid, BSc/IT DB, QMUL, 7/1/02

Entity types and sets [1] An entity type is A collection (set) of entities with the same attributes but different values for the attributes Schema / intension for a set of entities which share the same structure Jane Reid, BSc/IT DB, QMUL, 7/1/02

Entity types and sets [2] An entity set A collection of all entities for a particular entity type Extension of the entity type Entity type and associated entity set have the same name Jane Reid, BSc/IT DB, QMUL, 7/1/02

Entity types and sets [3] EMPLOYEE Name, Age, Salary e1 (John Smith, 55, 80K) e2 (Fred Brown, 40, 30K) e3 (Judy Clark, 25, 20K) Jane Reid, BSc/IT DB, QMUL, 7/1/02

Key attributes [1] Also called uniqueness constraint Value of key attribute Identifies each entity uniquely Must be distinct for each entity in the collection Unique for every extension of the entity type Jane Reid, BSc/IT DB, QMUL, 7/1/02

Key attributes [2] Composite key Entity type may have Combination of attribute values form the key Must be minimal (no superfluous attributes) Entity type may have More than one key attribute No key attribute - a weak entity type Jane Reid, BSc/IT DB, QMUL, 7/1/02

Value sets of attributes Also called “domain” of attributes The set of values which may be assigned to that attribute for each individual entity Not displayed in ER diagrams Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationships Implicit relationships between attributes can be converted to explicit relationships An attribute of one entity type refers to another entity type Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationship types and sets Relationship type defines set of associations (relationship set) among entities Relationship type and set have same name Relationship instance associates exactly one entity from each participating entity type Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationship degree Number of participating entity types: Relationship type of degree two is binary Relationship type of degree three is ternary Higher degree relationships are more complex Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationships as attributes Two entity types A and B, where Attribute a2 of entity type A indicates a link to a particular entity of entity type B Binary relationship may be considered as: Value set of attribute a2 is set of all B entities Additional multi-valued attribute b3 for entity type B, whose value for each entity is the set of all A entities matching on attribute a2 Jane Reid, BSc/IT DB, QMUL, 7/1/02

Role names Explains what the relationship means Indicates the role that a particular entity plays in a relationship instance Necessary for recursive relationships same entity type participates more than once in a relationship type in different roles Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationship type constraints [1] Structural constraints which limit combination of entities in relationship set Cardinality ratio Number of relationship instances an entity can participate in Possible ratios - 1:1, 1:N, N:1, M:N Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationship type constraints [2] Participation constraints Indicates if existence of an entity depends on its being related to another entity by relationship type Total (existence dependency) - every entity in the total set must be related Partial - some entities in the total set must be related Jane Reid, BSc/IT DB, QMUL, 7/1/02

Relationship type attributes Similar idea to entity type attributes Attributes of 1:1 relationship types can be migrated to one of participating entities Attributes of 1:N (or N:1) relationship types can be migrated to entity type at N side Attributes of M:N relationship types cannot be migrated Jane Reid, BSc/IT DB, QMUL, 7/1/02

Weak entity types [1] Does not have a key attribute Identified by a combination of Relationship to specific entities from another entity type (identifying/owner entity type) Identifying relationship of weak entity type Weak entity has total participation constraint Some (or all) of its attribute values Jane Reid, BSc/IT DB, QMUL, 7/1/02

Weak entity types [2] Normally has partial key (discriminator) Can sometimes be represented as complex (composite, multi-valued) attribute Not if it participates independently in other relationship types Jane Reid, BSc/IT DB, QMUL, 7/1/02

ER conceptual design Schema design is iterative and may involve refinement: Attribute may be refined into relationship if attribute is a reference to another entity type Attribute that exists in several entity types may be refined into an independent entity type Inverse refinement to above Specialisation/generalisation Jane Reid, BSc/IT DB, QMUL, 7/1/02