Enter a query, then click the execute button or press F9 to run
it.
CREATE TABLE contacts ( contact_id integer PRIMARY KEY, first_name text NOT NULL, last_name text NOT NULL, email text NOT NULL UNIQUE, phone text NOT NULL UNIQUE );
CREATE TABLE groups ( group_id integer PRIMARY KEY, name text NOT NULL );
CREATE TABLE contact_groups ( contact_id integer, group_id integer, PRIMARY KEY (contact_id, group_id), FOREIGN KEY (contact_id) REFERENCES contacts (contact_id) ON DELETE CASCADE ON UPDATE NO ACTION, FOREIGN KEY ([ group_id ]) REFERENCES groups (group_id) ON DELETE CASCADE ON UPDATE NO ACTION );