You are on page 1of 3

UJIAN AKHIR SEMESTER FAK.

TEKNIK UNIVERSITAS WIDYATAMA


Mata Kuliah : Perancangan Basis Data
Hari / Tgl : Kamis / 20 -01 - 2005
Jurusan : Sistem Informasi
Waktu : 120 menit
Sifat : Buka buku
====================================================================

Tabel Projek
Tabel Supplier
JK JNAME CITY SK SNAME STATUS CITY
J1 Sorter Paris S1 Smith 20 London
J2 Display Rome S2 Jones 10 paris
J3 OCR Athens S3 Blake 30 Paris
J4 Console Athens S4 Clark 20 london
J5 RAID London S5 Adams 30 Athens
J6 EDS Oslo
J7 Tape London

Tabel Part
PK PNAME COLOR WEIGHT CITY
P1 Nut Red 12 London
P2 Bolt Green 17 Paris
P3 Screw Blue 17 Rome
P4 Screw Red 14 London
P5 Cam Blue 12 Paris
P6 Cog Red 19 London

Tabel SP Tabel SPJ


SK PK QTY SK PK JK QTY
S1 P1 300 S1 P1 J1 200
S1 P2 200 S1 P1 J4 700
S1 P3 400 S2 P3 J1 400
S1 P4 200 S2 P3 J2 200
S1 P5 100 S2 P3 J3 200
S1 P6 100 S2 P3 J4 500
S2 P1 300 S2 P3 J5 600
S2 P2 400 S2 P3 J6 400
S3 P2 200 S2 P3 J7 800
S4 P2 200 S2 P5 J2 100
S4 P4 300 S3 P3 J1 200
S4 P5 400 S3 P4 J2 500
S4 P6 J3 300
S4 P6 J7 300
S5 P2 J2 200
S5 P2 J4 100
S5 P5 J5 500
S5 P5 J7 100
S5 P6 J2 200
S5 P1 J4 100
S5 P3 J4 200
S5 P4 J4 800
S5 P5 J4 400
S5 P6 J4 500

Untuk mengerjakan soal-soal dibawah ini aculah tabel-tabel diatas


1. Bagaimana desain diagram ER untuk tabel-tabel diatas ?
2. Berilah penjelasan singkat mengenai relasi diagram ER diatas!
3. Ujilah ketergantungan fungsional untuk setiap tabel diatas dan beri keterangan ringkas !
4. Bagaimana keluaran dari perintah SQL berikut :
a. select * from s;
b. select distinct sk,s.city,jk,j.city from s,j where s.city =
j.city;
c. select s.sname,p.pname from s,p,sp where (s.sk=sp.sk and p.pk =
sp.pk and sname='Jones');
d. select distinct s.sname,p.pname,j.jname,j.city from s,p,j,spj
where s.sk=spj.sk and j.jk=spj.jk and sname='Smith';
e. select * from spj where QTY between 300 and 500;

5. Coba anda tuliskan perintah SQL, sehingga keluarannya seperti berikut :


a.

PNAME WEIGHT CITY


Nut 12 London
Bolt 17 Paris
Screw 17 Rome
Screw 14 London
Cam 12 Paris
Cog 19 London

b.
JNAME PNAME
OCR Screw
OCR Cog
c.
SK City JK City
S2 Paris J1 Paris
S3 Paris J1 Paris
S5 Athens J3 Athens
S5 Athens J4 Athens
S1 London J5 London
S4 London J5 London
S1 London J7 London
S4 London J7 London

You might also like