SHARE
TWEET

Untitled

a guest Apr 24th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table Tenant (
  2. id_Tenant char(10) PRIMARY KEY,
  3. nama varchar(50)
  4. );
  5.  
  6. create table Menu (
  7. id_Menu char(10) PRIMARY KEY,
  8. nama_Menu varchar(50),
  9. harga_Menu number,
  10. id_Tenant char(10),
  11. CONSTRAINT fk_idTenant FOREIGN KEY(id_Tenant) references Tenant
  12. );
  13.  
  14. create table detailTransaksi (
  15. id_DetailTrans char(10) PRIMARY KEY,
  16. harga_detail number,
  17. jumlah number,
  18. id_Menu char(10),
  19. CONSTRAINT fk_idMenu FOREIGN KEY(id_Menu) references Menu
  20. );
  21.  
  22. create table Transaksi (
  23. id_Transaksi char(10) PRIMARY KEY,
  24. tanggal date,
  25. tot_harga number,
  26. id_DetailTrans char(10),
  27. CONSTRAINT fk_idDetailTrans FOREIGN KEY(id_Transaksi) references detailTransaksi
  28. );
  29.  
  30. INSERT into Tenant(id_Tenant,nama) values('TNT001','Kantin Sederhana');
  31. INSERT into Tenant(id_Tenant,nama) values('TNT002','Kantin Roasting');
  32. INSERT into Tenant(id_Tenant,nama) values('TNT003','Kantin Bowo');
  33. INSERT into Tenant(id_Tenant,nama) values('TNT004','Kantin Lowo');
  34.  
  35. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU001','Soto Ayam','5000','TNT001');
  36. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU002','Soto Kerbau','6000','TNT001');
  37. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU003','Nasi Rames ','7000','TNT001');
  38. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU004','Nasi Ayam','10000','TNT001');
  39. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU005','Nasi Goreng','12000','TNT001');
  40.  
  41. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU006','Pecel Lele','13000','TNT002');
  42. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU007','Ayam Goreng','6000','TNT002');
  43. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU008','Ayam Bakar','6000','TNT002');
  44. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU009','Ikan Nila','15000','TNT002');
  45. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU010','Ikan Gurame','13000','TNT002');
  46.  
  47. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU011','Susu Kedelai Coklat','3000','TNT003');
  48. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU012','Susu Soda','3000','TNT003');
  49. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU013','Susu Sapi Murni','4000','TNT003');
  50. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU014','Susu Murni Nasional','5000','TNT003');
  51. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU015','Susu Kambing','4000','TNT003');
  52.  
  53. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU016','Swike Kodok','15000','TNT004');
  54. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU017','Sate Kambing','13000','TNT004');
  55. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU018','Klepon','5000','TNT004');
  56. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU019','Lupis','5000','TNT004');
  57. INSERT into Menu(id_Menu,nama_Menu,harga_Menu,id_Tenant) values ('MENU020','Tahu dan Tempe Bacem','4000','TNT004');
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