-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.sql
36 lines (32 loc) · 939 Bytes
/
schema.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
CREATE DATABASE IF NOT EXISTS main_detail;
USE main_detail;
-- drop existing data if it is there.
DROP TABLE IF EXISTS itemData;
Drop TABLE IF EXISTS userData;
CREATE TABLE itemData (
itemNum int NOT NULL AUTO_INCREMENT,
itemName varChar(50) NOT NULL,
itemPrice decimal (6, 2) NOT NULL,
itemRating decimal (2, 1) NOT NULL,
itemReviewCount int NOT NULL,
itemInStock tinyint NOT NULL,
itemBackOrder tinyint NOT NULL,
itemStockLimitations int,
itemExclusiveTags varchar(150),
itemSeriesTags varchar(150),
seriesImagePath varchar(350),
itemAgeRatingBottom int,
itemAgeRatingTop int,
itemPieceCount int NOT NULL,
itemVipPoints int NOT NULL,
itemWarning varchar(200),
signUpIncentive varchar(400),
PRIMARY KEY (itemNum)
);
CREATE TABLE userData (
userNum int NOT NULL AUTO_INCREMENT,
activeUser tinyint NOT NULL,
wishListItems varchar(150),
watchListItems varchar(150),
PRIMARY KEY (userNum)
);