2012/3/4 Christoph P.U. Kukulies <k...@kukulies.org>: >> CREATE TABLE dir(filename text, md5sum text, size int, content blob, >> PRIMARY KEY(filename,md5sum,size)); > > Coming back to your suggestion using PRIMARY KEY(filename,md5sum,size), how > would I address this PRIMARY KEY, example: > > I'm building a table > CREATE TABLE candidate (?,client TEXT, md5sum TEXT, basename TEXT, size INT, > ...some other stuff ) > The ? should stand for the - is that FOREIGN KEY? - key in the dir-TABLE > which is formed of filename,md5sum,size. > Christoph
Foreign key is (basename,md5sum,size). Your example shows that a composite key in this case is possible, but it is not appropriate. Use simple key md5sum. Make two tables. Attribute "size" (part of primary key) is redundant. -- Kit _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users