Yurttas/PL/DBL/postgres/F/01/Movies/StarsIn-cre.sql

 1/*
 2REM
 3REM
 4REM StarsIn-cre.sql
 5REM
 6REM
 7*/
 8
 9SELECT current_schema();
10SET search_path to "movies";
11
12CREATE TABLE StarsIn(title VARCHAR(24) NOT NULL,
13                     year INTEGER NOT NULL,
14                     name VARCHAR(24) NOT NULL,
15         PRIMARY KEY(title, year, name),
16         FOREIGN KEY(title, year) REFERENCES Movie(title, year),
17         FOREIGN KEY(name) REFERENCES MovieStar(name));