-
Notifications
You must be signed in to change notification settings - Fork 1
/
Database.Tables.txt
63 lines (34 loc) · 1.11 KB
/
Database.Tables.txt
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
create table Employee
(
User_ID int UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
Password varchar(255),
Admin_Rights Boolean );
Create Unique Index Employee_Index on Employee (User_ID);
create table Item_Price
(
Item_ID int PRIMARY KEY,
Cost decimal(2),
Markup_Per decimal(2),
Discount_Per decimal(2),
FOREIGN KEY (Item_ID) REFERENCES Item_Name(Item_ID));
Create Unique Index Item_Price_ID_Index on Item_Price (Item_ID);
create table Item_Inventory
(
Item_ID int PRIMARY KEY,
Num_On_Hand int,
Min_On_Hand int,
Ideal_Amount int,
FOREIGN KEY (Item_ID) REFERENCES Item_Name(Item_ID));
Create Unique Index Item_Inventory_ID_Index on Item_Inventory (Item_ID);
create table Item_Category
(
Item_ID int PRIMARY KEY,
Category varchar(50),
Category_Discount decimal(2),
FOREIGN KEY (Item_ID) REFERENCES Item_Name(Item_ID));
Create Unique Index Item_Category_ID_Index on Item_Category (Item_ID);
Create table Item_Name
(
Item_ID int AUTO_INCREMENT PRIMARY KEY,
Item_Name varchar(50));
Create Unique Index Item_Name_ID_Index on Item_Name(Item_ID);