0% found this document useful (0 votes)
1K views2 pages

Database Dokter (Copy)

The document creates three databases - tb_spesialis (specialty), tb_dokter (doctor) and tb_jaga (shift schedule). It inserts data into each table, including 11 specialties, 18 doctors with details like name, specialty, phone and gender. The tb_jaga table schedules which doctors are on duty on different days of the week along with their shift timings.

Uploaded by

Maula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views2 pages

Database Dokter (Copy)

The document creates three databases - tb_spesialis (specialty), tb_dokter (doctor) and tb_jaga (shift schedule). It inserts data into each table, including 11 specialties, 18 doctors with details like name, specialty, phone and gender. The tb_jaga table schedules which doctors are on duty on different days of the week along with their shift timings.

Uploaded by

Maula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
  • Database Setup: Initializes the database by creating a new database and setting up preliminary tables and columns.
  • Data Insertion into tb_spesialis: Details SQL commands to insert data into the tb_spesialis table with specific values for test records.
  • Table Creation: Outlines the process of creating tables within the database including tb_spesialis, tb_dokter, and tb_jaga.
  • Data Insertion into tb_dokter: Specifies the SQL commands used to insert predefined entries into the tb_dokter table.
  • Data Insertion into tb_jaga: Describes the insertion of data records into the tb_jaga table, showcasing schedule details.

Create database dokter

use dokter
create table tb_spesialis (kd_spesialis char(3) not null primary key, spesialis
varchar(35) not null);
create table tb_dokter (kd_dokter char(3) not null primary key,nama_dokter
varchar(35) not null,kd_spesialis char(3) not null,telpon varchar (15) not null,sex
char(1) not null);
create table tb_jaga (kd_dokter char(3) not null,hari varchar(15) not
null,jam_mulai time not null,jam_selesai time not null);

TB SPESIALIS

insert into tb_spesialis values ('UMM','dokter umum');


insert into tb_spesialis values ('DLM','Penyakit dalam');
insert into tb_spesialis values ('ANK','anak');
insert into tb_spesialis values ('KDG','kandungan');
insert into tb_spesialis values ('BDH','bedah');
insert into tb_spesialis values ('JTG','jantung');
insert into tb_spesialis values ('THT','telinga hidung dan tenggorokan');
insert into tb_spesialis values ('GIG','gigi');
insert into tb_spesialis values ('SRF','saraf');
insert into tb_spesialis values ('KLT','Kulit');
insert into tb_spesialis values ('MAT','Mata');
select*from tb_spesialis;

TB DOKTER

insert into tb_dokter values ('D01','Dr. Boi','UMM','0811111111111','L');


insert into tb_dokter values ('D02','Dr. irfan','DLM','082222222222','L');
insert into tb_dokter values ('D03','Dr. muswanto','BDH','0833333333333','L');
insert into tb_dokter values ('D04','Dr. umar','JTG','0844444444444','L');
insert into tb_dokter values ('D05','Dr. ibrahim','KDG','0855555555555','L');
insert into tb_dokter values ('D06','Dr. aji','SRF','0855555555556','L');
insert into tb_dokter values ('D07','Dr. Ridwan','MAT','0855555555557','L');
insert into tb_dokter values ('D08','Dr. Fajar','ANK','0855555555558','L');
insert into tb_dokter values ('D09','Dr. Mory','UMM','0855555555559','L');
insert into tb_dokter values ('D10','Dr. Serly','BDH','0855555555560','P');
insert into tb_dokter values ('D11','DR. Chandra','UMM','0855555555561','L');
insert into tb_dokter values ('D12','Dr. bayhaqi','BDH','085555555555562','L');
insert into tb_dokter values ('D13','Dr. rina','ANK','0855512345562','P');
insert into tb_dokter values ('D14','Dr. agus','UMM','082912345562','L');
insert into tb_dokter values ('D15','Dr. andin','KDG','0829124895562','P');
insert into tb_dokter values ('D16','Dr. labala','BDH','0852222895562','L');
insert into tb_dokter values ('D17','Dr. Fauzi','BDH','08522221234556','L');
insert into tb_dokter values ('D18','Dr. Neneng','KDG','08101010101010','P');
select*from tb_dokter;

TB JAGA

insert into tb_jaga values ('D01','senin','08:15:00','12:15:00');


insert into tb_jaga values ('D09','senin','12:15:00','16:30:00');
insert into tb_jaga values ('D11','senin','17::00','16:30:00');
insert into tb_jaga values ('D03','selasa','08:15:00','16:00:00');
insert into tb_jaga values ('D08','selasa','16:00:00','21:00:00');
insert into tb_jaga values ('D04','selasa','08:15:00','20:00:00');
insert into tb_jaga values ('D05','selasa','08:15:00','14:00:00');
insert into tb_jaga values ('D15','selasa','14:00:00','20:00:00');
insert into tb_jaga values ('D13','rabu','08:15:00','12:00:00');
insert into tb_jaga values ('D16','rabu','14:00:00','21:00:00');
insert into tb_jaga values ('D14','rabu','08:15:00','14:00:00');
insert into tb_jaga values ('D06','kamis','08:15:00','14:00:00');
insert into tb_jaga values ('D07','jum'at','08:15:00','11:30:00');
insert into tb_jaga values ('D10','sabtu','08:15:00','14:00:00');
insert into tb_jaga values ('D02','minggu','09:00:00','14:00:00');
select*from tb_jaga;

You might also like