You are on page 1of 4

FAKULTAS : EKONOMI - BISNIS & MANAJEMEN - TEKNIK - BAHASA - DKV

Jl. Cikutra No. 204 A Bandung 40125 Telp. (022) 7275855

UJIAN AKHIR SEMESTER GENAP TAHUN AKADEMIK 2016/2017


KODE / MATA KULIAH / SKS : 11330003 / Sistem Basis Data / 3 SKS
FAKULTAS / PROGRAM STUDI : FT / Sistem Informasi/S1
HARI / TANGGAL : Sabtu/04 Februari 2017
WAKTU : -
DOSEN PEMBINA : Sunjana, S.Si., M.T.
SIFAT UJIAN : TAKE HOME

1. Jelaskan istilah berikut secara singkat: atribut, domain, entitas, relasi,


himpunan entitas, himpunan relasi, relasi satu-ke-banyak, relasi banyak-ke-banyak,
himpunan entitas lemah dan aggregasi!
2. Sebuah basis data universitas yang berisi informasi sebagai berikut:
a) Professors have an SSN, a name, an age, a rank, and a research specialty.
b) Projects have a project number, a sponsor name (e.g., NSF), a starting date, an ending
date, and a budget.
c) Graduate students have an SSN, a name, an age, and a degree program (e.g., M.S. or
Ph.D.).
d) Each project is managed by one professor (known as the project's principal investigator).
e) Each project is worked on by one or more professors (known as the project's co-
investigators).
f) Professors can manage and/or work on multiple projects.
g) Each project is worked on by one or more graduate students (known as the project's
research assistants).
h) When graduate students work on a project, a professor must supervise their work on
the project. Graduate students can work on multiple projects, in which case they will
have a (potentially different) supervisor for each one.
i) Departments have a department number, a department name, and a main office.
j) Departments have a professor (known as the chairman) who runs the department.
k) Professors work in one or more departments, and for each department that they work in,
a time percentage is associated with their job.
l) Graduate students have one major department in which they are working on their degree.

Halaman 1 dari 4
m) Each graduate student has another, more senior graduate student (known as a student
advisor) who advises him or her on what courses to take.

Design and draw an ER diagram that captures the information about the university. Use
only the basic ER model here; that is, entities, relationships, and attributes. Be sure to
indicate any key and participation constraints.

3. Berdasarkan basis data universitas pada soal no.2 dan diagram ER yang anda rancang,
tulislah perintah SQL untuk membuat semua relasi dengan memperhatikan semua
konstrain yang ada.
4. Dalam dekomposisi suatu tabel dikenal adanya “Lossless-Join Decomposition”, yaitu suatu
dekomposisi yang aman. Misal kita mempunyai tabel sebagai berikut,

A B C 5.
A1 100 C1
A2 200 C2
A3 300 C3
A4 200 C4

Dengan KF : A  B dan : B  C , tabel diatas dipecah menjadi 2 tabel berikut :


A B B C
A1 100 100 C1
A2 200 200 C2
A3 300 300 C3
A4 200 200 C4

Jelaskanlah apakah dekomposisi diatas memenuhi dekomposisi yang aman !


5. Diberikan sebuah tabel(relasi) seperti dibawah ini :

Apakah kebergantungan fungsi dibawah ini terpenuhi atau tidak ?

Halaman 2 dari 4
6. Desain ERD yang mengandung entitas Order dan Customer dengan relasi 1 : m dari
Customer ke Order . Beri nama relasinya yang menurut anda paling sesuai. Entitas
Customer memiliki atribut (CustNo (primary key), CustFirstName, CustLastName,
CustStreet, CustCity, CustState, CustZip, CustBal) dan entitas Order memiliki atribut
(OrdNo (primary key), OrdDate, OrdName, OrdStreet, OrdCity, OrdState, OrdZip).
7. Kembangkanlah ERD pada no. 5 diatas dengan menambah 2 entitas lagi yaitu Employee
dan Product, dengan relasi 1 : m dari Employee ke Order dan relasi m : n antara Product
dan Order. Entitas Employee memiliki atribut (EmpNo(primary key), EmpFirstName,
EmpLastName, EmpPhone, EmpCommRate) dan entitas Product memiliki atribut
(ProdNo(primary key), ProdName, ProdQOH, ProdPrice, ProdNextShipDate).

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


8. 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;

Tabel J Tabel S
JJK 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

Halaman 3 dari 4
Tabel P
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

Halaman 4 dari 4

You might also like