S. Ariono. Sigit: TUGAS BASIS DATA

TUGAS BASIS DATA




SOAL :
  1. Carilah KF-2 Tabel Tersebut!
  2. Carilah Superkey, Candidate Key, dan Primary Key!


JAWAB     :

Berdasarkan Ketergantungan Fungsionalnya:

  • Kode_brg --> nama_brg , hrg_brg
  • Nm_kons --> alamt_kons , kota_kons
  • No_fak    --> nm_kons , tgl_faktur
  • No_faktur , kode_brg --> jml , bayar




























R (A,B,C,D,E,F,G,H,I,J)

Tabel 1 faktur (A,B,C) = A --> BC
   A --> BC
   A --> A
   A --> ABC (Union)
   Super key = A
   Candidate key = A
   Primary Key = A
   Foreign Key = C

Tabel 1 Konsumen (C,D,E) = C --> DE
   C --> DE
   C --> C
   C --> CDE (Union)
   Super key = C

   Candidate key = C
   Primary Key = C
   Foreign Key = -

Tabel 1 Detil (A,F,H,J) = AF -->  HJ
   AF --> HJ
   AF --> AF
   AF --> AFHJ (Union)
   Super key = AF

   Candidate key = -
   Primary Key = -
   Foreign Key = A dan F

Tabel 1 Barang (F,G,I) = F --> GI
   F --> GI
   F --> F
   F --> FGI (Union)
   Super key = F

   Candidate key = F
   Primary Key = F
   Foreign Key = -


A --> BC
C --> DE
A --> BCDE

A --> A
A --> ABCDE (Union)

F --> GI
F -->  F 
F --> FGI (Union)

AF --> HJ
Karena A --> ABCDE
AF --> ABCDEFHJ
Karena F --> GI
AF -->  ABCDEGHIJ
AF --> R

Jadi
Super key  = AF
Candidate key = -
Primary key = -






















Tidak ada komentar:

Copyright © S. Ariono. Sigit