-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks.
I was considering creating a table for each package identified as category/grp/class/package/version and storing dependencies and files in there; but I decided not to cerate thousands of tables :) I'm still examining the idea, it may be useful. Interesting, dependencies(/conflicts) in their own table. Christian Smith wrote: > On Sat, 8 Jan 2005, John Richard Moser wrote: > > >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>What can be in an SQL table? >> >>Can tables contain tables? I want to be able to search for a given >>package and find what files are in it, search for a file and find what >>packages supply it. . . what's the best way to do this? > > > > We did a package management tool using SQLite. We used a schema similar to > the following: > > create table packages ( > package text primary key, > version text > ); > > create table files ( > file text primary key, > package text, > md5 text > ); > > create table dependencies ( > package text, > depends text, > details text -- Optional minimum version > ); > > > This schema is sufficient to implement packages with files and > dependencies. The set of files in all installed packages must be disjoint, > a desirable property. > > You can then get the owner of a file using: > SELECT file, package FROM files > WHERE file = '<some file>'; > > Christian > - -- All content of all messages exchanged herein are left in the Public Domain, unless otherwise explicitly stated. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFB52xdhDd4aOud5P8RArewAJ9uGPSBSoL1QDq4rfAC178YTnkFxACgingP Lwu1pLig3j374n6oTeOigvY= =eSdM -----END PGP SIGNATURE-----