• Tidak ada hasil yang ditemukan

Enhanced Entity Relationship Model

N/A
N/A
Protected

Academic year: 2023

Membagikan "Enhanced Entity Relationship Model"

Copied!
16
0
0

Teks penuh

(1)

Enhanced Entity

Relationship Model

Wahyu c. wibowo

(2)

Modell

As close as possible to the modeled world

Hard to understand if there are too many constructs that are rarely used

Some important concepts are not captured by ER

(3)

Class

Student Student#

Each student entity is an object with the same properties/attributes

The box can be extended to represent object of the same class, that is a collection of thing of the same type

An object belongs to a class or a member of a class

Name

(4)

Class

Person DOB Nama

Klinik KID Nama Perawat di Dokter di

Nopeg

KdDokter Spesialisasi

(5)

Class

It is not elegant

Perawat and Dokter are not directly represented as an entity

NoPEG and KdDokter are not keys

The relationship represents classes

It should be better to have perawat and dokter as classes (entities) rather than relationship

(6)

Class…

Person DOB Nama

Klinik KID Nama Bekerja di

?

KdDokter Spesialisasi dokter

(7)

Class…

But,

What is the meaning of relationship between person and dokter?

Is dokter is also person?

Dokter has name and DOB through relationship

(8)

Spesialisation

Relationship such as person-dokter, person- perawat are examples of classes with

subclasses

A subclass is a spesialisation of a class

Therefore

Some persons are dokter

Dokter is a subclass of person

Each dokter has all the attributes of person (DOB,nama)

Not all person has the attributes of dokter

Dokter inherits the properties of person (subclass inherits the attributes from its superclass)

(9)

Spesialisation in EER

Person DOB Nama

Klinik KID Nama Bekerja di

KdDokter Spesialisasi dokter

(10)

Spesialisation in EER…

A dokter is also a person

A dokter has attributes: DOB, nama, kdDokter, spesialisasi

A person which is not a dokter has only DOB and nama attributes

Generalisation

A person is a generalisation of a dokter

(11)

Overlapping subclasses

Person DOB Nama

KdDokter Spesialisasi dokter

 Nopeg perawat

(12)

Overlapping subclasses…

Person DOB Nama

KdDokter Spesialisasi dokter

 Nopeg perawat

o

(13)

Participation

Person DOB Nama

KdDokter Spesialisasi dokter

 Nopeg perawat

•A superclass can totally participate in a spesialisation Relationship (mandatory)

•A person must be a perawat or a dokter or both

(14)

Disjoint subclasses

Person DOB Nama

KdDokter Spesialisasi dokter

 Nopeg perawat

d

•In some cases, member of a class can be just one subclass or another, but not both

•A person is either a perawat or a dokter

(15)

Union inheritence

Person DOB Nama

KdDokter Spesialisasi dokter

 IDI

u

•A subclass can inherit the properties of more than one superclasses

MemberID Area

(16)

EER to relations

For a class C and subclasses S and T

Create a relation for C and for each of S and T; the relation for S and T includes the key of C

Create a relation for each of S and T; both relations contain the attributes of C

(desirable when C totally participates in S and T)

Create a single relation with the attributes of C, S, and T with null values

Referensi

Dokumen terkait

Castroand Eugénio Oliveira Chapter 3 Outsourcing Strategies of Full-Service Airlines: An Application of Two Theoretical Perspectives 99 Alison Rieple Chapter 4 The Pricing