-
Notifications
You must be signed in to change notification settings - Fork 0
/
db.sql
42 lines (34 loc) · 917 Bytes
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
create database bakman;
use bakman;
--
-- Table structure for table `tbl_product`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`level` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `product` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
`price` Decimal(10,2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
CREATE TABLE `order`(
`id` INT(10) AUTO_INCREMENT,
`customer_name` VARCHAR(10),
`order_date` datetime,
`total` Decimal(8,2),
PRIMARY KEY(id)
);
CREATE TABLE `order_details`(
`orderID` INT(10),
`productID` int(11),
`qty` int(3),
`sub_total` Decimal(8,2)
);