-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamazon.sql
More file actions
67 lines (58 loc) · 1.18 KB
/
amazon.sql
File metadata and controls
67 lines (58 loc) · 1.18 KB
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
64
65
66
67
CREATE TABLE movies (
id int,
title varchar(255),
year int,
price real,
aspect_ratio varchar(255),
number_of_discs int,
rating varchar(255),
studio varchar(255),
run_time int,
asin int
);
CREATE TABLE personnel (
id int,
name varchar(255)
);
CREATE TABLE movies_roles (
id int,
personnel_id int,
movies_id int,
role varchar(255) -- ex. "Actor", "Producer" etc.
);
CREATE TABLE movies_formats (
id int,
movies_id int,
format varchar(255)
);
-- CREATE TABLE movies_language (
-- id int,
-- movies_id int,
-- language varchar(255),
-- quality varchar(255)
-- );
-- CREATE TABLE movies_subtitles (
-- id int,
-- movies_id int,
-- subtitles varchar(255)
-- );
-- CREATE TABLE movies_region (
-- id int,
-- movies_id int,
-- region varchar(255)
-- );
-- Please note that the above tables can also be accomplished the WP way:
-- movies_meta, id, movies_id, key, value => 1, "format", "Anamorphic", 1, "format", "Closed-captioned"
-- That way you're more flexible as to what the dvd data fields are.
CREATE TABLE reviewers (
id int,
name varchar(255)
);
CREATE TABLE reviews (
id int,
product_id int,
reviewer_id int,
title varchar(255),
rating int,
description text
);