Sunday, February 28, 2010

SQLITE 3.6.22 + Ubuntu



If your need to upgrade to SQLite 3.6.22 I recommend you to get it here: http://www.sqlite.org/sqlite-amalgamation-3.6.22.tar.gz untar it then ./configure and make that's all.

One of the most important improvements on this version is that allows you to use more than one foreign key in a table. Eg:

Instead of:

CREATE TABLE authorISBN (
authorID INTEGER PRIMARY KEY NOT NULL,
isbn varchar (20) NOT NULL,
fk_authorID INTEGER NOT NULL,
fk_isbn varchar (20) NOT NULL,
FOREIGN KEY (fk_authorID) REFERENCES authors (authorID),
FOREIGN KEY (fk_isbn) REFERENCES titles (isbn)
);

You can write:

CREATE TABLE authorISBN (
authorID INTEGER PRIMARY KEY NOT NULL,
isbn varchar (20) NOT NULL,
FOREIGN KEY (authorID) REFERENCES authors (authorID),
FOREIGN KEY (isbn) REFERENCES titles (isbn)
);

No comments:

Post a Comment

Stats


View My Stats

Contributors