Upload
kazuyano-doni
View
219
Download
0
Embed Size (px)
Citation preview
8/13/2019 Entity Modelingx
1/20
Entity Modeling
Last week has been discussed Context diagram
and functional diagram
amsal djunid - andalas university 1
8/13/2019 Entity Modelingx
2/20
amsal djunid - andalas university 2
Entity Modeling
Using Entity Modeling to create the
Effective and Efficient database
8/13/2019 Entity Modelingx
3/20
amsal djunid - andalas university 3
Outline
Terminology
Type of relationship
Obligatory Relationship
E-R Model
Symbols in E-R Model
Example of E-R Model
8/13/2019 Entity Modelingx
4/20
amsal djunid - andalas university 4
Terminology
Entity
Attribute
Table
Relationship
Occurrence
Determinant
Identifier
Code
Foreign Identifier
Relationship Entity
8/13/2019 Entity Modelingx
5/20
amsal djunid - andalas university 5
Entity
Any objects and concepts
Have mean to the organization
Or relevance to the system being design
Needed to store in the database
Example : student; lectures; subjects;inventory, customer; invoice
8/13/2019 Entity Modelingx
6/20
amsal djunid - andalas university 6
Attribute
Any characteristics, elements to define or to
describe entity
Example : entity = Student
attributes: student number
name
birth date
8/13/2019 Entity Modelingx
7/20
amsal djunid - andalas university 7
Custom
NumberName Address
Customer
InventoryInvento
ry No
Descri
ptionUnits Quantity
On HandUnit
Price
Table
Means to show an entity and its attributes
8/13/2019 Entity Modelingx
8/20
amsal djunid - andalas university 8
Relationship
The association of two or more of entities
Needed to store in the database
Example : invoice FOR customer
8/13/2019 Entity Modelingx
9/20
amsal djunid - andalas university 9
Occurrence
Every rows of table
Customer
Customer
Number
Customer
Name
Customer
Address
C0001 Ali Padang
C0002 Budi Bukittinggi
occurrence
8/13/2019 Entity Modelingx
10/20
amsal djunid - andalas university 10
Determinant and Identifier
Determinant any attribute of the the entity that
determine the value of other attribute; such as
name determine the address of customerIdentifier is one or the combination of the
attribute that identify of the occurrence of the
entity; so it should be unique; such as customernumber
8/13/2019 Entity Modelingx
11/20
amsal djunid - andalas university 11
Foreign Key and Relationship Entity
Foreign Key is any attributes of the entity come
from other entity, means to represent the
relationship of those entitiesRelationship Entity is the new entity used to
represent the relationship two or more entities
8/13/2019 Entity Modelingx
12/20
amsal djunid - andalas university 12
Invoice
No.Date Custom Number Custom
NumberName Address
Invoice
No.Inventory
No
Quantity
Invoice Customer
Invoice details Inventory
Inventory No
Description
Units QuantityOn Hand Unit
Price
Foreign Key
Relationship
entity
8/13/2019 Entity Modelingx
13/20
amsal djunid - andalas university 13
Types of Relationships
The three most important relationship type
One to One Relationship
One to Many Relationship
Many to Many Relationship
8/13/2019 Entity Modelingx
14/20
amsal djunid - andalas university 14
One to One Relationship
If one occurrence has relationship with nor more
than one occurrence in other entity
Lecturers Subjects
Ali English
Susi Math
Dewi Accounting
Lecture Teaches Subject1 1
8/13/2019 Entity Modelingx
15/20
amsal djunid - andalas university 15
One to Many Relationship
Ali English
Math
Dewi Accounting
Lecture Teaches Subject1 M
Ahmad Management
Lecturers Subjects
StatisticsAkmal
8/13/2019 Entity Modelingx
16/20
amsal djunid - andalas university 16
Many to Many Relationship
Ali English
Susi Math
Dewi Accounting
Lecture Teaches SubjectM N
Ahmad Management
Lecturers Subjects
StatisticsAkmal
8/13/2019 Entity Modelingx
17/20
8/13/2019 Entity Modelingx
18/20
amsal djunid - andalas university 18
Entity Relationship Model
Shows or represents all entities and
relationships relevance to the
database being designed
Documenting all data to store in
database
As the basis to design phyisics
database
8/13/2019 Entity Modelingx
19/20
amsal djunid - andalas university 19
Symbols for E-R Model
= entity
= relationship
= connective line
1 , M , N = relationship type
= Obligatory relationshipO
8/13/2019 Entity Modelingx
20/20