Skip to content

Instantly share code, notes, and snippets.

@rightfold
Last active August 29, 2015 14:06
Show Gist options
  • Save rightfold/6b42a35ecd9228c2bb38 to your computer and use it in GitHub Desktop.
Save rightfold/6b42a35ecd9228c2bb38 to your computer and use it in GitHub Desktop.
create table addresses (
id serial primary key
);
create table street_addresses (
id integer primary key references addresses(id),
postal_code text not null,
street text not null
-- etcetera
);
create table po_box_addresses (
id integer primary key references addresses(id),
postal_code text not null,
po_box_number text not null
-- etcetera
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment