Last active
December 16, 2015 11:18
-
-
Save nazarov-yuriy/5426154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table SOMEPROJECT_USERS( | |
ID int not null auto_increment, | |
NAME varchar(32), | |
primary key (ID), | |
key (NAME) | |
); | |
create table SOMEPROJECT_SHARES( | |
ID int not null auto_increment, | |
NAME varchar(32), | |
primary key (ID), | |
key (NAME) | |
); | |
create table SOMEPROJECT_LINKS( | |
USER_ID int not null, | |
SHARE_ID int not null, | |
primary key (USER_ID, SHARE_ID), | |
constraint FK_LINKS_TO_USERS foreign key (USER_ID) references SOMEPROJECT_USERS(ID), | |
constraint FK_LINKS_TO_SHARES foreign key (SHARE_ID) references SOMEPROJECT_SHARES(ID) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment