Module04_ER Modeling_ICS2607_v2.0.pdf
Document Details
Tags
Related
- CPE3 Data Model, Data Schema & Data Independence PDF
- Database Lecture 1 - Entity Relationship Modeling PDF
- TD 2 - Administration Bases de Données - FST Béni-Mellal - 2023/2024 PDF
- Chapter 4 Data Modeling Using the Entity-Relationship (ER) Model PDF
- Basi di Dati – Il modello Entità Relazioni PDF
- Data Models Updated, PDF
Full Transcript
INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES DATABASE SYSTEMS: DESIGN, IMPLEMENTATION, AND MANAGEMENT MODULE 4 ENTITY RELATIONSHIP (ER) MODELING INSTITUTE OF INFORMATION AND COMPUTING SCIENCES The...
INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES DATABASE SYSTEMS: DESIGN, IMPLEMENTATION, AND MANAGEMENT MODULE 4 ENTITY RELATIONSHIP (ER) MODELING INSTITUTE OF INFORMATION AND COMPUTING SCIENCES The Entity Relationship Model (ERM) ER model forms the basis of an ER diagram ERD represents conceptual database as viewed by end-user ERDs depict database’s main components: ✔ Entities ✔ Attributes ✔ Relationships Entities Refers to entity set and not to single entity occurrence Corresponds to table and not to row in relational environment In Chen and Crow’s Foot models, entity is represented by rectangle with entity’s name The entity name, a noun, is written in capital letters INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Attributes Characteristics of entities Chen notation: attributes represented by ovals connected to entity rectangle with a line ✔ Each oval contains the name of attribute it represents Crow’s Foot notation: attributes written in attribute box below entity rectangle INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Attributes Required attribute: must have a value Optional attribute: may be left empty Domain: set of possible values for an attribute ✔ Attributes may share a domain Identifiers: one or more attributes that uniquely identify each entity instance Composite identifier: primary key composed of more than one attribute INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Attributes Composite attribute can be subdivided Simple attribute cannot be subdivided Single-value attribute can have only a single value Multivalued attributes can have many values INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Attributes M:N relationships and multivalued attributes should not be implemented ✔ Create several new Derived attribute: value may be attributes for each of the original multivalued calculated from other attributes attributes’ components ✔ Need not be physically stored within database ✔ Create new entity composed of original multivalued attributes’ components INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Relationships Association between entities Participants are entities that participate in a relationship Relationships between entities always operate in both directions Relationship can be classified as 1:M Relationship classification is difficult to establish if only one side of the relationship is known INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Connectivity and Cardinality Connectivity ✔ Describes the relationship classification Cardinality ✔ Expresses minimum and maximum number of entity occurrences associated with one occurrence of related entity Established by very concise statements known as business rules INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Relationship Participation Optional participation ✔ One entity occurrence does not require corresponding entity occurrence in a particular relationship Mandatory participation ✔ One entity occurrence requires corresponding entity occurrence in particular relationship INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Relationship Degree Indicates number of entities or participants associated with a relationship Unary relationship ✔ Association is maintained within single entity Binary relationship ✔ Two entities are associated Ternary relationship ✔ Three entities are associated INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Associative (Composite) Entities INSTITUTE OF Also known as bridge entities INFORMATION Used to implement M:N relationships AND Composed or primary keys of each of the COMPUTING entities to be connected SCIENCES May also contain additional attributes that play no role in connective process INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES Developing an ER Diagram Database design is an iterative process ✔ Create detailed narrative of organization’s description of operations ✔ Identify business rules based on description of operations ✔ Identify main entities and relationships from business rules ✔ Develop initial ERD ✔ Identify attributes and primary keys that adequately describe entities ✔ Revise and review ERD INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES INSTITUTE OF INFORMATION AND COMPUTING SCIENCES