create table datavalues (
id serial primary key,
value text -- json or any suitable type
);
create table manydata (
id bigserial primary key,
value_id int,
inserted_at timestamp with time zone default current_timestamp,
updated_at timestamp,
foreign key (value_id) references datavalues(id)
);
create index on manydata(value_id);