T
chinsuvent@yahoo.com
MODEL RELASIONAL
Model Relasional
Relasi
Contoh Relasi
Mahasiswa
nim
nama_mh
s
jurusan
0100 Andy
1
Teknik
Informatika
0100 Budi
2
Teknik
Informatika
0100 Rahmat
3
Teknik Industri
0100 Budi
4
Teknik Mesin
0100 Sartika
5
Teknik Mesin
0100 Iwan
6
Teknik Elektro
Tabel
Perbedaan Istilah
ER Model
Relational
Model
Databas
e
Traditional
Programmer
Entity
Relation
Table
File
Entity
Instance
Tuple
Row
Record
Attribute
Attribute
Column
Field
Identifier
Key
Key
Key (link)
Mendefinisikan
Domain
Batasan-Batasan
Integritas (Integrity
Constraints)
Primary Key
Constraints
Referential Integrity
name
id
zip_code
address
customer
Tabel Customer
i
d
nam stree
e
t
cit
y
stat
e
zip_cod
e
nama_proyek
no_proyek
lokasi
i
no_proye
k
nama_proy
ek
Tabel Lokasi_Proyek
proyek
no_proye
k
loka
si
employee_
id
employee_na
me
Tabel Supervision
employee
supervision
supervisor_
id
employee_
id
nama_dos
Tabel Dosen
nip
Nama_d
os
Dosen
1
periode
Tabel kaprodi
mengepalai
1
Jurusan
kode_jur
nama_jur
period kode_ju
e
r
Tabel Jurusan
kode_ju
r
nama_j
ur
ni
p
nama_dos
Tabel Dosen
nip
Dosen
nama_d
os
1
perwalian
Tabel Mahasiswa
N
mahasiswa
nim
nama_mhs
nim
nama_m
hs
nip
ni
m
nama_m
hs
semester
Tabel KRS
semester
mengambil
ni
m
kode_m
k
M
matakuliah
kode_mk
nama_mk
Tabel Matakuliah
kode_m nama_m
k
k
Studi Kasus
Entity Relationship
Diagram Rental VCD FILM
judul
jenis
harga_sewa
kode_film
jml_keping
dikelompokkan
Kelompokfilm 1
Film
jml_film
N
jenis_identitas
no_identitas
total_film
kode_sewa
Customer
nama
tgl_sewa
alamat
total_harga
menyewa
tgl_kembali
denda
Transformasi ER Model ke
Basis Data Relasional
judul
jenis
harga_sewa
kode_film
jml_keping
dikelompokkan
KelompokFilm1
Film
Tabel KelompokFilm
jeni harga_sew
s
a
Tabel film
kode_fil
m
jml_fil
m
jml_film
Transformasi ERD ke
Basis Data Relasional (lanj)
total_film
no_identitas
total_harga
alamat
Customer
nama
judul
tgl_sewa
jml_keping
Film
jml_film
denda
tgl_kembali
kode_sewa
Tabel customer
no_identita jenis_identit
s
as
menyewa
jenis_identitas
kode_film
nam alama
a
t
Transformasi ERD ke
Basis Data Relasional
(lanj)
Tabel menyewa, penambahan atribut kode_sewa
no_identita
s
tgl_sew
a
Tabel detailmenyewa
kode_sewa
kode_film
tot_fil
m
tgl_kemba
li
tot_hr
g
dend
a
harga_sew
a
film
kode_fil
m
jenis
judul
jml_kepin
g
jml_fil
m
actio
n
3000
A01
actio
n
Spiderman
dram
a
3500
A02
actio
n
Spiderman
2
horor
3000
D01
dram
a
Love Story
2 tot_fil
m
tgl_kemba
2
li
tot_hr
g
dend
a
detailmenyewa
kode_sew
a
kode_fil
m
kode_sew
H01
a
no_identit
tgl_sewa
horor Evil Death
as
menyewa
S0001
A01
S0001
001
01/01/2007
02/01/2007
6000
S0001
A02
S0002
002
03/01/2007
03/01/2007
3500
S0002
D01
S0003
001
06/01/2007
08/01/2007
9500
S0003
A02
S0003
D01
S0003
H01
customer
no_identit
as
001
jenis_identit
as
nam
a
alamat
SIM
Andi
pontian
ak
Bahasa Query