-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.sql
More file actions
55 lines (45 loc) · 981 Bytes
/
schema.sql
File metadata and controls
55 lines (45 loc) · 981 Bytes
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
DROP DATABASE IF EXISTS adidas;
CREATE DATABASE adidas;
USE adidas;
CREATE TABLE products(
id varchar(20) NOT NULL,
name varchar(50) NOT NULL,
price varchar(50),
picture varchar(200),
highlights varchar(3000),
description varchar(3000),
spec varchar(3000),
story varchar(3000)
);
CREATE TABLE relatedProducts(
fromProductId varchar(20) NOT NULL,
toProductId varchar(20) NOT NULL,
relationType varchar(20)
);
CREATE TABLE likes(
sessionId varchar(50),
productId varchar(20),
disabled boolean
);
CREATE TABLE completeTheLook(
fromProductId varchar(20) NOT NULL,
toProductId varchar(20) NOT NULL
);
CREATE TABLE inventories(
productId varchar(20),
size varchar(5),
inventory int
);
CREATE TABLE feedbacks(
id int NOT NULL AUTO_INCREMENT,
sessionId varchar(50),
score int,
comment varchar(200),
age int,
gender varchar(10),
name varchar(20),
availibility int,
timezone int,
phoneno varchar(20),
PRIMARY KEY (ID)
);