Professional Documents
Culture Documents
Year : 2021
ENTITY RELATIONSHIP
MODELING
Session 11
LEARNING OUTCOME
Bina Nusantara
4 Components in ER-Modeling
Customer Order
custID orderID
custName 1 0..* orderDate
address amount
email
Entity is a group of objects with the same
properties, which are identified by the
enterprise as having an independent existence.
Binary Association
(Degree = 2)
Customer Order
Places
• Attribute
– Property of an entity or a relationship type.
• Attribute Domain
– Set of allowable values for one or more
attributes.
Customer
custID {PK}
custName
address Attribute and
street Attribute Domain
city
telNo [1..3]
email
Types of Attributes
• Attribute composed of a single
Simple component with an independent
Attribute existence
• Candidate Key
– Minimal set of attributes that uniquely identifies
each occurrence of an entity type.
– Example: custID, email in Customer table
• Primary Key
– Candidate key selected to uniquely identify each
occurrence of an entity type.
– Example: custID in Customer table
• Composite Key
– A candidate key that consists of two or more
attributes.
Attributes and Key from
Customer, Order, and Product
Primary
Key
Customer
Order Product
custID {PK} Consist of
custName Places
orderID {PK} productID {PK}
address orderDate productName
street custID price
city amount availability
telNo [1..3]
email
Simple
Single and Attribute
Composite
Multi-valued
Attribute
Attribute
Attributes and Key from Dreamhome
Case : Staff and Brach
Strong vs Weak Entity
www.c-jump.com
Multiplicity of Staff Manages
Branch (1:1) relationship
Multiplicity of Staff Oversees
PropertyForRent (1:*) relationship type
Multiplicity of Newspaper Advertises
PropertyForRent (*:*) relationship
Structural Constraints Multiplicity
• Cardinality
– Describes maximum number of possible
relationship occurrences for an entity
participating in a given relationship type.
• Participation
– Determines whether all or only some entity
occurrences participate in a relationship.
– Can be Optional (0) or Mandatory (1).
Structural Constraints Multiplicity
Problems with ER Models
thethoughtgardener.com
Problems with ER Models
• Fan Trap
– Where a model represents a relationship between
entity types, but pathway between certain entity
occurrences is ambiguous.
• Chasm Trap
– Where a model suggests the existence of a
relationship between entity types, but pathway
does not exist between certain entity occurrences.
Fan Trap
www.quadrobay.com
Chasm Trap Solution
Cutiebabyshop
Cutie Baby Shop is an online baby shop that sell baby products
(clothes, shoes, toys, baby feeding set, bag, blanket, baby bath set,
accessories, and so on) online through their website
www.cutiebabyshop.com. Now, Cutie Baby Shop wants to expand their
business and launch mobile application which called Cutiebabyshop
that can be download free in application store. The business process in
Cutiebabyshop is stared when customer wants to buy the products.
User must register as a member in Cutiebabyshop mobile app by fill
identity such as name, address, gender, phone number, and email. After
registration, member can select the items and put in the shopping cart
,then system will automatically update the item stock in the database.
After finish put items in the shopping cart and press finish button, the
application user interface will display the recap of the member’s items
which include the total price, then member can choose delivery type
(JNE JNE Oke = 3-7 days, JNE Regular = 2-4 days, dan JNE Yes = 1-2 days,
and also several payment methods, such as transfer through internet
banking or credit card.
Cutiebabyshop