 create index groups_name_idx on groups(name);
 
 create table group_files (
+    id integer primary key,
     group_id integer references groups(id) not null,
     file_id integer references files(id) not null
 );

-- Associate key/value data with an individual file.  It is possible for a
-- single file to have many different key/value data pieces, or none.
create table file_key_values (
    file_id integer references files(id) not null,
    key_val_id integer references key_val(id) not null
);

-- Associate key/value data with an individual source.  It is possible for a
-- single source to have many different key/value data pieces, or none.
create table source_key_values (
    id integer primary key,
    source_id integer references sources(id) not null,
    key_val_id integer references key_val(id) not null
);
