2012/3/3 Christoph P.U. Kukulies <k...@kukulies.org>: > I'm building a unique ID made up from the basename, md5sum and > size of the file. This results > as a TEXT PRIMARY KEY (e.g. filename_md5sum_size). > Can I use (I'm using System.Data.SQLite) a try clause to find out whether > the entry is already there? > > I think this can be faster than asking the database by an SQL statement, > whether the KEY is already there. > Christoph
Normalize. One cell, one atomic information. You may use md5sum as "text primary key" or you may define PRIMARY KEY(filename,md5sum,size). Filename, version, date and size put to another table with md5sum as a foreign key. Inspire with Git system or use it. -- Kit _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users