Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE gebruikers (
- id INTEGER NOT NULL PRIMARY KEY,
- naam VARCHAR(40) NOT NULL UNIQUE,
- geboortedatum DATE NOT NULL CHECK(EXTRACT(YEAR FROM geboortedatum) >= 1950)
- );
- CREATE TABLE topics(
- id INTEGER NOT NULL PRIMARY KEY,
- gebruiker INTEGER NOT NULL,
- titel VARCHAR(50) NOT NULL,
- topic text NOT NULL,
- geplaatstOp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY(gebruiker) REFERENCES gebruikers(id)
- ON UPDATE cascade
- ON DELETE RESTRICT
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement