Translate

Senin, 09 April 2018

PROJECT 4 MODUL 4 PENGAMBILAN DATA DARI BANYAK TABEL


PROJECT 4 MODUL 4 PENGAMBILAN DATA DARI BANYAK TABEL

2.) KESIMPULAN YANG SAYA DAPAT ADALAH Perbedaan dengan INNER JOIN, LEFT JOIN akan menampilkan data-data yang tidak berelasi. Namun pada table propinsi (table kiri), data yg tidak berelasi akan bernilai NULL

Sama dengan LEFT JOIN, RIGHT JOIN akan menampilkan data-data yang tidak berelasi. Namun kebalikan dari LEFT JOIN, pada table kota (table kanan), data yg tidak berelasi akan bernilai NULL.

Jumat, 06 April 2018

PROJECT 3 MODUL 3 Manipulasi Data.

PROJECT 3 MODUL 3 Manipulasi Data.

PROJECT 3 MODUL 3 Manipulasi Data.

4..) Kesimpulan yang saya dapat dari nomer 2 dan 3 adalah diperintah UPDATE digunakan untuk memodifikasi data pada tabel dalam basis data.

Sabtu, 24 Maret 2018

PROJECT 2 TUGAS BASIS DATA LANJUT 1.

PROJECT 2 : PROFILE MAHASISIWA ALDI ASRAWAN 1

PROJECT 2 : BIODATA MAHASISWA ALDI ASRAWAN 1

PROJECT 2 : JURUSAN MAHASISWA ALDI ASRAWAN 1

Jumat, 16 Maret 2018

Query File / SQL File Tugas Basis Data Lanjut 1 dengan menggunakan aplikasi PowerDesigner

/*==============================================================*/
/* DBMS name:      MySQL 5.0                                    */
/* Created on:     3/11/2018 10:15:33 PM                        */
/*==============================================================*/


drop table if exists BAJU;

drop table if exists DIKELOLA;

drop table if exists KASIR;

drop table if exists MEMILIKI;

drop table if exists PEMBELI;

drop table if exists PENJAGA;

/*==============================================================*/
/* Table: BAJU                                                  */
/*==============================================================*/
create table BAJU
(
   KODE_BAJU            varchar(20) not null,
   BRND_BAJU            varchar(50),
   HARGA_BAJU           numeric(8,0),
   JUMLAH_STOCK         numeric(8,0),
   primary key (KODE_BAJU)
);

/*==============================================================*/
/* Table: DIKELOLA                                              */
/*==============================================================*/
create table DIKELOLA
(
   KODE_BAJU            varchar(20) not null,
   ID_PENJAGA           varchar(5) not null,
   primary key (KODE_BAJU, ID_PENJAGA)
);

/*==============================================================*/
/* Table: KASIR                                                 */
/*==============================================================*/
create table KASIR
(
   ID_KASIR             int not null,
   ID_PEMBELI           int not null,
   NAMA_KASIR           varchar(50),
   NO_TLP_KASIR         numeric(8,0),
   primary key (ID_KASIR)
);

/*==============================================================*/
/* Table: MEMILIKI                                              */
/*==============================================================*/
create table MEMILIKI
(
   ID_PEMBELI           int not null,
   KODE_BAJU            varchar(20) not null,
   primary key (ID_PEMBELI, KODE_BAJU)
);

/*==============================================================*/
/* Table: PEMBELI                                               */
/*==============================================================*/
create table PEMBELI
(
   ID_PEMBELI           int not null,
   NAMA_PEMBELI         varchar(50),
   ALAMAT_PEMBELI       varchar(100),
   NO_TLP_PEMBELI       numeric(8,0),
   primary key (ID_PEMBELI)
);

/*==============================================================*/
/* Table: PENJAGA                                               */
/*==============================================================*/
create table PENJAGA
(
   ID_PENJAGA           varchar(5) not null,
   NAMA_PENJAGA         varchar(50),
   ALAMAT_PENJAGA       varchar(100),
   NO_TLP_PENJAGA       numeric(8,0),
   primary key (ID_PENJAGA)
);

alter table DIKELOLA add constraint FK_DIKELOLA foreign key (KODE_BAJU)
      references BAJU (KODE_BAJU) on delete restrict on update restrict;

alter table DIKELOLA add constraint FK_DIKELOLA2 foreign key (ID_PENJAGA)
      references PENJAGA (ID_PENJAGA) on delete restrict on update restrict;

alter table KASIR add constraint FK_BAYAR foreign key (ID_PEMBELI)
      references PEMBELI (ID_PEMBELI) on delete restrict on update restrict;

alter table MEMILIKI add constraint FK_MEMILIKI foreign key (ID_PEMBELI)
      references PEMBELI (ID_PEMBELI) on delete restrict on update restrict;

alter table MEMILIKI add constraint FK_MEMILIKI2 foreign key (KODE_BAJU)
      references BAJU (KODE_BAJU) on delete restrict on update restrict;

Linktree dan Lynk Id

 πŸŽ¨ Yuk eksplor portofolio seni & desain saya! Asrawan Arts Group – Art, Design, Abstract, Illustration & Digital Product πŸ”— Linktre...