Created
January 29, 2010 20:25
-
-
Save hinrik/290089 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 info ( | |
attribute TEXT NOT NULL UNIQUE PRIMARY KEY, | |
text TEXT NOT NULL | |
); | |
CREATE TABLE expr ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
text TEXT UNIQUE, | |
); | |
CREATE TABLE link ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
expr_id_prev INTEGER NOT NULL REFERENCES expr (id), | |
expr_id_next INTEGER NOT NULL REFERENCES expr (id), | |
weight INTEGER NOT NULL | |
); | |
CREATE INDEX link_prev ON link (expr_id_prev); | |
CREATE INDEX link_next ON link (expr_id_next); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment