
CREATE TABLE race (
	"Race_ID" INTEGER, 
	"Name" TEXT, 
	"Class" TEXT, 
	"Date" TEXT, 
	"Track_ID" TEXT, 
	PRIMARY KEY ("Race_ID"), 
	FOREIGN KEY("Track_ID") REFERENCES track ("Track_ID")
)


CREATE TABLE track (
	"Track_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"Seating" REAL, 
	"Year_Opened" REAL, 
	PRIMARY KEY ("Track_ID")
)

CREATE TABLE race (
	"Race_ID" INTEGER, 
	"Name" TEXT, 
	"Class" TEXT, 
	"Date" TEXT, 
	"Track_ID" TEXT, 
	PRIMARY KEY ("Race_ID"), 
	FOREIGN KEY("Track_ID") REFERENCES track ("Track_ID")
)

/*
2 rows from race table:
Race_ID	Name	Class	Date	Track_ID
1	Rolex 24 At Daytona	DP/GT	January 26 January 27	1
2	Gainsco Grand Prix of Miami	DP/GT	March 29	2
*/


CREATE TABLE track (
	"Track_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"Seating" REAL, 
	"Year_Opened" REAL, 
	PRIMARY KEY ("Track_ID")
)

/*
2 rows from track table:
Track_ID	Name	Location	Seating	Year_Opened
1	Auto Club Speedway	Fontana, CA	92000.0	1997.0
2	Chicagoland Speedway	Joliet, IL	75000.0	2001.0
*/
Show name, class, and date for all races.
SELECT name ,  CLASS ,  date FROM race
[{'Name': 'Rolex 24 At Daytona', 'Class': 'DP/GT', 'Date': 'January 26 January 27'}, {'Name': 'Gainsco Grand Prix of Miami', 'Class': 'DP/GT', 'Date': 'March 29'}, {'Name': 'Mexico City 250', 'Class': 'DP/GT', 'Date': 'April 19'}, {'Name': 'Bosch Engineering 250 at VIR', 'Class': 'GT', 'Date': 'April 27'}, {'Name': 'RumBum.com 250', 'Class': 'DP/GT', 'Date': 'May 17'}, {'Name': 'Lime Rock GT Classic 250', 'Class': 'GT', 'Date': 'May 26'}, {'Name': "Sahlen's Six Hours of the Glen", 'Class': 'DP/GT', 'Date': 'June 7'}]