Ch.4
Information System Project
- System Design
1️⃣ Definition of Database ( DB )
2️⃣ Characteristics of DB
3️⃣ Sources of DB
1️⃣ Definition of Data Modeling
2️⃣ E-R ( Entity-Relationship ) Modeling
Notation of E-R Modeling
▪️ Data entities
▪️ Relationships
▪️ Attributes
E-R Diagram
: A logical, graphical representation of the entities, associations, data elements for an organization or business.
3️⃣ Sources of E-R Diagram
Entity
: A person, place, object, event or concept in the user environment about which the organization wishes to maintain data.
Entity Type
: A collection of entities that share common properties or characteristics.
Attribute
: A named property or characteristic of entity.
Candidate keys
: Attribute that uniquely identifies each instance of an entity type.
Identifiers
: A candidate key that has been selected.
Selection Rules for an Identifier
▪️ Choose a candidate key that will not change its value.
▪️ Choose a candidate key that will never be null.
▪️ Avoid using intelligent keys.
▪️ Consider substituting single value surrogate keys for large composite keys.
Relationship
: An association between the instances of one or more entity types.
▪️ Always labeled with verb phrases.
Degree
: The number of entity types that participate in a relationship.
Cardinality
: The number of instances of entity B that can be associated with each instance of entity A.
▪️ Minimum Cardinality
: The minimum number of instances of entity B that may be associated with each instance of entity A.
▪️ Maximum Cardinality
: The maximum number of instances of entity B that may be associated with each instance of entity A.
4️⃣ Transforming E-R Diagrams into Relations
⬇️ E-R Diagram
⬇️ Relation
Represent Relationships
ⓐ Binary 1:N Relationships
✅ The key of parent relation must be placed in the child relation.
⬇️ E-R Diagram - 1:N
⬇️ Relation - 1:N
ⓑ Binary or Unary 1:1 Relationships
✅ Needs Foreign key either way
⬇️ E-R Diagram - 1:1
⬇️ Relation - 1:1
ⓒ Binary and Higher M:N Relationships
✅ Intersection Relation 작성 필요 : Stu-Class ( class-ID, student-ID )
✅ The key for intersection relation is always the combination of parent keys.
⬇️ E-R Diagram - M:N
⬇️ Relation - M:N