0% found this document useful (0 votes)
55 views3 pages

Database Warteg

The document contains SQL statements to create several database tables for a restaurant management system. The tables created include laporan for transactions, q_user for users, tb_kategori for categories, tb_menu for menu items, tb_transaksi for transaction details, and tb_user for users. Some of the tables also include SQL statements to insert sample data into the tables.

Uploaded by

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

Database Warteg

The document contains SQL statements to create several database tables for a restaurant management system. The tables created include laporan for transactions, q_user for users, tb_kategori for categories, tb_menu for menu items, tb_transaksi for transaction details, and tb_user for users. Some of the tables also include SQL statements to insert sample data into the tables.

Uploaded by

Alan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CREATE TABLE `laporan` (

`kd_transaksi` int(11)

,`menu` varchar(100)

,`harga` int(11)

,`subtotal` int(11)

,`tgl_transaksi` datetime

,`no_meja` int(11)

);

CREATE TABLE `q_user` (

`kd_user` int(11)

,`nama` varchar(50)

,`no_hp` varchar(15)

,`username` varchar(50)

,`password` varchar(50)

,`level` varchar(10)

);

CREATE TABLE `tb_kategori` (

`kd_kategori` int(11) NOT NULL,

`kategori` varchar(15) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `tb_kategori` (`kd_kategori`, `kategori`) VALUES

(1, 'Makanan Ringan'),

(2, 'Makanan Berat');


CREATE TABLE `tb_menu` (

`kd_menu` int(11) NOT NULL,

`menu` varchar(100) NOT NULL,

`jenis` varchar(20) NOT NULL,

`harga` int(11) NOT NULL,

`status` varchar(15) NOT NULL,

`foto` varchar(100) NOT NULL,

`kd_kategori` int(11) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `tb_menu` (`kd_menu`, `menu`, `jenis`, `harga`, `status`, `foto`, `kd_kategori`) VALUES

(32, 'Ayam Goreng', 'Makanan', 15000, 'Tersedia', 'a.jpeg', 2),

(44, 'Nasi Goreng', 'Makanan', 10000, 'Tersedia', 'd.jpeg', 2);

CREATE TABLE `tb_transaksi` (

`kd_transaksi` int(11) NOT NULL,

`kd_menu` int(11) NOT NULL,

`jumlah` int(11) NOT NULL,

`subtotal` int(11) NOT NULL,

`tgl_transaksi` datetime NOT NULL,

`kd_user` int(11) NOT NULL,

`no_meja` int(11) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `tb_transaksi` (`kd_transaksi`, `kd_menu`, `jumlah`, `subtotal`, `tgl_transaksi`,


`kd_user`, `no_meja`) VALUES

(1, 13, 2, 20000, '2019-01-08 14:20:11', 18, 1),


(2, 7000, 10, 70000, '2019-01-09 09:17:28', 0, 17),

(2, 13, 10, 70000, '2019-01-09 09:19:19', 0, 18);

CREATE TABLE `tb_user` (

`kd_user` int(11) NOT NULL,

`nama` varchar(50) NOT NULL,

`no_hp` varchar(15) NOT NULL,

`username` varchar(50) NOT NULL,

`password` varchar(50) NOT NULL,

`level` varchar(10) NOT NULL

) ENGINE=InnoDB DEFAULT CHARSET=latin1;

INSERT INTO `tb_user` (`kd_user`, `nama`, `no_hp`, `username`, `password`, `level`) VALUES

(17, 'Dafa Rizki Fadillah', '0000', 'admin', 'admin', 'admin'),

(18, 'casie', '2', 'dafa', 'sdcs', 'admin'),

(22, 'casie', '2', 'dafa', 'cash', 'kasir');

You might also like