Skip to content

Instantly share code, notes, and snippets.

@Merce0897
Created December 18, 2022 08:08
Show Gist options
  • Save Merce0897/4e5254b16441bbe155d92ce833a5bb9d to your computer and use it in GitHub Desktop.
Save Merce0897/4e5254b16441bbe155d92ce833a5bb9d to your computer and use it in GitHub Desktop.
CREATE TABLE driver(
driver_id INTEGER,
country TEXT NOT NULL,
zip_code TEXT NOT NULL,
PRIMARY KEY(driver_id)
);
CREATE TABLE car(
car_id INTEGER,
brand TEXT NOT NULL,
model TEXT NOT NULL,
year INTEGER NOT NULL,
driver_id INTEGER NOT NULL,
PRIMARY KEY(car_id),
FOREIGN KEY(driver_id) REFERENCES driver(driver_id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment