CREATE TABLE user ( id SERIAL PRIMRAY KEY, username VARCHAR(200) UNIQUE, password VARCHAR(200), locked BOOLEAN DEFAULT 1, email VARCHAR(200) ); CREATE TABLE group ( id SERIAL PRIMARY KEY, groupname VARCHAR(24) UNIQUE, description VARCHAR(200) ); CREATE TABLE user_group ( user_id INTEGER REFERENCES user(id), group_id INTEGER REFERENCES group(id), PRIMARY KEY(user_id, group_id) );