-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_schema.txt
40 lines (34 loc) · 1.25 KB
/
create_schema.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
CREATE DATABASE footballStats /*!40100 DEFAULT CHARACTER SET latin1 */;
USE footballStats;
CREATE TABLE players (
id int(11) NOT NULL AUTO_INCREMENT,
firstname varchar(45) DEFAULT NULL,
lastname varchar(45) DEFAULT NULL,
predicted_score decimal(65,0) DEFAULT '0',
PRIMARY KEY (id)
) ENGINE=InnoDB AUTO_INCREMENT=7130 DEFAULT CHARSET=latin1;
CREATE TABLE player_year_stats (
pos varchar(45) DEFAULT NULL,
team varchar(45) DEFAULT NULL,
year int(11) DEFAULT NULL,
games_played int(11) DEFAULT NULL,
rush int(11) DEFAULT NULL,
rush_yards int(11) DEFAULT NULL,
rush_td int(11) DEFAULT NULL,
target int(11) DEFAULT NULL,
catch int(11) DEFAULT NULL,
catch_yards int(11) DEFAULT NULL,
catch_td int(11) DEFAULT NULL,
pass int(11) DEFAULT NULL,
complete int(11) DEFAULT NULL,
pass_yards int(11) DEFAULT NULL,
pass_td int(11) DEFAULT NULL,
interceptions int(11) DEFAULT NULL,
fumbles int(11) DEFAULT NULL,
id int(11) NOT NULL AUTO_INCREMENT,
player_id int(11) DEFAULT NULL,
points decimal(65,0) DEFAULT NULL,
PRIMARY KEY (id),
KEY player_id_idx (player_id),
CONSTRAINT player_id FOREIGN KEY (player_id) REFERENCES players (id) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1677 DEFAULT CHARSET=latin1;