-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.sql
More file actions
60 lines (53 loc) · 933 Bytes
/
schema.sql
File metadata and controls
60 lines (53 loc) · 933 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
54
55
56
57
58
59
CREATE TABLE name_basics(
nconst TEXT NOT NULL,
primaryName TEXT,
birthYear INTEGER,
deathYear INTEGER,
primaryProfession TEXT,
knownForTitles TEXT
);
CREATE TABLE title_akas(
titleId TEXT NOT NULL,
ordering INTEGER,
title TEXT,
region TEXT,
language TEXT,
types TEXT,
attributes TEXT,
isOriginalTitle BOOLEAN
);
CREATE TABLE title_basics(
tconst TEXT NOT NULL,
titleType TEXT,
primaryTitle TEXT,
originalTitle TEXT,
isAdult BOOLEAN,
startYear INTEGER,
endYear INTEGER,
runtimeMinutes INTEGER,
genres TEXT
);
CREATE TABLE title_crew(
tconst TEXT NOT NULL,
directors TEXT,
writers TEXT
);
CREATE TABLE title_episode(
tconst TEXT NOT NULL,
parentTconst TEXT,
seasonNumber INTEGER,
episodeNumber INTEGER
);
CREATE TABLE title_principals(
tconst TEXT NOT NULL,
ordering INTEGER,
nconst TEXT,
category TEXT,
job TEXT,
characters TEXT
);
CREATE TABLE title_ratings(
tconst TEXT NOT NULL,
averageRating DECIMAL,
numVotes INTEGER
);