import sqlite3
db = sqlite3.connect('nba.db')

db.execute("drop table IF EXISTS team")
db.execute("drop table IF EXISTS player")
db.execute("drop table IF EXISTS contract")
db.execute("drop table IF EXISTS hall_of_fame")
db.execute("drop table IF EXISTS position")
db.execute("drop table IF EXISTS all_star_team")
db.execute("drop table IF EXISTS voted_for")
db.execute("drop table IF EXISTS sponsor")
db.execute("drop table IF EXISTS previous_team")
db.execute("drop table IF EXISTS games")
db.execute("drop table IF EXISTS performances")
db.execute("drop table IF EXISTS take_part_in")
db.execute("drop table IF EXISTS coach")
db.execute("drop table IF EXISTS management")


db.execute("create table team(teamname varchar(25),homecourt varchar(30),t_id varchar(3) primary key)")
db.execute("create table player(p_id varchar(4) primary key,fname varchar(15),lname varchar(15),DOB date,height varchar(4),weight numeric(3),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table contract(year numeric(1),amount decimal(10,2),p_id varchar(4), foreign key(p_id) references player(p_id))");
db.execute("create table hall_of_fame(year numeric(4),group_h numeric(1),votes numeric(3),p_id varchar(4), foreign key(p_id) references player(p_id))");
db.execute("create table position(p_name varchar(2),p_id varchar(4),foreign key(p_id) references player(p_id))");
db.execute("create table all_star_team(year numeric(4) primary key,team varchar(4),winner varchar(25))");
db.execute("create table voted_for(p_id varchar(4),year numeric(4),primary key(p_id,year),foreign key(p_id) references player(p_id),foreign key(year) references all_star_team(year))");
db.execute("create table sponsor(name varchar(20) primary key,media varchar(20),shoe varchar(20),jersey varchar(20),equipment varchar(20),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table previous_team(prev_team_id varchar(3),t_id varchar(3),p_id varchar(4) primary key,from_p date,to_p date,foreign key(prev_team_id) references team(t_id),foreign key(t_id) references team(t_id),foreign key(p_id) references player(p_id))");
db.execute("create table games(game_id varchar(3) primary key,game_date date,location varchar(30))");
db.execute("create table performances(p_id varchar(4),game_id varchar(3),twos numeric(2),threes numeric(2),fgp decimal(3,1),turnovers numeric(2),fouls numeric(1),primary key(p_id,game_id) ,foreign key(p_id) references player(p_id),foreign key(game_id) references games(game_id))");
db.execute("create table take_part_in(t1_id varchar(3),t2_id varchar(3),game_id varchar(3),primary key(t1_id,t2_id,game_id),foreign key(t1_id) references team(t_id),foreign key(t2_id) references team(t_id),foreign key(game_id) references games(game_id))");
db.execute("create table coach(c_id varchar(3) primary key,fname varchar(10),lname varchar(15),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table management(manager varchar(20),physio varchar(20),president varchar(20),coach_fname varchar(10),coach_lname varchar(15),t_id varchar(3),foreign key(t_id) references team(t_id))");


db.execute("insert into team values('Los Angeles Lakers', 'Staples Center (A)', 'w01')");
db.execute("insert into team values('Los Angeles Clippers', 'Staples Center (B)', 'w02')");
db.execute("insert into team values('Houston Rockets', 'Toyota Center', 'w03')");
db.execute("insert into team values('San Antonio Spurs', 'At&t Center', 'w04')");
db.execute("insert into team values('Utah Jazz', 'Energy Solutions Arena', 'w05')");
db.execute("insert into team values('<NAME>', 'Pepsi Center', 'w06')");
db.execute("insert into team values('Golden State Warriors', 'Oracle Arena', 'w07')");
db.execute("insert into team values('Oklahoma City Thunder', 'Arco Arena', 'w08')");
db.execute("insert into team values('Portland Trailblazers', 'Moda Center', 'w09')");
db.execute("insert into team values('Minnesota Timberwolves', 'Target Center', 'w10')");
db.execute("insert into team values('Cleveland Cavaliers', 'Quicken Loans Arena', 'e01')");
db.execute("insert into team values('Boston Celtics', 'TD Center', 'e02')");
db.execute("insert into team values('Miami Heat', 'AA Arena', 'e03')");
db.execute("insert into team values('Orlando Magic', 'Amway Center', 'e04')");
db.execute("insert into team values('Chicago Bulls', 'United Center', 'e05')");
db.execute("insert into team values('Milwaukee Bucks', 'Bradley Center', 'e06')");
db.execute("insert into team values('New York Knicks', 'Madison Square Garden', 'e07')");
db.execute("insert into team values('Indiana Pacers', 'Smoothie Center', 'e08')");
db.execute("insert into team values('Philadelphia 76ers', 'Bell Arena', 'e09')");
db.execute("insert into team values('Detroit Pistons', 'The Palace', 'e10')");

db.execute("insert into player values('p001', 'Kobe', 'Bryant' , '1972-07-19','6`6', 225, 'w01')");
db.execute("insert into player values('p002', 'Derek', 'Fisher' , '1974-06-17','6`3', 205, 'w01')");
db.execute("insert into player values('p003', 'Pau', 'Gasol' , '1970-01-09','7`0', 255, 'w01')");
db.execute("insert into player values('p004', 'Ron', 'Artest' , '1975-01-24','6`7', 235, 'w01')");
db.execute("insert into player values('p005', 'Andrew', 'Bynum' , '1972-09-12','7`0', 260, 'w01')");
db.execute("insert into player values('p006', 'JJ', 'Reddick' , '1967-03-11','6`1', 190, 'w02')");
db.execute("insert into player values('p007', 'Blake', 'Griffin' , '1973-10-17','6`11', 220, 'w02')");
db.execute("insert into player values('p008', 'Chris', 'Paul' , '1982-07-19','6`0', 182, 'w02')");
db.execute("insert into player values('p009', 'Jamal', 'Crawford' , '1986-09-17','6`6', 213, 'w02')");
db.execute("insert into player values('p010', 'Austin', 'Rivers' , '1987-02-20','6`4', 198, 'w02')");
db.execute("insert into player values('p011', 'James', 'Harden' , '1989-07-19','6`6', 207, 'w03')");
db.execute("insert into player values('p012', 'Trevor', 'Ariza' , '1990-02-12','6`6', 231, 'w03')");
db.execute("insert into player values('p013', 'Clint', 'Capella' , '1984-06-16','6`11', 250, 'w03')");
db.execute("insert into player values('p014', 'Aaron', 'Brooks' , '1988-08-18','6`4', 222, 'w03')");
db.execute("insert into player values('p015', 'Metta', 'Peace' , '1991-03-19','6`8', 240, 'w03')");
db.execute("insert into player values('p016', 'Tim', 'Duncan' , '1974-11-23','7`0', 246, 'w04')");
db.execute("insert into player values('p017', 'Manu', 'Ginobili' , '1979-07-24','6`6', 205, 'w04')");
db.execute("insert into player values('p018', 'Matt', 'Bonner' , '1978-07-25','6`9', 232, 'w04')");
db.execute("insert into player values('p019', 'Tony', 'Parker' , '1990-05-16','6`8', 206, 'w04')");
db.execute("insert into player values('p020', 'Kawhi', 'Leonard' , '1985-06-18','6`10', 228, 'w04')");
db.execute("insert into player values('p021', 'John', 'Stockton' , '1965-07-12','6`3', 208, 'w05')");
db.execute("insert into player values('p022', 'Karl', 'Malone' , '1962-02-03','6`10', 258, 'w05')");
db.execute("insert into player values('p023', 'Carlos', 'Boozer' , '1981-12-03','6`11', 248, 'w05')");
db.execute("insert into player values('p024', 'Deron', 'Williams' , '1989-04-11','6`6', 201, 'w05')");
db.execute("insert into player values('p025', 'Gordan', 'Hayward' , '1974-011-12','6`7', 223, 'w05')");
db.execute("insert into player values('p026', 'Lebron', 'James' , '1984-01-13','6`8', 235, 'e01')");
db.execute("insert into player values('p027', 'Kyrie', 'Irving' , '1987-04-07','6`3', 202, 'e01')");
db.execute("insert into player values('p028', 'Kevin', 'Love' , '1985-04-12','6`10', 239, 'e01')");
db.execute("insert into player values('p029', 'JR', 'Smith' , '1983-03-14','6`8', 231, 'e01')");
db.execute("insert into player values('p030', 'Mo', 'Williams' , '1973-06-19','6`2', 192, 'e01')");
db.execute("insert into player values('p031', 'Rajon', 'Rondo' , '1988-08-18','6`4', 197, 'e02')");
db.execute("insert into player values('p032', 'Paul', 'Pierce' , '1971-04-01','6`8', 231, 'e02')");
db.execute("insert into player values('p033', 'Ray', 'Allen' , '1976-01-26','6`6', 228, 'e02')");
db.execute("insert into player values('p034', 'Kevin', 'Garnett' , '1974-12-10','6`11', 249, 'e02')");
db.execute("insert into player values('p035', 'Isaiah', 'Thomas' , '1989-02-07','5`9', 190, 'e02')");
db.execute("insert into player values('p036', 'Lebron', 'James' , '1988-07-31','6`8', 245, 'e03')");
db.execute("insert into player values('p037', 'Dwayne', 'Wade' , '1976-07-18','6`6', 229, 'e03')");
db.execute("insert into player values('p038', 'Chris', 'Bosh' , '1980-06-10','6`11', 251, 'e03')");
db.execute("insert into player values('p039', 'Chris', 'Anderson' , '1980-05-14','6`11', 243, 'e03')");
db.execute("insert into player values('p040', 'Ray', 'Allen' , '1976-01-26','6`6', 228, 'e03')");
db.execute("insert into player values('p041', 'Shaq', 'Oneal' , '1970-03-29','7`1', 275, 'e04')");
db.execute("insert into player values('p042', 'Dwight', 'Howard' , '1987-06-30','6`10', 252, 'e04')");
db.execute("insert into player values('p043', 'Rashard', 'Lewis' , '1986-05-31','6`10', 223, 'e04')");
db.execute("insert into player values('p044', 'Hedo', 'Turkogulu' , '1981-08-25','6`11', 238, 'e04')");
db.execute("insert into player values('p045', 'Chris', 'Leonard' , '1980-07-18','6`4', 214, 'e04')");
db.execute("insert into player values('p046', 'Michael', 'Jordan' , '1962-02-14','6`6', 235, 'e05')");
db.execute("insert into player values('p047', 'Steve', 'Kerr' , '1965-11-21','6`8', 231, 'e05')");
db.execute("insert into player values('p048', 'Ron', 'Harper' , '1968-01-02','6`11', 254, 'e05')");
db.execute("insert into player values('p049', 'Scottie', 'Pippen' , '1967-01-18','6`8', 239, 'e05')");
db.execute("insert into player values('p050', 'Dennis', 'Rodman' , '1965-08-26','6`11', 250, 'e05')");
db.execute("insert into player values('p051', 'Stephen', 'Curry' , '1988-03-14','6`3', 238, 'w07')");
db.execute("insert into player values('p052', 'Kevin', 'Durant' , '1988-09-29','6`9', 258, 'w07')");
db.execute("insert into player values('p053', 'Rasheed', 'Wallace' , '1978-10-29','6`10', 277, 'w07')");
db.execute("insert into player values('p054', 'Courtney', 'Lee' , '1986-08-21','6`11', 272, 'w07')");
db.execute("insert into player values('p055', 'Kendrick', 'Purkins' , '1977-09-29','6`2', 218, 'w07')");
db.execute("insert into player values('p056', 'Gerald', 'Wallace' , '1988-01-30','7`0', 288, 'w06')");
db.execute("insert into player values('p057', 'Kwame', 'Brown' , '1989-11-20','6`6', 234, 'w06')");
db.execute("insert into player values('p058', 'Smush', 'Parker' , '1973-02-27','6`1', 208, 'w06')");
db.execute("insert into player values('p059', 'Hakeem', 'Olijuawan' , '1983-02-26','6`11', 265, 'w06')");
db.execute("insert into player values('p060', 'Oscar', 'Robertson' , '1982-04-07','6`5', 231, 'w06')");
db.execute("insert into player values('p061', 'Kevin', 'Hart' , '1981-02-29','6`0', 192, 'w08')");
db.execute("insert into player values('p062', 'Chris', 'Douglas' , '1983-01-11','6`1', 218, 'w08')");
db.execute("insert into player values('p063', 'Domininic', 'Ngyuen' , '1988-09-19','6`9', 258, 'w08')");
db.execute("insert into player values('p064', 'Jonathan', 'Lam' , '1980-09-23','6`8', 254, 'w08')");
db.execute("insert into player values('p065', 'Jonathan', 'Tran' , '1981-02-23','6`10', 268, 'w08')");
db.execute("insert into player values('p066', 'Chris', 'Murdok' , '1983-02-11','6`0', 201, 'w09')");
db.execute("insert into player values('p067', 'Michael', 'Landis' , '1978-09-21','6`0', 199, 'w09')");
db.execute("insert into player values('p068', 'Jordan', 'Valle' , '1975-10-19','5`9', 186, 'w09')");
db.execute("insert into player values('p069', 'Hugo', 'Durant' , '1987-05-14','6`9', 258, 'w09')");
db.execute("insert into player values('p070', 'Aaron', 'Rodgers' , '1988-01-03','6`2', 208, 'w09')");
db.execute("insert into player values('p071', 'Jordy', 'Nelson' , '1978-12-26','5`11', 195, 'w10')");
db.execute("insert into player values('p072', 'Eddie', 'Lacy' , '1971-11-05','7`1', 298, 'w10')");
db.execute("insert into player values('p073', 'Brook', 'Durant' , '1978-01-02','7`1', 301, 'w10')");
db.execute("insert into player values('p074', 'Akhilesh', 'Nirnayya' , '1985-01-02','6`5', 241, 'w10')");
db.execute("insert into player values('p075', 'Skip', 'Bayless' , '1988-03-18','7`2', 302, 'w10')");
db.execute("insert into player values('p076', 'Stephen', 'Smith' , '1984-09-29','6`9', 255, 'e06')");
db.execute("insert into player values('p077', 'DB', 'Saha' , '1982-09-25','6`0', 202, 'e06')");
db.execute("insert into player values('p078', 'Tom', 'Brady' , '1979-10-19','6`3', 253, 'e06')");
db.execute("insert into player values('p079', 'Sam', 'Wilson' , '1988-11-21','6`1', 231, 'e06')");
db.execute("insert into player values('p080', 'Larry', 'Durant' , '1988-04-24','6`9', 258, 'e06')");
db.execute("insert into player values('p081', 'Russel', 'Wilson' , '1984-03-29','6`9', 245, 'e07')");
db.execute("insert into player values('p082', 'Corey', 'Seager' , '1988-05-23','6`8', 248, 'e07')");
db.execute("insert into player values('p083', 'Orlando', 'Bloo' , '1990-09-19','6`2', 228, 'e07')");
db.execute("insert into player values('p084', 'Mack', 'Douglas' , '1988-05-07','6`4', 219, 'e07')");
db.execute("insert into player values('p085', 'Frank', '<NAME>' , '1987-12-09','6`0', 208, 'e07')");
db.execute("insert into player values('p086', 'Holden', 'Tran' , '1988-02-29','6`9', 257, 'e08')");
db.execute("insert into player values('p087', 'Reggie', 'Miller' , '1988-01-29','6`9', 268, 'e08')");
db.execute("insert into player values('p088', 'Reggie', 'Jackson' , '1988-07-28','6`2', 214, 'e08')");
db.execute("insert into player values('p089', 'Phil', 'Durant' , '1986-06-24','6`3', 228, 'e08')");
db.execute("insert into player values('p090', 'Kevin', 'Jackson' , '1987-06-25','6`4', 238, 'e08')");
db.execute("insert into player values('p091', 'Eddie', 'Douglas' , '1988-09-30','6`3', 221, 'e09')");
db.execute("insert into player values('p092', 'Dominic', 'Brady' , '1988-07-29','6`9', 264, 'e09')");
db.execute("insert into player values('p093', 'Brady', 'Aaaron' , '1985-11-09','7`0', 276, 'e09')");
db.execute("insert into player values('p094', 'Wison', 'Smith' , '1981-06-07','6`11', 275, 'e09')");
db.execute("insert into player values('p095', 'Mikey', 'Douglas' , '1982-03-24','6`5', 246, 'e09')");
db.execute("insert into player values('p096', 'Carl', 'Louis' , '1982-01-20','6`4', 223, 'e10')");
db.execute("insert into player values('p097', 'Jimmy', 'Neutron' , '1983-04-25','6`6', 258, 'e10')");
db.execute("insert into player values('p098', 'Tom', 'Smith' , '1983-04-21','6`3', 220, 'e10')");
db.execute("insert into player values('p099', 'Bob', 'Joe' , '1978-03-13','6`10', 258, 'e10')");
db.execute("insert into player values('p100', 'Matt', 'LeBlanc' , '1983-04-05','6`11', 277, 'e10')");


db.execute("insert into contract values(6,82837194.56, 'p001')");
db.execute("insert into contract values(3,6756142.92, 'p002')");
db.execute("insert into contract values(2,7562980.13, 'p003')");
db.execute("insert into contract values(5,40856194.45, 'p004')");
db.execute("insert into contract values(1,2834164.67, 'p005')");
db.execute("insert into contract values(2,5892143.22, 'p006')");
db.execute("insert into contract values(3,12783547.98, 'p007')");
db.execute("insert into contract values(6,76923123.65, 'p008')");
db.execute("insert into contract values(6,65897122.34, 'p009')");
db.execute("insert into contract values(3,13987652.78, 'p010')");
db.execute("insert into contract values(4,24678234.65, 'p011')");
db.execute("insert into contract values(2,458211.98, 'p012')");
db.execute("insert into contract values(3,12875123.67, 'p013')");
db.execute("insert into contract values(4,24132987.54, 'p014')");
db.execute("insert into contract values(6,60982341.43, 'p015')");
db.execute("insert into contract values(1,3567982.12, 'p016')");
db.execute("insert into contract values(3,13986342.87, 'p017')");
db.execute("insert into contract values(2,3456432.11, 'p018')");
db.execute("insert into contract values(1,1543678.42, 'p019')");
db.execute("insert into contract values(4,28767895.93, 'p020')");
db.execute("insert into contract values(1,1872343.34, 'p021')");
db.execute("insert into contract values(2,6234984.54, 'p022')");
db.execute("insert into contract values(4,3874351.73, 'p023')");
db.execute("insert into contract values(3,2873115.91, 'p024')");
db.execute("insert into contract values(1,3893478.22, 'p025')");
db.execute("insert into contract values(2,12457834.98, 'p026')");
db.execute("insert into contract values(4,28335910.43, 'p027')");
db.execute("insert into contract values(1,2384973.11, 'p028')");
db.execute("insert into contract values(3,21847384.44, 'p029')");
db.execute("insert into contract values(5,50327842.31, 'p030')");
db.execute("insert into contract values(5,45348729.48, 'p031')");
db.execute("insert into contract values(3,28761945.52, 'p032')");
db.execute("insert into contract values(4,38737895.56, 'p033')");
db.execute("insert into contract values(2,18767534.33, 'p034')");
db.execute("insert into contract values(1,6239841.87, 'p035')");
db.execute("insert into contract values(2,15437854.88, 'p036')");
db.execute("insert into contract values(3,30184766.24, 'p037')");
db.execute("insert into contract values(1,8767658.44, 'p038')");
db.execute("insert into contract values(4,29769895.01, 'p039')");
db.execute("insert into contract values(3,28767887.56, 'p040')");
db.execute("insert into contract values(6,72555895.04, 'p041')");
db.execute("insert into contract values(2,16884139.55, 'p042')");
db.execute("insert into contract values(6,60456339.75, 'p043')");
db.execute("insert into contract values(1,2443985.81, 'p044')");
db.execute("insert into contract values(4,29223895.23, 'p045')");
db.execute("insert into contract values(6,92769985.08, 'p046')");
db.execute("insert into contract values(1,2983728.44, 'p047')");
db.execute("insert into contract values(2,16887320.87, 'p048')");
db.execute("insert into contract values(3,24887992.90, 'p049')");
db.execute("insert into contract values(4,36784637.43, 'p050')");
db.execute("insert into contract values(6,82833194.56, 'p051')");
db.execute("insert into contract values(3,6756942.92, 'p052')");
db.execute("insert into contract values(2,7562880.13, 'p053')");
db.execute("insert into contract values(5,40857194.45, 'p054')");
db.execute("insert into contract values(1,2834664.67, 'p055')");
db.execute("insert into contract values(2,5892543.22, 'p056')");
db.execute("insert into contract values(3,12783547.98, 'p057')");
db.execute("insert into contract values(6,76922123.65, 'p058')");
db.execute("insert into contract values(6,65891122.34, 'p059')");
db.execute("insert into contract values(3,13982652.78, 'p060')");
db.execute("insert into contract values(4,24673234.65, 'p061')");
db.execute("insert into contract values(2,458261.98, 'p062')");
db.execute("insert into contract values(3,12876123.67, 'p063')");
db.execute("insert into contract values(4,24135987.54, 'p064')");
db.execute("insert into contract values(6,60984341.43, 'p065')");
db.execute("insert into contract values(1,3567982.12, 'p066')");
db.execute("insert into contract values(3,13981342.87, 'p067')");
db.execute("insert into contract values(2,3456432.11, 'p068')");
db.execute("insert into contract values(1,1543378.42, 'p069')");
db.execute("insert into contract values(4,28767895.93, 'p070')");
db.execute("insert into contract values(1,1872343.34, 'p071')");
db.execute("insert into contract values(2,6234984.54, 'p072')");
db.execute("insert into contract values(4,3874351.73, 'p073')");
db.execute("insert into contract values(3,2873115.91, 'p074')");
db.execute("insert into contract values(1,3893478.22, 'p075')");
db.execute("insert into contract values(2,12457834.98, 'p076')");
db.execute("insert into contract values(4,28335910.43, 'p077')");
db.execute("insert into contract values(1,2384973.11, 'p078')");
db.execute("insert into contract values(5,50337842.31, 'p080')");
db.execute("insert into contract values(5,45328729.48, 'p081')");
db.execute("insert into contract values(3,28713945.52, 'p082')");
db.execute("insert into contract values(4,38757895.56, 'p083')");
db.execute("insert into contract values(2,18737534.33, 'p084')");
db.execute("insert into contract values(1,6237841.87, 'p085')");
db.execute("insert into contract values(2,15432854.88, 'p086')");
db.execute("insert into contract values(3,30124766.24, 'p087')");
db.execute("insert into contract values(1,8267658.44, 'p088')");
db.execute("insert into contract values(4,22769895.01, 'p089')");
db.execute("insert into contract values(3,22767887.56, 'p090')");
db.execute("insert into contract values(6,72155895.04, 'p091')");
db.execute("insert into contract values(2,16864139.55, 'p092')");
db.execute("insert into contract values(6,60476339.75, 'p093')");
db.execute("insert into contract values(1,2448985.81, 'p094')");
db.execute("insert into contract values(4,29293895.23, 'p095')");
db.execute("insert into contract values(6,92719985.08, 'p096')");
db.execute("insert into contract values(1,2982728.44, 'p097')");
db.execute("insert into contract values(2,16837320.87, 'p098')");
db.execute("insert into contract values(3,24857992.90, 'p099')");
db.execute("insert into contract values(4,36764637.43, 'p100')");


db.execute("insert into hall_of_fame values(1996, 2, 648, 'p046')");
db.execute("insert into hall_of_fame values(1996, 2, 211, 'p047')");
db.execute("insert into hall_of_fame values(1997, 1, 315, 'p050')");
db.execute("insert into hall_of_fame values(1998, 1, 367, 'p048')");
db.execute("insert into hall_of_fame values(1999, 3, 312, 'p049')");
db.execute("insert into hall_of_fame values(1999, 3, 293, 'p035')");
db.execute("insert into hall_of_fame values(1999, 3, 215, 'p041')");
db.execute("insert into hall_of_fame values(2000, 1, 196, 'p039')");
db.execute("insert into hall_of_fame values(2001, 2, 204, 'p003')");
db.execute("insert into hall_of_fame values(2001, 2, 209, 'p029')");
db.execute("insert into hall_of_fame values(2002, 1, 394, 'p026')");
db.execute("insert into hall_of_fame values(2003, 1, 495, 'p009')");
db.execute("insert into hall_of_fame values(2004, 2, 531, 'p042')");
db.execute("insert into hall_of_fame values(2004, 2, 458, 'p025')");
db.execute("insert into hall_of_fame values(2005, 1, 286, 'p007')");
db.execute("insert into hall_of_fame values(2006, 3, 476, 'p014')");
db.execute("insert into hall_of_fame values(2006, 3, 541, 'p034')");
db.execute("insert into hall_of_fame values(2006, 3, 477, 'p016')");
db.execute("insert into hall_of_fame values(2007, 2, 593, 'p001')");
db.execute("insert into hall_of_fame values(2007, 2, 308, 'p037')");


db.execute("insert into position values('SG','p001')");
db.execute("insert into position values('PG','p002')");
db.execute("insert into position values('PF','p003')");
db.execute("insert into position values('SF','p004')");
db.execute("insert into position values('C','p005')");
db.execute("insert into position values('SG','p006')");
db.execute("insert into position values('PF','p007')");
db.execute("insert into position values('PG','p008')");
db.execute("insert into position values('SG','p009')");
db.execute("insert into position values('PG','p010')");
db.execute("insert into position values('SG','p011')");
db.execute("insert into position values('SF','p012')");
db.execute("insert into position values('C','p013')");
db.execute("insert into position values('PG','p014')");
db.execute("insert into position values('SF','p015')");
db.execute("insert into position values('PF','p016')");
db.execute("insert into position values('SG','p017')");
db.execute("insert into position values('C','p018')");
db.execute("insert into position values('PG','p019')");
db.execute("insert into position values('SG','p020')");


db.execute("insert into all_star_team values('1997','East','<NAME>')");
db.execute("insert into all_star_team values('1998','West','<NAME>')");
db.execute("insert into all_star_team values('1999','West','Shaq O Neal')");
db.execute("insert into all_star_team values('2000','West','<NAME>')");
db.execute("insert into all_star_team values('2001','West','<NAME>')");
db.execute("insert into all_star_team values('2002','West','<NAME>')");
db.execute("insert into all_star_team values('2003','West','<NAME>')");
db.execute("insert into all_star_team values('2004','West','Shaq O Neal')");
db.execute("insert into all_star_team values('2005','East','<NAME>')");
db.execute("insert into all_star_team values('2006','West','<NAME>')");
db.execute("insert into all_star_team values('2007','East','<NAME>')");
db.execute("insert into all_star_team values('2008','East','<NAME>')");
db.execute("insert into all_star_team values('2009','East','<NAME>')");
db.execute("insert into all_star_team values('2010','West','Kobe Bryant')");
db.execute("insert into all_star_team values('2011','West','<NAME>')");
db.execute("insert into all_star_team values('2012','West','<NAME>')");
db.execute("insert into all_star_team values('2013','East','<NAME>')");
db.execute("insert into all_star_team values('2014','West','<NAME>')");
db.execute("insert into all_star_team values('2015','East','<NAME>')");
db.execute("insert into all_star_team values('2016','West','<NAME>')");
db.execute("insert into all_star_team values('2017','East','<NAME>')");

db.execute("insert into voted_for values('p046','1997')");
db.execute("insert into voted_for values('p046','1998')");
db.execute("insert into voted_for values('p001','1998')");
db.execute("insert into voted_for values('p001','1999')");
db.execute("insert into voted_for values('p001','2000')");
db.execute("insert into voted_for values('p001','2001')");
db.execute("insert into voted_for values('p001','2002')");
db.execute("insert into voted_for values('p001','2003')");
db.execute("insert into voted_for values('p001','2004')");
db.execute("insert into voted_for values('p001','2005')");
db.execute("insert into voted_for values('p001','2006')");
db.execute("insert into voted_for values('p001','2007')");
db.execute("insert into voted_for values('p001','2008')");
db.execute("insert into voted_for values('p001','2009')");
db.execute("insert into voted_for values('p001','2010')");
db.execute("insert into voted_for values('p001','2011')");
db.execute("insert into voted_for values('p001','2012')");
db.execute("insert into voted_for values('p001','2013')");
db.execute("insert into voted_for values('p001','2014')");
db.execute("insert into voted_for values('p001','2015')");
db.execute("insert into voted_for values('p001','2016')");
db.execute("insert into voted_for values('p016','1998')");
db.execute("insert into voted_for values('p016','1999')");
db.execute("insert into voted_for values('p016','2000')");
db.execute("insert into voted_for values('p016','2001')");
db.execute("insert into voted_for values('p016','2002')");
db.execute("insert into voted_for values('p016','2003')");
db.execute("insert into voted_for values('p016','2004')");
db.execute("insert into voted_for values('p016','2005')");
db.execute("insert into voted_for values('p016','2006')");
db.execute("insert into voted_for values('p016','2007')");
db.execute("insert into voted_for values('p016','2008')");
db.execute("insert into voted_for values('p016','2009')");
db.execute("insert into voted_for values('p016','2010')");
db.execute("insert into voted_for values('p016','2011')");
db.execute("insert into voted_for values('p016','2012')");
db.execute("insert into voted_for values('p016','2013')");
db.execute("insert into voted_for values('p016','2014')");
db.execute("insert into voted_for values('p016','2015')");
db.execute("insert into voted_for values('p016','2016')");
db.execute("insert into voted_for values('p020','2017')");
db.execute("insert into voted_for values('p011','2017')");
db.execute("insert into voted_for values('p027','2017')");
db.execute("insert into voted_for values('p028','2017')");
db.execute("insert into voted_for values('p026','2017')");
db.execute("insert into voted_for values('p007','2017')");


db.execute("insert into sponsor values('Nike','Nike Media','Air Jordan','Air Fit','Nike Equipment','e01')");
db.execute("insert into sponsor values('Adidas','Adidas Media','P90x','Clima cool','Adi Train','e02')");
db.execute("insert into sponsor values('Puma','Puma Media','Blaze','Drifit','Puma Tech','e03')");
db.execute("insert into sponsor values('Under Armor','Armor Media','Ziko 20','Body Armor','Pro Tech','e04')");
db.execute("insert into sponsor values('New Balance','Balance Media','Gel Cumulus','Perspire','Balancequip','e05')");
db.execute("insert into sponsor values('Bwin','Bw Media','Nimbus','Clean','Win Training','e06')");
db.execute("insert into sponsor values('Qatar Airlines','Qatar Media','Inferno','Sense','Training Pro','e07')");
db.execute("insert into sponsor values('American Insurance','American Media','Cloud','Dew','TechX','e08')");
db.execute("insert into sponsor values('Slazenger','Slaz Media','Venom','Skin Z','SlazTech','e09')");
db.execute("insert into sponsor values('Bank of America','North Media','Kraken','Layer','American Equipment','e10')");
db.execute("insert into sponsor values('Shell','Shell Media','Power','Boost','Power Tech','w01')");
db.execute("insert into sponsor values('Canondale','CD Media','Hydro','Gravitas','Canon Equipment','w02')");
db.execute("insert into sponsor values('The North Face','Public Face','Float','Levitate','NorTech','w03')");
db.execute("insert into sponsor values('Walmart','Wal Media','Chi','X Touch','Equipment Z','w04')");
db.execute("insert into sponsor values('Target','Target Media','Energy','Mutate','Sense Equip','w05')");
db.execute("insert into sponsor values('Wells Fargo','Fargo Media','Chimera','Spear','Wellness Tech','w06')");
db.execute("insert into sponsor values('Mervyns','Merv Media','Katana','Blade','Merv Tech','w07')");
db.execute("insert into sponsor values('Best Buy','BB Media','Claw','Fang','Health Equipment','w08')");
db.execute("insert into sponsor values('CBS','CBS Media','GenX','Protect X','ProTrain','w09')");
db.execute("insert into sponsor values('KIA','KIA Media','Scimitar','Tyranitar','Train Max','w10')");


db.execute("insert into previous_team values('e03','e01','p001','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e01','e01','p002','2007-11-21','2010-11-21')");
db.execute("insert into previous_team values('e02','e01','p003','2010-11-21','2014-11-21')");
db.execute("insert into previous_team values('e03','w01','p004','2003-11-23','2004-11-21')");
db.execute("insert into previous_team values('e01','w01','p005','2004-11-21','2005-11-21')");
db.execute("insert into previous_team values('e05','w01','p006','2005-11-21','2015-11-21')");
db.execute("insert into previous_team values('w01','w01','p007','2015-11-21','2016-11-21')");
db.execute("insert into previous_team values('e03','w01','p008','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e01','w01','p009','2007-11-21','2008-11-21')");
db.execute("insert into previous_team values('w05','w01','p010','2008-11-21','2014-11-21')");
db.execute("insert into previous_team values('e07','w01','p011','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e02','w01','p012','2007-11-21','2008-11-21')");
db.execute("insert into previous_team values('e05','w01','p013','2008-11-21','2009-11-21')");
db.execute("insert into previous_team values('w03','w01','p014','2009-11-21','2010-11-21')");
db.execute("insert into previous_team values('w07','w05','p015','2001-11-21','2003-11-21')");
db.execute("insert into previous_team values('e04','w05','p016','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e05','w05','p017','2007-11-21','2013-11-21')");
db.execute("insert into previous_team values('w01','w05','p018','2013-11-21','2015-11-21')");
db.execute("insert into previous_team values('e01','w05','p019','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e03','e05','p037','2003-11-21','2016-11-21')");


db.execute("insert into games values('g01','2016-03-16','At&t Center')");
db.execute("insert into games values('g02','2016-03-21','Oracle Arena')");
db.execute("insert into games values('g03','2016-04-07','Quicken Loans Arena')");
db.execute("insert into games values('g04','2016-04-19','Staples Center (A)')");
db.execute("insert into games values('g05','2016-05-23','Staples Center (B)')");
db.execute("insert into games values('g06','2016-05-27','Toyota Center')");
db.execute("insert into games values('g07','2016-06-12','Amway Center')");
db.execute("insert into games values('g08','2016-06-17','United Center')");
db.execute("insert into games values('g09','2016-07-01','Energy Solutions Arena')");
db.execute("insert into games values('g10','2016-07-31','Quicken Loans Arena')");
db.execute("insert into games values('g11','2016-08-22','United Center')");
db.execute("insert into games values('g12','2016-08-29','United Center')");
db.execute("insert into games values('g13','2016-09-08','Oracle Arena')");
db.execute("insert into games values('g14','2016-09-29','At&t Center')");
db.execute("insert into games values('g15','2016-10-16','Staples Center (B)')");
db.execute("insert into games values('g16','2016-10-24','TD Center')");
db.execute("insert into games values('g17','2016-11-04','United Center')");
db.execute("insert into games values('g18','2016-11-14','TD Center')");
db.execute("insert into games values('g19','2016-12-20','Staples Center (A)')");
db.execute("insert into games values('g20','2016-12-25','Toyota Center')");


db.execute("insert into performances values('p020','g01',12,9,55.3,7,3)");
db.execute("insert into performances values('p016','g01',14,4,79.7,9,5)");
db.execute("insert into performances values('p051','g01',6,8,67.2,3,0)");
db.execute("insert into performances values('p052','g01',9,7,71.4,4,1)");
db.execute("insert into performances values('p051','g02',7,10,68.6,5,1)");
db.execute("insert into performances values('p052','g02',10,7,53.9,4,2)");
db.execute("insert into performances values('p026','g02',12,6,75.2,7,1)");
db.execute("insert into performances values('p027','g02',11,8,57.9,6,1)");
db.execute("insert into performances values('p027','g03',8,5,69.6,6,4)");
db.execute("insert into performances values('p026','g03',6,4,51.4,5,6)");
db.execute("insert into performances values('p020','g04',9,10,63.8,9,2)");
db.execute("insert into performances values('p008','g05',13,9,72.7,6,1)");
db.execute("insert into performances values('p035','g06',14,6,78.1,4,5)");
db.execute("insert into performances values('p011','g07',12,5,60.0,8,3)");
db.execute("insert into performances values('p046','g08',8,10,64.6,5,1)");
db.execute("insert into performances values('p001','g09',6,9,59.2,7,6)");
db.execute("insert into performances values('p051','g10',7,4,65.6,8,4)");
db.execute("insert into performances values('p046','g11',10,7,53.6,9,2)");
db.execute("insert into performances values('p049','g12',9,5,76.1,4,6)");
db.execute("insert into performances values('p011','g13',14,6,68.8,4,5)");


db.execute("insert into take_part_in values('w07','w04','g01')");
db.execute("insert into take_part_in values('e01','w07','g02')");
db.execute("insert into take_part_in values('w01','e01','g03')");
db.execute("insert into take_part_in values('w04','w01','g04')");
db.execute("insert into take_part_in values('e03','w02','g05')");
db.execute("insert into take_part_in values('e02','w03','g06')");
db.execute("insert into take_part_in values('w03','e04','g07')");
db.execute("insert into take_part_in values('e04','e05','g08')");
db.execute("insert into take_part_in values('w01','w05','g09')");
db.execute("insert into take_part_in values('w07','e03','g10')");
db.execute("insert into take_part_in values('w01','e05','g11')");
db.execute("insert into take_part_in values('e03','e05','g12')");
db.execute("insert into take_part_in values('w03','w07','g13')");
db.execute("insert into take_part_in values('e03','w04','g14')");
db.execute("insert into take_part_in values('e01','w02','g15')");
db.execute("insert into take_part_in values('w03','e02','g16')");
db.execute("insert into take_part_in values('w07','e05','g17')");
db.execute("insert into take_part_in values('e04','e02','g18')");
db.execute("insert into take_part_in values('e05','w01','g19')");
db.execute("insert into take_part_in values('e01','w03','g20')");


db.execute("insert into coach values('c01','Tyronn','Lue','e01')");
db.execute("insert into coach values('c02','Brad','Stevens','e02')");
db.execute("insert into coach values('c03','Eric','Spoelstra','e03')");
db.execute("insert into coach values('c04','Frank','Vogel','e04')");
db.execute("insert into coach values('c05','Fred','Hoiberg','e05')");
db.execute("insert into coach values('c06','Jason','Kidd','e06')");
db.execute("insert into coach values('c07','Jeff','Hornacek','e07')");
db.execute("insert into coach values('c08','Nate','McMillan','e08')");
db.execute("insert into coach values('c09','Brett','Brown','e09')");
db.execute("insert into coach values('c10','Stan','<NAME>','e10')");
db.execute("insert into coach values('c11','Luke','Walton','w01')");
db.execute("insert into coach values('c12','Doc','Rivers','w02')");
db.execute("insert into coach values('c13','Mike','D`Antoni','w03')");
db.execute("insert into coach values('c14','Gregg','Popovich','w04')");
db.execute("insert into coach values('c15','Quin','Snyder','w05')");
db.execute("insert into coach values('c16','Michael','Malone','w06')");
db.execute("insert into coach values('c17','Steve','Kerr','w07')");
db.execute("insert into coach values('c18','Billy','Donovan','w08')");
db.execute("insert into coach values('c19','Terry','Stotts','w09')");
db.execute("insert into coach values('c20','Tom','Thibodeau','w10')");


db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Luke','Walton','w01')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Doc','Rivers', 'w02')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Mike' ,'D`Antoni', 'w03')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Gregg','Popovich', 'w04')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Quin','Snyder' , 'w05')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Michael' ,'Malone' , 'w06')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Steve','Kerr', 'w07')");
db.execute("insert into management values('<NAME>','K.Larry','<NAME>','Billy' ,'Donovan', 'w08')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Terry','Stotts', 'w09')");
db.execute("insert into management values('<NAME>','T.Lewis','<NAME>','Tom' ,'Thibodeau' , 'w10')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>' ,'Tyronn' ,'Lue', 'e01')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>', 'Brad' ,'Stevens','e02')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Erik' ,'Spoelstra' , 'e03')");
db.execute("insert into management values('<NAME>','S.Judy','<NAME>','Frank','Vogel' , 'e04')");
db.execute("insert into management values('<NAME>','L.Brown','<NAME>' ,'Fred','Hoiberg', 'e05')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Jason', 'Kidd' , 'e06')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Jeff', 'Hornacek', 'e07')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Nate','McMillan','e08')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Brett' ,'Brown', 'e09')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Stan','<NAME>', 'e10')");


db.commit()

import sqlite3
db = sqlite3.connect('nba.db')

db.execute("drop table IF EXISTS team")
db.execute("drop table IF EXISTS player")
db.execute("drop table IF EXISTS contract")
db.execute("drop table IF EXISTS hall_of_fame")
db.execute("drop table IF EXISTS position")
db.execute("drop table IF EXISTS all_star_team")
db.execute("drop table IF EXISTS voted_for")
db.execute("drop table IF EXISTS sponsor")
db.execute("drop table IF EXISTS previous_team")
db.execute("drop table IF EXISTS games")
db.execute("drop table IF EXISTS performances")
db.execute("drop table IF EXISTS take_part_in")
db.execute("drop table IF EXISTS coach")
db.execute("drop table IF EXISTS management")


db.execute("create table team(teamname varchar(25),homecourt varchar(30),t_id varchar(3) primary key)")
db.execute("create table player(p_id varchar(4) primary key,fname varchar(15),lname varchar(15),DOB date,height varchar(4),weight numeric(3),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table contract(year numeric(1),amount decimal(10,2),p_id varchar(4), foreign key(p_id) references player(p_id))");
db.execute("create table hall_of_fame(year numeric(4),group_h numeric(1),votes numeric(3),p_id varchar(4), foreign key(p_id) references player(p_id))");
db.execute("create table position(p_name varchar(2),p_id varchar(4),foreign key(p_id) references player(p_id))");
db.execute("create table all_star_team(year numeric(4) primary key,team varchar(4),winner varchar(25))");
db.execute("create table voted_for(p_id varchar(4),year numeric(4),primary key(p_id,year),foreign key(p_id) references player(p_id),foreign key(year) references all_star_team(year))");
db.execute("create table sponsor(name varchar(20) primary key,media varchar(20),shoe varchar(20),jersey varchar(20),equipment varchar(20),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table previous_team(prev_team_id varchar(3),t_id varchar(3),p_id varchar(4) primary key,from_p date,to_p date,foreign key(prev_team_id) references team(t_id),foreign key(t_id) references team(t_id),foreign key(p_id) references player(p_id))");
db.execute("create table games(game_id varchar(3) primary key,game_date date,location varchar(30))");
db.execute("create table performances(p_id varchar(4),game_id varchar(3),twos numeric(2),threes numeric(2),fgp decimal(3,1),turnovers numeric(2),fouls numeric(1),primary key(p_id,game_id) ,foreign key(p_id) references player(p_id),foreign key(game_id) references games(game_id))");
db.execute("create table take_part_in(t1_id varchar(3),t2_id varchar(3),game_id varchar(3),primary key(t1_id,t2_id,game_id),foreign key(t1_id) references team(t_id),foreign key(t2_id) references team(t_id),foreign key(game_id) references games(game_id))");
db.execute("create table coach(c_id varchar(3) primary key,fname varchar(10),lname varchar(15),t_id varchar(3),foreign key(t_id) references team(t_id))");
db.execute("create table management(manager varchar(20),physio varchar(20),president varchar(20),coach_fname varchar(10),coach_lname varchar(15),t_id varchar(3),foreign key(t_id) references team(t_id))");


db.execute("insert into team values('Los Angeles Lakers', 'Staples Center (A)', 'w01')");
db.execute("insert into team values('Los Angeles Clippers', 'Staples Center (B)', 'w02')");
db.execute("insert into team values('Houston Rockets', 'Toyota Center', 'w03')");
db.execute("insert into team values('San Antonio Spurs', 'At&t Center', 'w04')");
db.execute("insert into team values('Utah Jazz', 'Energy Solutions Arena', 'w05')");
db.execute("insert into team values('<NAME>', 'Pepsi Center', 'w06')");
db.execute("insert into team values('Golden State Warriors', 'Oracle Arena', 'w07')");
db.execute("insert into team values('Oklahoma City Thunder', 'Arco Arena', 'w08')");
db.execute("insert into team values('Portland Trailblazers', 'Moda Center', 'w09')");
db.execute("insert into team values('Minnesota Timberwolves', 'Target Center', 'w10')");
db.execute("insert into team values('Cleveland Cavaliers', 'Quicken Loans Arena', 'e01')");
db.execute("insert into team values('Boston Celtics', 'TD Center', 'e02')");
db.execute("insert into team values('Miami Heat', 'AA Arena', 'e03')");
db.execute("insert into team values('Orlando Magic', 'Amway Center', 'e04')");
db.execute("insert into team values('Chicago Bulls', 'United Center', 'e05')");
db.execute("insert into team values('Milwaukee Bucks', 'Bradley Center', 'e06')");
db.execute("insert into team values('New York Knicks', 'Madison Square Garden', 'e07')");
db.execute("insert into team values('Indiana Pacers', 'Smoothie Center', 'e08')");
db.execute("insert into team values('Philadelphia 76ers', 'Bell Arena', 'e09')");
db.execute("insert into team values('Detroit Pistons', 'The Palace', 'e10')");

db.execute("insert into player values('p001', 'Kobe', 'Bryant' , '1972-07-19','6`6', 225, 'w01')");
db.execute("insert into player values('p002', 'Derek', 'Fisher' , '1974-06-17','6`3', 205, 'w01')");
db.execute("insert into player values('p003', 'Pau', 'Gasol' , '1970-01-09','7`0', 255, 'w01')");
db.execute("insert into player values('p004', 'Ron', 'Artest' , '1975-01-24','6`7', 235, 'w01')");
db.execute("insert into player values('p005', 'Andrew', 'Bynum' , '1972-09-12','7`0', 260, 'w01')");
db.execute("insert into player values('p006', 'JJ', 'Reddick' , '1967-03-11','6`1', 190, 'w02')");
db.execute("insert into player values('p007', 'Blake', 'Griffin' , '1973-10-17','6`11', 220, 'w02')");
db.execute("insert into player values('p008', 'Chris', 'Paul' , '1982-07-19','6`0', 182, 'w02')");
db.execute("insert into player values('p009', 'Jamal', 'Crawford' , '1986-09-17','6`6', 213, 'w02')");
db.execute("insert into player values('p010', 'Austin', 'Rivers' , '1987-02-20','6`4', 198, 'w02')");
db.execute("insert into player values('p011', 'James', 'Harden' , '1989-07-19','6`6', 207, 'w03')");
db.execute("insert into player values('p012', 'Trevor', 'Ariza' , '1990-02-12','6`6', 231, 'w03')");
db.execute("insert into player values('p013', 'Clint', 'Capella' , '1984-06-16','6`11', 250, 'w03')");
db.execute("insert into player values('p014', 'Aaron', 'Brooks' , '1988-08-18','6`4', 222, 'w03')");
db.execute("insert into player values('p015', 'Metta', 'Peace' , '1991-03-19','6`8', 240, 'w03')");
db.execute("insert into player values('p016', 'Tim', 'Duncan' , '1974-11-23','7`0', 246, 'w04')");
db.execute("insert into player values('p017', 'Manu', 'Ginobili' , '1979-07-24','6`6', 205, 'w04')");
db.execute("insert into player values('p018', 'Matt', 'Bonner' , '1978-07-25','6`9', 232, 'w04')");
db.execute("insert into player values('p019', 'Tony', 'Parker' , '1990-05-16','6`8', 206, 'w04')");
db.execute("insert into player values('p020', 'Kawhi', 'Leonard' , '1985-06-18','6`10', 228, 'w04')");
db.execute("insert into player values('p021', 'John', 'Stockton' , '1965-07-12','6`3', 208, 'w05')");
db.execute("insert into player values('p022', 'Karl', 'Malone' , '1962-02-03','6`10', 258, 'w05')");
db.execute("insert into player values('p023', 'Carlos', 'Boozer' , '1981-12-03','6`11', 248, 'w05')");
db.execute("insert into player values('p024', 'Deron', 'Williams' , '1989-04-11','6`6', 201, 'w05')");
db.execute("insert into player values('p025', 'Gordan', 'Hayward' , '1974-011-12','6`7', 223, 'w05')");
db.execute("insert into player values('p026', 'Lebron', 'James' , '1984-01-13','6`8', 235, 'e01')");
db.execute("insert into player values('p027', 'Kyrie', 'Irving' , '1987-04-07','6`3', 202, 'e01')");
db.execute("insert into player values('p028', 'Kevin', 'Love' , '1985-04-12','6`10', 239, 'e01')");
db.execute("insert into player values('p029', 'JR', 'Smith' , '1983-03-14','6`8', 231, 'e01')");
db.execute("insert into player values('p030', 'Mo', 'Williams' , '1973-06-19','6`2', 192, 'e01')");
db.execute("insert into player values('p031', 'Rajon', 'Rondo' , '1988-08-18','6`4', 197, 'e02')");
db.execute("insert into player values('p032', 'Paul', 'Pierce' , '1971-04-01','6`8', 231, 'e02')");
db.execute("insert into player values('p033', 'Ray', 'Allen' , '1976-01-26','6`6', 228, 'e02')");
db.execute("insert into player values('p034', 'Kevin', 'Garnett' , '1974-12-10','6`11', 249, 'e02')");
db.execute("insert into player values('p035', 'Isaiah', 'Thomas' , '1989-02-07','5`9', 190, 'e02')");
db.execute("insert into player values('p036', 'Lebron', 'James' , '1988-07-31','6`8', 245, 'e03')");
db.execute("insert into player values('p037', 'Dwayne', 'Wade' , '1976-07-18','6`6', 229, 'e03')");
db.execute("insert into player values('p038', 'Chris', 'Bosh' , '1980-06-10','6`11', 251, 'e03')");
db.execute("insert into player values('p039', 'Chris', 'Anderson' , '1980-05-14','6`11', 243, 'e03')");
db.execute("insert into player values('p040', 'Ray', 'Allen' , '1976-01-26','6`6', 228, 'e03')");
db.execute("insert into player values('p041', 'Shaq', 'Oneal' , '1970-03-29','7`1', 275, 'e04')");
db.execute("insert into player values('p042', 'Dwight', 'Howard' , '1987-06-30','6`10', 252, 'e04')");
db.execute("insert into player values('p043', 'Rashard', 'Lewis' , '1986-05-31','6`10', 223, 'e04')");
db.execute("insert into player values('p044', 'Hedo', 'Turkogulu' , '1981-08-25','6`11', 238, 'e04')");
db.execute("insert into player values('p045', 'Chris', 'Leonard' , '1980-07-18','6`4', 214, 'e04')");
db.execute("insert into player values('p046', 'Michael', 'Jordan' , '1962-02-14','6`6', 235, 'e05')");
db.execute("insert into player values('p047', 'Steve', 'Kerr' , '1965-11-21','6`8', 231, 'e05')");
db.execute("insert into player values('p048', 'Ron', 'Harper' , '1968-01-02','6`11', 254, 'e05')");
db.execute("insert into player values('p049', 'Scottie', 'Pippen' , '1967-01-18','6`8', 239, 'e05')");
db.execute("insert into player values('p050', 'Dennis', 'Rodman' , '1965-08-26','6`11', 250, 'e05')");
db.execute("insert into player values('p051', 'Stephen', 'Curry' , '1988-03-14','6`3', 238, 'w07')");
db.execute("insert into player values('p052', 'Kevin', 'Durant' , '1988-09-29','6`9', 258, 'w07')");
db.execute("insert into player values('p053', 'Rasheed', 'Wallace' , '1978-10-29','6`10', 277, 'w07')");
db.execute("insert into player values('p054', 'Courtney', 'Lee' , '1986-08-21','6`11', 272, 'w07')");
db.execute("insert into player values('p055', 'Kendrick', 'Purkins' , '1977-09-29','6`2', 218, 'w07')");
db.execute("insert into player values('p056', 'Gerald', 'Wallace' , '1988-01-30','7`0', 288, 'w06')");
db.execute("insert into player values('p057', 'Kwame', 'Brown' , '1989-11-20','6`6', 234, 'w06')");
db.execute("insert into player values('p058', 'Smush', 'Parker' , '1973-02-27','6`1', 208, 'w06')");
db.execute("insert into player values('p059', 'Hakeem', 'Olijuawan' , '1983-02-26','6`11', 265, 'w06')");
db.execute("insert into player values('p060', 'Oscar', 'Robertson' , '1982-04-07','6`5', 231, 'w06')");
db.execute("insert into player values('p061', 'Kevin', 'Hart' , '1981-02-29','6`0', 192, 'w08')");
db.execute("insert into player values('p062', 'Chris', 'Douglas' , '1983-01-11','6`1', 218, 'w08')");
db.execute("insert into player values('p063', 'Domininic', 'Ngyuen' , '1988-09-19','6`9', 258, 'w08')");
db.execute("insert into player values('p064', 'Jonathan', 'Lam' , '1980-09-23','6`8', 254, 'w08')");
db.execute("insert into player values('p065', 'Jonathan', 'Tran' , '1981-02-23','6`10', 268, 'w08')");
db.execute("insert into player values('p066', 'Chris', 'Murdok' , '1983-02-11','6`0', 201, 'w09')");
db.execute("insert into player values('p067', 'Michael', 'Landis' , '1978-09-21','6`0', 199, 'w09')");
db.execute("insert into player values('p068', 'Jordan', 'Valle' , '1975-10-19','5`9', 186, 'w09')");
db.execute("insert into player values('p069', 'Hugo', 'Durant' , '1987-05-14','6`9', 258, 'w09')");
db.execute("insert into player values('p070', 'Aaron', 'Rodgers' , '1988-01-03','6`2', 208, 'w09')");
db.execute("insert into player values('p071', 'Jordy', 'Nelson' , '1978-12-26','5`11', 195, 'w10')");
db.execute("insert into player values('p072', 'Eddie', 'Lacy' , '1971-11-05','7`1', 298, 'w10')");
db.execute("insert into player values('p073', 'Brook', 'Durant' , '1978-01-02','7`1', 301, 'w10')");
db.execute("insert into player values('p074', 'Akhilesh', 'Nirnayya' , '1985-01-02','6`5', 241, 'w10')");
db.execute("insert into player values('p075', 'Skip', 'Bayless' , '1988-03-18','7`2', 302, 'w10')");
db.execute("insert into player values('p076', 'Stephen', 'Smith' , '1984-09-29','6`9', 255, 'e06')");
db.execute("insert into player values('p077', 'DB', 'Saha' , '1982-09-25','6`0', 202, 'e06')");
db.execute("insert into player values('p078', 'Tom', 'Brady' , '1979-10-19','6`3', 253, 'e06')");
db.execute("insert into player values('p079', 'Sam', 'Wilson' , '1988-11-21','6`1', 231, 'e06')");
db.execute("insert into player values('p080', 'Larry', 'Durant' , '1988-04-24','6`9', 258, 'e06')");
db.execute("insert into player values('p081', 'Russel', 'Wilson' , '1984-03-29','6`9', 245, 'e07')");
db.execute("insert into player values('p082', 'Corey', 'Seager' , '1988-05-23','6`8', 248, 'e07')");
db.execute("insert into player values('p083', 'Orlando', 'Bloo' , '1990-09-19','6`2', 228, 'e07')");
db.execute("insert into player values('p084', 'Mack', 'Douglas' , '1988-05-07','6`4', 219, 'e07')");
db.execute("insert into player values('p085', 'Frank', '<NAME>' , '1987-12-09','6`0', 208, 'e07')");
db.execute("insert into player values('p086', 'Holden', 'Tran' , '1988-02-29','6`9', 257, 'e08')");
db.execute("insert into player values('p087', 'Reggie', 'Miller' , '1988-01-29','6`9', 268, 'e08')");
db.execute("insert into player values('p088', 'Reggie', 'Jackson' , '1988-07-28','6`2', 214, 'e08')");
db.execute("insert into player values('p089', 'Phil', 'Durant' , '1986-06-24','6`3', 228, 'e08')");
db.execute("insert into player values('p090', 'Kevin', 'Jackson' , '1987-06-25','6`4', 238, 'e08')");
db.execute("insert into player values('p091', 'Eddie', 'Douglas' , '1988-09-30','6`3', 221, 'e09')");
db.execute("insert into player values('p092', 'Dominic', 'Brady' , '1988-07-29','6`9', 264, 'e09')");
db.execute("insert into player values('p093', 'Brady', 'Aaaron' , '1985-11-09','7`0', 276, 'e09')");
db.execute("insert into player values('p094', 'Wison', 'Smith' , '1981-06-07','6`11', 275, 'e09')");
db.execute("insert into player values('p095', 'Mikey', 'Douglas' , '1982-03-24','6`5', 246, 'e09')");
db.execute("insert into player values('p096', 'Carl', 'Louis' , '1982-01-20','6`4', 223, 'e10')");
db.execute("insert into player values('p097', 'Jimmy', 'Neutron' , '1983-04-25','6`6', 258, 'e10')");
db.execute("insert into player values('p098', 'Tom', 'Smith' , '1983-04-21','6`3', 220, 'e10')");
db.execute("insert into player values('p099', 'Bob', 'Joe' , '1978-03-13','6`10', 258, 'e10')");
db.execute("insert into player values('p100', 'Matt', 'LeBlanc' , '1983-04-05','6`11', 277, 'e10')");


db.execute("insert into contract values(6,82837194.56, 'p001')");
db.execute("insert into contract values(3,6756142.92, 'p002')");
db.execute("insert into contract values(2,7562980.13, 'p003')");
db.execute("insert into contract values(5,40856194.45, 'p004')");
db.execute("insert into contract values(1,2834164.67, 'p005')");
db.execute("insert into contract values(2,5892143.22, 'p006')");
db.execute("insert into contract values(3,12783547.98, 'p007')");
db.execute("insert into contract values(6,76923123.65, 'p008')");
db.execute("insert into contract values(6,65897122.34, 'p009')");
db.execute("insert into contract values(3,13987652.78, 'p010')");
db.execute("insert into contract values(4,24678234.65, 'p011')");
db.execute("insert into contract values(2,458211.98, 'p012')");
db.execute("insert into contract values(3,12875123.67, 'p013')");
db.execute("insert into contract values(4,24132987.54, 'p014')");
db.execute("insert into contract values(6,60982341.43, 'p015')");
db.execute("insert into contract values(1,3567982.12, 'p016')");
db.execute("insert into contract values(3,13986342.87, 'p017')");
db.execute("insert into contract values(2,3456432.11, 'p018')");
db.execute("insert into contract values(1,1543678.42, 'p019')");
db.execute("insert into contract values(4,28767895.93, 'p020')");
db.execute("insert into contract values(1,1872343.34, 'p021')");
db.execute("insert into contract values(2,6234984.54, 'p022')");
db.execute("insert into contract values(4,3874351.73, 'p023')");
db.execute("insert into contract values(3,2873115.91, 'p024')");
db.execute("insert into contract values(1,3893478.22, 'p025')");
db.execute("insert into contract values(2,12457834.98, 'p026')");
db.execute("insert into contract values(4,28335910.43, 'p027')");
db.execute("insert into contract values(1,2384973.11, 'p028')");
db.execute("insert into contract values(3,21847384.44, 'p029')");
db.execute("insert into contract values(5,50327842.31, 'p030')");
db.execute("insert into contract values(5,45348729.48, 'p031')");
db.execute("insert into contract values(3,28761945.52, 'p032')");
db.execute("insert into contract values(4,38737895.56, 'p033')");
db.execute("insert into contract values(2,18767534.33, 'p034')");
db.execute("insert into contract values(1,6239841.87, 'p035')");
db.execute("insert into contract values(2,15437854.88, 'p036')");
db.execute("insert into contract values(3,30184766.24, 'p037')");
db.execute("insert into contract values(1,8767658.44, 'p038')");
db.execute("insert into contract values(4,29769895.01, 'p039')");
db.execute("insert into contract values(3,28767887.56, 'p040')");
db.execute("insert into contract values(6,72555895.04, 'p041')");
db.execute("insert into contract values(2,16884139.55, 'p042')");
db.execute("insert into contract values(6,60456339.75, 'p043')");
db.execute("insert into contract values(1,2443985.81, 'p044')");
db.execute("insert into contract values(4,29223895.23, 'p045')");
db.execute("insert into contract values(6,92769985.08, 'p046')");
db.execute("insert into contract values(1,2983728.44, 'p047')");
db.execute("insert into contract values(2,16887320.87, 'p048')");
db.execute("insert into contract values(3,24887992.90, 'p049')");
db.execute("insert into contract values(4,36784637.43, 'p050')");
db.execute("insert into contract values(6,82833194.56, 'p051')");
db.execute("insert into contract values(3,6756942.92, 'p052')");
db.execute("insert into contract values(2,7562880.13, 'p053')");
db.execute("insert into contract values(5,40857194.45, 'p054')");
db.execute("insert into contract values(1,2834664.67, 'p055')");
db.execute("insert into contract values(2,5892543.22, 'p056')");
db.execute("insert into contract values(3,12783547.98, 'p057')");
db.execute("insert into contract values(6,76922123.65, 'p058')");
db.execute("insert into contract values(6,65891122.34, 'p059')");
db.execute("insert into contract values(3,13982652.78, 'p060')");
db.execute("insert into contract values(4,24673234.65, 'p061')");
db.execute("insert into contract values(2,458261.98, 'p062')");
db.execute("insert into contract values(3,12876123.67, 'p063')");
db.execute("insert into contract values(4,24135987.54, 'p064')");
db.execute("insert into contract values(6,60984341.43, 'p065')");
db.execute("insert into contract values(1,3567982.12, 'p066')");
db.execute("insert into contract values(3,13981342.87, 'p067')");
db.execute("insert into contract values(2,3456432.11, 'p068')");
db.execute("insert into contract values(1,1543378.42, 'p069')");
db.execute("insert into contract values(4,28767895.93, 'p070')");
db.execute("insert into contract values(1,1872343.34, 'p071')");
db.execute("insert into contract values(2,6234984.54, 'p072')");
db.execute("insert into contract values(4,3874351.73, 'p073')");
db.execute("insert into contract values(3,2873115.91, 'p074')");
db.execute("insert into contract values(1,3893478.22, 'p075')");
db.execute("insert into contract values(2,12457834.98, 'p076')");
db.execute("insert into contract values(4,28335910.43, 'p077')");
db.execute("insert into contract values(1,2384973.11, 'p078')");
db.execute("insert into contract values(5,50337842.31, 'p080')");
db.execute("insert into contract values(5,45328729.48, 'p081')");
db.execute("insert into contract values(3,28713945.52, 'p082')");
db.execute("insert into contract values(4,38757895.56, 'p083')");
db.execute("insert into contract values(2,18737534.33, 'p084')");
db.execute("insert into contract values(1,6237841.87, 'p085')");
db.execute("insert into contract values(2,15432854.88, 'p086')");
db.execute("insert into contract values(3,30124766.24, 'p087')");
db.execute("insert into contract values(1,8267658.44, 'p088')");
db.execute("insert into contract values(4,22769895.01, 'p089')");
db.execute("insert into contract values(3,22767887.56, 'p090')");
db.execute("insert into contract values(6,72155895.04, 'p091')");
db.execute("insert into contract values(2,16864139.55, 'p092')");
db.execute("insert into contract values(6,60476339.75, 'p093')");
db.execute("insert into contract values(1,2448985.81, 'p094')");
db.execute("insert into contract values(4,29293895.23, 'p095')");
db.execute("insert into contract values(6,92719985.08, 'p096')");
db.execute("insert into contract values(1,2982728.44, 'p097')");
db.execute("insert into contract values(2,16837320.87, 'p098')");
db.execute("insert into contract values(3,24857992.90, 'p099')");
db.execute("insert into contract values(4,36764637.43, 'p100')");


db.execute("insert into hall_of_fame values(1996, 2, 648, 'p046')");
db.execute("insert into hall_of_fame values(1996, 2, 211, 'p047')");
db.execute("insert into hall_of_fame values(1997, 1, 315, 'p050')");
db.execute("insert into hall_of_fame values(1998, 1, 367, 'p048')");
db.execute("insert into hall_of_fame values(1999, 3, 312, 'p049')");
db.execute("insert into hall_of_fame values(1999, 3, 293, 'p035')");
db.execute("insert into hall_of_fame values(1999, 3, 215, 'p041')");
db.execute("insert into hall_of_fame values(2000, 1, 196, 'p039')");
db.execute("insert into hall_of_fame values(2001, 2, 204, 'p003')");
db.execute("insert into hall_of_fame values(2001, 2, 209, 'p029')");
db.execute("insert into hall_of_fame values(2002, 1, 394, 'p026')");
db.execute("insert into hall_of_fame values(2003, 1, 495, 'p009')");
db.execute("insert into hall_of_fame values(2004, 2, 531, 'p042')");
db.execute("insert into hall_of_fame values(2004, 2, 458, 'p025')");
db.execute("insert into hall_of_fame values(2005, 1, 286, 'p007')");
db.execute("insert into hall_of_fame values(2006, 3, 476, 'p014')");
db.execute("insert into hall_of_fame values(2006, 3, 541, 'p034')");
db.execute("insert into hall_of_fame values(2006, 3, 477, 'p016')");
db.execute("insert into hall_of_fame values(2007, 2, 593, 'p001')");
db.execute("insert into hall_of_fame values(2007, 2, 308, 'p037')");


db.execute("insert into position values('SG','p001')");
db.execute("insert into position values('PG','p002')");
db.execute("insert into position values('PF','p003')");
db.execute("insert into position values('SF','p004')");
db.execute("insert into position values('C','p005')");
db.execute("insert into position values('SG','p006')");
db.execute("insert into position values('PF','p007')");
db.execute("insert into position values('PG','p008')");
db.execute("insert into position values('SG','p009')");
db.execute("insert into position values('PG','p010')");
db.execute("insert into position values('SG','p011')");
db.execute("insert into position values('SF','p012')");
db.execute("insert into position values('C','p013')");
db.execute("insert into position values('PG','p014')");
db.execute("insert into position values('SF','p015')");
db.execute("insert into position values('PF','p016')");
db.execute("insert into position values('SG','p017')");
db.execute("insert into position values('C','p018')");
db.execute("insert into position values('PG','p019')");
db.execute("insert into position values('SG','p020')");


db.execute("insert into all_star_team values('1997','East','<NAME>')");
db.execute("insert into all_star_team values('1998','West','<NAME>')");
db.execute("insert into all_star_team values('1999','West','Shaq O Neal')");
db.execute("insert into all_star_team values('2000','West','<NAME>')");
db.execute("insert into all_star_team values('2001','West','<NAME>')");
db.execute("insert into all_star_team values('2002','West','<NAME>')");
db.execute("insert into all_star_team values('2003','West','<NAME>')");
db.execute("insert into all_star_team values('2004','West','Shaq O Neal')");
db.execute("insert into all_star_team values('2005','East','<NAME>')");
db.execute("insert into all_star_team values('2006','West','<NAME>')");
db.execute("insert into all_star_team values('2007','East','<NAME>')");
db.execute("insert into all_star_team values('2008','East','<NAME>')");
db.execute("insert into all_star_team values('2009','East','<NAME>')");
db.execute("insert into all_star_team values('2010','West','Kobe Bryant')");
db.execute("insert into all_star_team values('2011','West','<NAME>')");
db.execute("insert into all_star_team values('2012','West','<NAME>')");
db.execute("insert into all_star_team values('2013','East','<NAME>')");
db.execute("insert into all_star_team values('2014','West','<NAME>')");
db.execute("insert into all_star_team values('2015','East','<NAME>')");
db.execute("insert into all_star_team values('2016','West','<NAME>')");
db.execute("insert into all_star_team values('2017','East','<NAME>')");

db.execute("insert into voted_for values('p046','1997')");
db.execute("insert into voted_for values('p046','1998')");
db.execute("insert into voted_for values('p001','1998')");
db.execute("insert into voted_for values('p001','1999')");
db.execute("insert into voted_for values('p001','2000')");
db.execute("insert into voted_for values('p001','2001')");
db.execute("insert into voted_for values('p001','2002')");
db.execute("insert into voted_for values('p001','2003')");
db.execute("insert into voted_for values('p001','2004')");
db.execute("insert into voted_for values('p001','2005')");
db.execute("insert into voted_for values('p001','2006')");
db.execute("insert into voted_for values('p001','2007')");
db.execute("insert into voted_for values('p001','2008')");
db.execute("insert into voted_for values('p001','2009')");
db.execute("insert into voted_for values('p001','2010')");
db.execute("insert into voted_for values('p001','2011')");
db.execute("insert into voted_for values('p001','2012')");
db.execute("insert into voted_for values('p001','2013')");
db.execute("insert into voted_for values('p001','2014')");
db.execute("insert into voted_for values('p001','2015')");
db.execute("insert into voted_for values('p001','2016')");
db.execute("insert into voted_for values('p016','1998')");
db.execute("insert into voted_for values('p016','1999')");
db.execute("insert into voted_for values('p016','2000')");
db.execute("insert into voted_for values('p016','2001')");
db.execute("insert into voted_for values('p016','2002')");
db.execute("insert into voted_for values('p016','2003')");
db.execute("insert into voted_for values('p016','2004')");
db.execute("insert into voted_for values('p016','2005')");
db.execute("insert into voted_for values('p016','2006')");
db.execute("insert into voted_for values('p016','2007')");
db.execute("insert into voted_for values('p016','2008')");
db.execute("insert into voted_for values('p016','2009')");
db.execute("insert into voted_for values('p016','2010')");
db.execute("insert into voted_for values('p016','2011')");
db.execute("insert into voted_for values('p016','2012')");
db.execute("insert into voted_for values('p016','2013')");
db.execute("insert into voted_for values('p016','2014')");
db.execute("insert into voted_for values('p016','2015')");
db.execute("insert into voted_for values('p016','2016')");
db.execute("insert into voted_for values('p020','2017')");
db.execute("insert into voted_for values('p011','2017')");
db.execute("insert into voted_for values('p027','2017')");
db.execute("insert into voted_for values('p028','2017')");
db.execute("insert into voted_for values('p026','2017')");
db.execute("insert into voted_for values('p007','2017')");


db.execute("insert into sponsor values('Nike','Nike Media','Air Jordan','Air Fit','Nike Equipment','e01')");
db.execute("insert into sponsor values('Adidas','Adidas Media','P90x','Clima cool','Adi Train','e02')");
db.execute("insert into sponsor values('Puma','Puma Media','Blaze','Drifit','Puma Tech','e03')");
db.execute("insert into sponsor values('Under Armor','Armor Media','Ziko 20','Body Armor','Pro Tech','e04')");
db.execute("insert into sponsor values('New Balance','Balance Media','Gel Cumulus','Perspire','Balancequip','e05')");
db.execute("insert into sponsor values('Bwin','Bw Media','Nimbus','Clean','Win Training','e06')");
db.execute("insert into sponsor values('Qatar Airlines','Qatar Media','Inferno','Sense','Training Pro','e07')");
db.execute("insert into sponsor values('American Insurance','American Media','Cloud','Dew','TechX','e08')");
db.execute("insert into sponsor values('Slazenger','Slaz Media','Venom','Skin Z','SlazTech','e09')");
db.execute("insert into sponsor values('Bank of America','North Media','Kraken','Layer','American Equipment','e10')");
db.execute("insert into sponsor values('Shell','Shell Media','Power','Boost','Power Tech','w01')");
db.execute("insert into sponsor values('Canondale','CD Media','Hydro','Gravitas','Canon Equipment','w02')");
db.execute("insert into sponsor values('The North Face','Public Face','Float','Levitate','NorTech','w03')");
db.execute("insert into sponsor values('Walmart','Wal Media','Chi','X Touch','Equipment Z','w04')");
db.execute("insert into sponsor values('Target','Target Media','Energy','Mutate','Sense Equip','w05')");
db.execute("insert into sponsor values('Wells Fargo','Fargo Media','Chimera','Spear','Wellness Tech','w06')");
db.execute("insert into sponsor values('Mervyns','Merv Media','Katana','Blade','Merv Tech','w07')");
db.execute("insert into sponsor values('Best Buy','BB Media','Claw','Fang','Health Equipment','w08')");
db.execute("insert into sponsor values('CBS','CBS Media','GenX','Protect X','ProTrain','w09')");
db.execute("insert into sponsor values('KIA','KIA Media','Scimitar','Tyranitar','Train Max','w10')");


db.execute("insert into previous_team values('e03','e01','p001','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e01','e01','p002','2007-11-21','2010-11-21')");
db.execute("insert into previous_team values('e02','e01','p003','2010-11-21','2014-11-21')");
db.execute("insert into previous_team values('e03','w01','p004','2003-11-23','2004-11-21')");
db.execute("insert into previous_team values('e01','w01','p005','2004-11-21','2005-11-21')");
db.execute("insert into previous_team values('e05','w01','p006','2005-11-21','2015-11-21')");
db.execute("insert into previous_team values('w01','w01','p007','2015-11-21','2016-11-21')");
db.execute("insert into previous_team values('e03','w01','p008','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e01','w01','p009','2007-11-21','2008-11-21')");
db.execute("insert into previous_team values('w05','w01','p010','2008-11-21','2014-11-21')");
db.execute("insert into previous_team values('e07','w01','p011','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e02','w01','p012','2007-11-21','2008-11-21')");
db.execute("insert into previous_team values('e05','w01','p013','2008-11-21','2009-11-21')");
db.execute("insert into previous_team values('w03','w01','p014','2009-11-21','2010-11-21')");
db.execute("insert into previous_team values('w07','w05','p015','2001-11-21','2003-11-21')");
db.execute("insert into previous_team values('e04','w05','p016','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e05','w05','p017','2007-11-21','2013-11-21')");
db.execute("insert into previous_team values('w01','w05','p018','2013-11-21','2015-11-21')");
db.execute("insert into previous_team values('e01','w05','p019','2003-11-21','2007-11-21')");
db.execute("insert into previous_team values('e03','e05','p037','2003-11-21','2016-11-21')");


db.execute("insert into games values('g01','2016-03-16','At&t Center')");
db.execute("insert into games values('g02','2016-03-21','Oracle Arena')");
db.execute("insert into games values('g03','2016-04-07','Quicken Loans Arena')");
db.execute("insert into games values('g04','2016-04-19','Staples Center (A)')");
db.execute("insert into games values('g05','2016-05-23','Staples Center (B)')");
db.execute("insert into games values('g06','2016-05-27','Toyota Center')");
db.execute("insert into games values('g07','2016-06-12','Amway Center')");
db.execute("insert into games values('g08','2016-06-17','United Center')");
db.execute("insert into games values('g09','2016-07-01','Energy Solutions Arena')");
db.execute("insert into games values('g10','2016-07-31','Quicken Loans Arena')");
db.execute("insert into games values('g11','2016-08-22','United Center')");
db.execute("insert into games values('g12','2016-08-29','United Center')");
db.execute("insert into games values('g13','2016-09-08','Oracle Arena')");
db.execute("insert into games values('g14','2016-09-29','At&t Center')");
db.execute("insert into games values('g15','2016-10-16','Staples Center (B)')");
db.execute("insert into games values('g16','2016-10-24','TD Center')");
db.execute("insert into games values('g17','2016-11-04','United Center')");
db.execute("insert into games values('g18','2016-11-14','TD Center')");
db.execute("insert into games values('g19','2016-12-20','Staples Center (A)')");
db.execute("insert into games values('g20','2016-12-25','Toyota Center')");


db.execute("insert into performances values('p020','g01',12,9,55.3,7,3)");
db.execute("insert into performances values('p016','g01',14,4,79.7,9,5)");
db.execute("insert into performances values('p051','g01',6,8,67.2,3,0)");
db.execute("insert into performances values('p052','g01',9,7,71.4,4,1)");
db.execute("insert into performances values('p051','g02',7,10,68.6,5,1)");
db.execute("insert into performances values('p052','g02',10,7,53.9,4,2)");
db.execute("insert into performances values('p026','g02',12,6,75.2,7,1)");
db.execute("insert into performances values('p027','g02',11,8,57.9,6,1)");
db.execute("insert into performances values('p027','g03',8,5,69.6,6,4)");
db.execute("insert into performances values('p026','g03',6,4,51.4,5,6)");
db.execute("insert into performances values('p020','g04',9,10,63.8,9,2)");
db.execute("insert into performances values('p008','g05',13,9,72.7,6,1)");
db.execute("insert into performances values('p035','g06',14,6,78.1,4,5)");
db.execute("insert into performances values('p011','g07',12,5,60.0,8,3)");
db.execute("insert into performances values('p046','g08',8,10,64.6,5,1)");
db.execute("insert into performances values('p001','g09',6,9,59.2,7,6)");
db.execute("insert into performances values('p051','g10',7,4,65.6,8,4)");
db.execute("insert into performances values('p046','g11',10,7,53.6,9,2)");
db.execute("insert into performances values('p049','g12',9,5,76.1,4,6)");
db.execute("insert into performances values('p011','g13',14,6,68.8,4,5)");


db.execute("insert into take_part_in values('w07','w04','g01')");
db.execute("insert into take_part_in values('e01','w07','g02')");
db.execute("insert into take_part_in values('w01','e01','g03')");
db.execute("insert into take_part_in values('w04','w01','g04')");
db.execute("insert into take_part_in values('e03','w02','g05')");
db.execute("insert into take_part_in values('e02','w03','g06')");
db.execute("insert into take_part_in values('w03','e04','g07')");
db.execute("insert into take_part_in values('e04','e05','g08')");
db.execute("insert into take_part_in values('w01','w05','g09')");
db.execute("insert into take_part_in values('w07','e03','g10')");
db.execute("insert into take_part_in values('w01','e05','g11')");
db.execute("insert into take_part_in values('e03','e05','g12')");
db.execute("insert into take_part_in values('w03','w07','g13')");
db.execute("insert into take_part_in values('e03','w04','g14')");
db.execute("insert into take_part_in values('e01','w02','g15')");
db.execute("insert into take_part_in values('w03','e02','g16')");
db.execute("insert into take_part_in values('w07','e05','g17')");
db.execute("insert into take_part_in values('e04','e02','g18')");
db.execute("insert into take_part_in values('e05','w01','g19')");
db.execute("insert into take_part_in values('e01','w03','g20')");


db.execute("insert into coach values('c01','Tyronn','Lue','e01')");
db.execute("insert into coach values('c02','Brad','Stevens','e02')");
db.execute("insert into coach values('c03','Eric','Spoelstra','e03')");
db.execute("insert into coach values('c04','Frank','Vogel','e04')");
db.execute("insert into coach values('c05','Fred','Hoiberg','e05')");
db.execute("insert into coach values('c06','Jason','Kidd','e06')");
db.execute("insert into coach values('c07','Jeff','Hornacek','e07')");
db.execute("insert into coach values('c08','Nate','McMillan','e08')");
db.execute("insert into coach values('c09','Brett','Brown','e09')");
db.execute("insert into coach values('c10','Stan','<NAME>','e10')");
db.execute("insert into coach values('c11','Luke','Walton','w01')");
db.execute("insert into coach values('c12','Doc','Rivers','w02')");
db.execute("insert into coach values('c13','Mike','D`Antoni','w03')");
db.execute("insert into coach values('c14','Gregg','Popovich','w04')");
db.execute("insert into coach values('c15','Quin','Snyder','w05')");
db.execute("insert into coach values('c16','Michael','Malone','w06')");
db.execute("insert into coach values('c17','Steve','Kerr','w07')");
db.execute("insert into coach values('c18','Billy','Donovan','w08')");
db.execute("insert into coach values('c19','Terry','Stotts','w09')");
db.execute("insert into coach values('c20','Tom','Thibodeau','w10')");


db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Luke','Walton','w01')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Doc','Rivers', 'w02')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Mike' ,'D`Antoni', 'w03')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Gregg','Popovich', 'w04')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Quin','Snyder' , 'w05')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Michael' ,'Malone' , 'w06')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Steve','Kerr', 'w07')");
db.execute("insert into management values('<NAME>','K.Larry','<NAME>','Billy' ,'Donovan', 'w08')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Terry','Stotts', 'w09')");
db.execute("insert into management values('<NAME>','T.Lewis','<NAME>','Tom' ,'Thibodeau' , 'w10')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>' ,'Tyronn' ,'Lue', 'e01')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>', 'Brad' ,'Stevens','e02')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Erik' ,'Spoelstra' , 'e03')");
db.execute("insert into management values('<NAME>','S.Judy','<NAME>','Frank','Vogel' , 'e04')");
db.execute("insert into management values('<NAME>','L.Brown','<NAME>' ,'Fred','Hoiberg', 'e05')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Jason', 'Kidd' , 'e06')");
db.execute("insert into management values('<NAME>','<NAME>.','<NAME>','Jeff', 'Hornacek', 'e07')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Nate','McMillan','e08')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Brett' ,'Brown', 'e09')");
db.execute("insert into management values('<NAME>','<NAME>','<NAME>','Stan','<NAME>', 'e10')");


db.commit()
