Skip to content

Instantly share code, notes, and snippets.

@Gemechis10
Created June 18, 2024 15:19
Show Gist options
  • Save Gemechis10/aa0759971eb8fe88d169df91fdc6e970 to your computer and use it in GitHub Desktop.
Save Gemechis10/aa0759971eb8fe88d169df91fdc6e970 to your computer and use it in GitHub Desktop.
databases-week2-exercises.sql
@Gemechis10
Copy link
Author

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
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment