Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table GURU (
- NIG VARCHAR2(32) not null,
- NAMA VARCHAR2(64) not null,
- JENIS_KELAMIN CHAR not null,
- TGL_MASUK DATE,
- STATUS_PEG CHAR not null,
- constraint PK_GURU primary key (NIG))
- create table KELAS (
- KELAS_ID VARCHAR2(32) not null,
- KETERANGAN VARCHAR2(64),
- constraint PK_KELAS primary key (KELAS_ID))
- create table MATA_PELAJARAN (
- KODE_MP VARCHAR(32) not null,
- NAMA_MP VARCHAR(64) not null,
- KREDIT NUMBER not null,
- constraint PK_MATA_PELAJARAN primary key (KODE_MP))
- create table MURID (
- NIS VARCHAR2(32) not null,
- KELAS_ID VARCHAR2(32) not null,
- NAMA VARCHAR2(64) not null,
- TGL_LAHIR DATE not null,
- JENIS_KELAMIN CHAR not null,
- ALAMAT VARCHAR2(128) not null,
- NAMA_ORTU VARCHAR2(64),
- constraint PK_MURID primary key (NIS),
- constraint AK_MURID unique (KELAS_ID, NIS),
- constraint MURID#KELAS_FK foreign key (KELAS_ID) references KELAS (KELAS_ID))
- create table ULANGAN (
- NIS VARCHAR2(32) not null,
- KODE_MP VARCHAR2(32) not null,
- UJIAN_KE NUMBER not null,
- TGL_UJIAN DATE not null,
- NILAI NUMBER,
- constraint PK_ULANGAN primary key (NIS, KODE_MP, UJIAN_KE),
- constraint ULANGAN#MURID_FK foreign key (NIS) references MURID (NIS),
- constraint ULANGAN#MATA_PELAJARAN_FK foreign key (KODE_MP) references MATA_PELAJARAN (KODE_MP))
- create table BELAJAR (
- NIG VARCHAR2(32) not null,
- KODE_MP VARCHAR2(32) not null,
- KELAS_ID VARCHAR2(32) not null,
- HARI VARCHAR2(32) not null,
- constraint PK_BELAJAR primary key (NIG, KODE_MP, KELAS_ID),
- constraint BELAJAR#GURU_FK foreign key (NIG) references GURU (NIG),
- constraint BELAJAR#MATA_PELAJARAN_FK foreign key (KODE_MP) references MATA_PELAJARAN (KODE_MP),
- constraint BELAJAR#KELAS_FK foreign key (KELAS_ID) references KELAS (KELAS_ID))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement