Tugas Basis Data Bab 8
Fachni Anggriani (1123022)
D3 Teknik Informatika 1A
POLITEKNIK POS INDONESIA
CMD PROSES PUSKESMAS
Script
/* ============================================================ */
/* Database name: MODEL_16 */
/* DBMS name: Microsoft SQL Server 6.x */
/* Created on: 4/17/2013 6:30 AM */
/* ============================================================ */
/* ============================================================ */
/* Table: PASIEN */
/* ============================================================ */
create table PASIEN
(
NAMA int null ,
TGL_LHR char(30) null ,
JE_KLMN datetime null ,
ALAMAT char(1) null ,
NRM int not null,
constraint PK_PASIEN primary key (NRM)
)
go
/* ============================================================ */
/* Index: PASIEN_PK */
/* ============================================================ */
create unique index PASIEN_PK on PASIEN (NAMA, NRM)
go
/* ============================================================ */
/* Table: PEGAWAI */
/* ============================================================ */
create table PEGAWAI
(
NIP int not null,
NAMA char(30) null ,
TGL_LHR datetime null ,
JE_KLMN char(1) null ,
ALAMAT char(30) null ,
BAGIAN char(10) null ,
JABATAN char(10) null ,
constraint PK_PEGAWAI primary key (NIP)
)
go
/* ============================================================ */
/* Table: JENIS_PELAYANAN */
/* ============================================================ */
create table JENIS_PELAYANAN
(
KODE_PLYN int not null,
NRM int null ,
NIP int null ,
NAMA_PLYN char(30) null ,
SINGKATAN char(10) null ,
KETERANGAN char(50) null ,
constraint PK_JENIS_PELAYANAN primary key (KODE_PLYN)
)
go
/* ============================================================ */
/* Index: RELATION_32_FK */
/* ============================================================ */
create index RELATION_32_FK on JENIS_PELAYANAN (NRM)
go
/* ============================================================ */
/* Index: RELATION_33_FK */
/* ============================================================ */
create index RELATION_33_FK on JENIS_PELAYANAN (NIP)
go
alter table JENIS_PELAYANAN
add constraint FK_JENIS_PE_RELATION__PASIEN foreign key (NRM)
references PASIEN (NRM)
go
alter table JENIS_PELAYANAN
add constraint FK_JENIS_PE_RELATION__PEGAWAI foreign key (NIP)
references PEGAWAI (NIP)
go
/* ============================================================ */
/* Database name: MODEL_16 */
/* DBMS name: Microsoft SQL Server 6.x */
/* Created on: 4/17/2013 6:30 AM */
/* ============================================================ */
/* ============================================================ */
/* Table: PASIEN */
/* ============================================================ */
create table PASIEN
(
NAMA int null ,
TGL_LHR char(30) null ,
JE_KLMN datetime null ,
ALAMAT char(1) null ,
NRM int not null,
constraint PK_PASIEN primary key (NRM)
)
go
/* ============================================================ */
/* Index: PASIEN_PK */
/* ============================================================ */
create unique index PASIEN_PK on PASIEN (NAMA, NRM)
go
/* ============================================================ */
/* Table: PEGAWAI */
/* ============================================================ */
create table PEGAWAI
(
NIP int not null,
NAMA char(30) null ,
TGL_LHR datetime null ,
JE_KLMN char(1) null ,
ALAMAT char(30) null ,
BAGIAN char(10) null ,
JABATAN char(10) null ,
constraint PK_PEGAWAI primary key (NIP)
)
go
/* ============================================================ */
/* Table: JENIS_PELAYANAN */
/* ============================================================ */
create table JENIS_PELAYANAN
(
KODE_PLYN int not null,
NRM int null ,
NIP int null ,
NAMA_PLYN char(30) null ,
SINGKATAN char(10) null ,
KETERANGAN char(50) null ,
constraint PK_JENIS_PELAYANAN primary key (KODE_PLYN)
)
go
/* ============================================================ */
/* Index: RELATION_32_FK */
/* ============================================================ */
create index RELATION_32_FK on JENIS_PELAYANAN (NRM)
go
/* ============================================================ */
/* Index: RELATION_33_FK */
/* ============================================================ */
create index RELATION_33_FK on JENIS_PELAYANAN (NIP)
go
alter table JENIS_PELAYANAN
add constraint FK_JENIS_PE_RELATION__PASIEN foreign key (NRM)
references PASIEN (NRM)
go
alter table JENIS_PELAYANAN
add constraint FK_JENIS_PE_RELATION__PEGAWAI foreign key (NIP)
references PEGAWAI (NIP)
go
Hasil Design SQL CMD
Design SQL Pelayanan
Design SQL Pegawai
Design SQL Pasien
Langganan:
Posting Komentar (Atom)
Cek Resi
Pembayaran
Pembayaran melalui Bank berikut :
Norek : 030-3131-724
An. Fachni Anggriani
Norek : 618-0100-551-165
An. Fachni Angrriani
Pengiriman Melalui
0 komentar:
Posting Komentar