Skip to content

Instantly share code, notes, and snippets.

@jagregory
Created July 27, 2010 21:53
Show Gist options
  • Save jagregory/492946 to your computer and use it in GitHub Desktop.
Save jagregory/492946 to your computer and use it in GitHub Desktop.
MANY-TO-MANY
create table Left (
Id integer
Name TEXT
)
create table LeftRights (
LeftId INTEGER not null,
Key TEXT not null,
RightId INTEGER not null,
)
create table Right (
Id integer
Name TEXT
)
ONE-TO-MANY
create table Left (
Id integer,
Name TEXT
)
create table Right (
Id integer,
Name TEXT,
Key TEXT,
LeftId INTEGER,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment