SHARE
TWEET

Untitled

a guest Sep 19th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table GURU (
  2. NIG VARCHAR2(32) not null,
  3. NAMA VARCHAR2(64) not null,
  4. JENIS_KELAMIN CHAR not null,
  5. TGL_MASUK DATE,
  6. STATUS_PEG CHAR not null,
  7. constraint PK_GURU primary key (NIG))
  8.  
  9. create table KELAS (
  10. KELAS_ID VARCHAR2(32) not null,
  11. KETERANGAN VARCHAR2(64),
  12. constraint PK_KELAS primary key (KELAS_ID))
  13.  
  14. create table MATA_PELAJARAN (
  15. KODE_MP VARCHAR(32) not null,
  16. NAMA_MP VARCHAR(64) not null,
  17. KREDIT NUMBER not null,
  18. constraint PK_MATA_PELAJARAN primary key (KODE_MP))
  19.  
  20. create table MURID (
  21. NIS VARCHAR2(32) not null,
  22. KELAS_ID VARCHAR2(32) not null,
  23. NAMA VARCHAR2(64) not null,
  24. TGL_LAHIR DATE not null,
  25. JENIS_KELAMIN CHAR not null,
  26. ALAMAT VARCHAR2(128) not null,
  27. NAMA_ORTU VARCHAR2(64),
  28. constraint PK_MURID primary key (NIS),
  29. constraint AK_MURID unique (KELAS_ID, NIS),
  30. constraint MURID#KELAS_FK foreign key (KELAS_ID) references KELAS (KELAS_ID))
  31.  
  32. create table ULANGAN (
  33. NIS VARCHAR2(32) not null,
  34. KODE_MP VARCHAR2(32) not null,
  35. UJIAN_KE NUMBER not null,
  36. TGL_UJIAN DATE not null,
  37. NILAI NUMBER,
  38. constraint PK_ULANGAN primary key (NIS, KODE_MP, UJIAN_KE),
  39. constraint ULANGAN#MURID_FK foreign key (NIS) references MURID (NIS),
  40. constraint ULANGAN#MATA_PELAJARAN_FK foreign key (KODE_MP) references MATA_PELAJARAN (KODE_MP))
  41.  
  42. create table BELAJAR (
  43. NIG VARCHAR2(32) not null,
  44. KODE_MP VARCHAR2(32) not null,
  45. KELAS_ID VARCHAR2(32) not null,
  46. HARI VARCHAR2(32) not null,
  47. constraint PK_BELAJAR primary key (NIG, KODE_MP, KELAS_ID),
  48. constraint BELAJAR#GURU_FK foreign key (NIG) references GURU (NIG),
  49. constraint BELAJAR#MATA_PELAJARAN_FK foreign key (KODE_MP) references MATA_PELAJARAN (KODE_MP),
  50. constraint BELAJAR#KELAS_FK foreign key (KELAS_ID) references KELAS (KELAS_ID))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top