1CREATE TABLE so_items (
2 so_id INTEGER,
3 ...
4 FOREIGN KEY (so_id) REFERENCES so_headers (id)
5);
1# id_user is the primary key of the table users:
2create table lists(
3id_list serial not null primary key,
4id_user int references users(id_user),
5is_temp int
6);