-- Import the synthetic database for CSE 444 project 3.

-- This script assumes the data for table X is in the file tableX.txt .
-- If that is not true, feel free to modify the script in the appropriate places.

-- Note that Postgres automatically creates indices on primary key columns.
-- The existence of the index affects a few of the queries in the test query set.

CREATE TABLE R (
	K int primary key,
	A int,
	B int,
	C int,
	E varchar (750)
);
\copy R from 'tableR.txt'

CREATE TABLE T (
	K int primary key,
	D int,
	E int
);
\copy T from 'tableT.txt'

CREATE TABLE S (
	K int primary key,
	A int,
	B int references T,
	C int
);
\copy S from 'tableS.txt'

CREATE TABLE U (
	K int primary key,
	A int,
	B int
);
\copy U from 'tableU.txt'

