Created
June 18, 2024 15:19
-
-
Save Gemechis10/aa0759971eb8fe88d169df91fdc6e970 to your computer and use it in GitHub Desktop.
databases-week2-exercises.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
team table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CREATE TABLE TEaM (
name CHAR(15),
country TEXT,
PRIMARY KEY (name)
);
CREATE TABLE car (
weight INTEGER,
carnumber TEXT NOT NULL,
maxspeed INTEGER
);
CREATE TABLE pilot (
birthdate INTEGER,
country TEXT NOT NULL,
name CHAR(15)
);
CREATE TABLE participation (
startposition TEXT NOT NULL,
finalposition TEXT NOT NULL
);
CREATE TABLE race (
date DATE,
numberOfLaps INTEGER
);
CREATE TABLE circuit (
city TEXT NOT NULL,
country TEXT NOT NULL,
distance INTEGER
);