entity relationship (er) modeling the er model developing and er diagram extended er model entity...
TRANSCRIPT
![Page 1: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/1.jpg)
Entity Relationship (ER) Modeling
The ER Model
Developing and ER Diagram
Extended ER Model
Entity Integrity : Selecting Primary Key
Chapter 4
![Page 2: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/2.jpg)
In this chapter, you will learn:
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
2
The main characteristics of entity relationship components
How relationships between entities are defined and refined
and how those relationships are incorporated into the
database design process
How ERD components affect database design and
implementation
That real-world database design often requires the
reconciliation of conflicting goals
![Page 3: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/3.jpg)
The Entity Relationship (ER) Model
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah
3
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
![Page 4: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/4.jpg)
Entities
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah
4
Refers to entity set and not to single entity occurrence
Corresponds to table and not to row in relational
environment
In both Chen and Crow’s Foot models, entity is
represented by rectangle containing entity’s name
Entity name, a noun, is usually written in capital letters
![Page 5: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/5.jpg)
Attributes
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
5
Characteristics of entities
In Chen model, attributes are represented by ovals and
are connected to entity rectangle with a line
Each oval contains the name of attribute it represents
In Crow’s Foot model, attributes are written in attribute
box below entity rectangle
![Page 6: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/6.jpg)
Attributes (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
6
![Page 7: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/7.jpg)
DomainsChapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
7
Attributes have domain
Domain is attribute’s set of possible values
Attributes may share a domaina set of permitted values
- ex) domain of customer--name : set of all text stringsof a certain length
Domains are the set of allowable data values for a Column.For example, the FiveDigitZipCode Column on the customer
entity can be in the integer domain. As such, the database would not allow you to place values like 123.45 (floating point) or ABC (character) into that Column.
![Page 8: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/8.jpg)
Identifiers (Primary Keys)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
8
Underlined in the ERD
Key attributes are also underlined in frequently
used table structure shorthand
![Page 9: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/9.jpg)
Primary Key Guidelines
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah9
Attribute or combination of attributes that
uniquely identifies entity instances in an entity
set
Main function is to uniquely identify an entity
instance or row within a table
Guarantee entity integrity, not to “describe” the
entity
![Page 10: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/10.jpg)
Primary Key Guidelines (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah10
![Page 11: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/11.jpg)
Composite Primary Keys
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
11
Primary keys ideally composed of only single
attribute
Possible to use a composite key
Primary key composed of more than one attribute
![Page 12: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/12.jpg)
Composite Primary Keys (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
12
![Page 13: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/13.jpg)
When to Use Composite Primary Keys
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah13
Useful as identifiers of composite entities, where
each primary key combination is allowed only
once in M:N relationship
◦Automatically provides benefit of ensuring that there
cannot be duplicate values
![Page 14: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/14.jpg)
When to Use Composite Primary Keys(continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah14
![Page 15: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/15.jpg)
When to Use Composite Primary Keys(continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah15
Useful as identifiers of weak entities, where
weak entity has strong identifying relationship
with parent entity
◦Normally used to represent:
A real-world object that is existent dependent on another
real-world object
A real-world object that is represented in data model as
two separate entities in strong identifying relationship
![Page 16: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/16.jpg)
Composite and Simple Attributes
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
16
Composite attribute can be subdivided
Simple attribute cannot be subdivided
![Page 17: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/17.jpg)
Single-Valued AttributesChapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
17
Single-value attribute can have only a single value
![Page 18: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/18.jpg)
Multivalued AttributesChapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
18
Multivalued attributes can have many values
![Page 19: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/19.jpg)
Multivalued Attributes (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
19
![Page 20: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/20.jpg)
Resolving Multivalued Attribute Problems
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
20
Although conceptual model can handle M:N
relationships and multivalued attributes, you should
not implement them in relational DBMS
◦ Within original entity, create several new attributes, one
for each of the original multivalued attribute’s
components
Can lead to major structural problems in table
◦ Create new entity composed of original multivalued
attribute’s components
![Page 21: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/21.jpg)
Resolving Multivalued Attribute Problems (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
21
![Page 22: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/22.jpg)
Resolving Multivalued Attribute Problems (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
22
![Page 23: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/23.jpg)
Resolving Multivalued Attribute Problems (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
23
![Page 24: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/24.jpg)
Derived Attributes
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
24
Attribute whose value may be calculated
(derived) from other attributes
Need not be physically stored within database
Can be derived by using an algorithm
![Page 25: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/25.jpg)
Derived Attributes (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
25
![Page 26: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/26.jpg)
Derived Attributes (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
26
![Page 27: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/27.jpg)
Relationships
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
27
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
know only one side of the relationship
![Page 28: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/28.jpg)
Connectivity and Cardinality
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
28
Connectivity
◦ Used to describe 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
![Page 29: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/29.jpg)
Connectivity and Cardinality (continued)
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
29
![Page 30: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/30.jpg)
Existence Dependence
Chapter 3 | Entity Relationship (ER) Modeling Prepared by : Maizatul Akma bt Napiah
30
Existence dependence
◦ Exist in database only when it is associated with
another related entity occurrence
Existence independence
◦ Entity can exist apart from one or more related
entities
◦ Sometimes refers to such an entity as strong or
regular entity
![Page 31: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/31.jpg)
Relationship Strength
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah31
Weak (non-identifying) relationships
Exists if PK of related entity does not contain PK
component of parent entity
Strong (Identifying) Relationships
Exists when PK of related entity contains PK
component of parent entity
![Page 32: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/32.jpg)
Weak (Non-Identifying) Relationships
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah32
![Page 33: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/33.jpg)
Weak (Non-Identifying) Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah33
![Page 34: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/34.jpg)
Strong (Identifying) Relationships
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah34
![Page 35: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/35.jpg)
Weak Entities
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah35
Weak entity meets two conditions
◦ Existence-dependent
Cannot exist without entity with which it has a relationship
◦ Has primary key that is partially or totally derived
from parent entity in relationship
Database designer usually determines whether
an entity can be described as weak based on
business rules
![Page 36: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/36.jpg)
Weak Entities (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah36
![Page 37: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/37.jpg)
Weak Entities (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah37
![Page 38: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/38.jpg)
Relationship Participation
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah38
Optional participation
◦ One entity occurrence does not require
corresponding entity occurrence in particular
relationship
Mandatory participation
◦ One entity occurrence requires corresponding entity
occurrence in particular relationship
![Page 39: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/39.jpg)
Relationship Participation (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah39
![Page 40: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/40.jpg)
Relationship Participation (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah40
![Page 41: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/41.jpg)
Relationship Participation (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah41
![Page 42: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/42.jpg)
Relationship Participation (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah42
![Page 43: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/43.jpg)
Relationship Degree
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah43
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
![Page 44: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/44.jpg)
Relationship Degree (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah44
![Page 45: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/45.jpg)
Relationship Degree (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah45
![Page 46: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/46.jpg)
Recursive Relationships
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah46
Relationship can exist between occurrences of
the same entity set
Naturally found within unary relationship
![Page 47: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/47.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah47
![Page 48: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/48.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah48
![Page 49: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/49.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah49
![Page 50: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/50.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah50
![Page 51: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/51.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah51
![Page 52: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/52.jpg)
Recursive Relationships (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah52
![Page 53: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/53.jpg)
Composite Entities
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah53
Also known as bridge entities
Composed of primary keys of each of the entities
to be connected
May also contain additional attributes that play no
role in connective process
![Page 54: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/54.jpg)
Composite Entities (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah54
![Page 55: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/55.jpg)
Composite Entities (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah55
![Page 56: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/56.jpg)
Composite Entities (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah56
![Page 57: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/57.jpg)
Developing an ER Diagram
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah57
Database design is iterative rather than linear or
sequential process
Iterative process
Based on repetition of processes and procedures
![Page 58: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/58.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah58
Building an ERD usually involves the following activities:◦ 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
![Page 59: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/59.jpg)
Developinag an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah59
Tiny College◦Tiny College is divided into several schools
Each school is composed of several departments◦Each department may offer courses◦Each department may have many professors assigned to
it◦Each professor may teach up to four classes; each class
is section of course◦Student may enroll in several classes, but (s)he takes
each class only once during any given enrollment period
![Page 60: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/60.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah60
Tiny College (continued)◦Each department has several students
Each student has only a single major and is associated with a single department
◦Each student has an advisor in his or her department Each advisor counsels several students
◦The relationship between class is taught in a room and the room in the building
![Page 61: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/61.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah61
![Page 62: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/62.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah62
![Page 63: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/63.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah63
![Page 64: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/64.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah64
![Page 65: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/65.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER)
Modeling
Prepared by : Maizatul Akma bt Napiah
65
![Page 66: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/66.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah66
![Page 67: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/67.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah67
![Page 68: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/68.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah68
![Page 69: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/69.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah69
![Page 70: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/70.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah70
![Page 71: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/71.jpg)
Developing an ER Diagram (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah71
![Page 72: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/72.jpg)
Data Modeling Checklist
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah72
![Page 73: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/73.jpg)
Summary
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah73
Entity relationship (ER) model
◦ Uses ERD to represent conceptual database as
viewed by end user
◦ ERM’s main components:
Entities
Relationships
Attributes
◦ Includes connectivity and cardinality notations
![Page 74: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/74.jpg)
Summary (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah74
Connectivities and cardinalities are based on
business rules
In ERM, M:N relationship is valid at conceptual
level
ERDs may be based on many different ERMs
Database designers are often forced to make
design compromises
![Page 75: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/75.jpg)
Summary
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah75
Extended entity relationship (EER) model adds
semantics to ER model via entity supertypes, subtypes,
and clusters
Specialization hierarchy depicts arrangement and
relationships between entity supertypes and entity
subtypes
Inheritance allows an entity subtype to inherit attributes
and relationships of supertype
![Page 76: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/76.jpg)
Summary (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah76
Composite keys are useful to represent M:N
relationships and weak (strong-identifying) entities
![Page 77: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/77.jpg)
Summary (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah77
Surrogate primary keys are useful when there is no
natural key that makes a suitable primary key
In a 1:1 relationship, place the PK of mandatory
entity as foreign key in optional entity
Time-variant data refers to data whose values
change over time and whose requirements mandate
that you keep a history of data changes
![Page 78: Entity Relationship (ER) Modeling The ER Model Developing and ER Diagram Extended ER Model Entity Integrity : Selecting Primary Key Chapter 4](https://reader031.vdocument.in/reader031/viewer/2022012913/5513e24755034679748b54c4/html5/thumbnails/78.jpg)
Summary (continued)
Chapter 3 | Entity Relationship (ER) Modeling
Prepared by : Maizatul Akma bt Napiah78
Data modeling checklist provides way for
designer to check that the ERD meets set of
minimum requirements