CREATE SEQUENCE seq_test START 1;

CREATE TABLE tbl_test (
  key            integer PRIMARY KEY,                             -- primary key
  personid       integer NOT NULL REFERENCES tbl_person(key),     -- person foreign key
  gametypeid     integer NOT NULL REFERENCES const_gametype(key)  -- gametype foreign key
);