JJDaNiMoTh wrote:
Hello to all.
I'm writing an example databe structure for pacman db ( may be useful when someone decide to use SQLite as backend, and not simple text file). [1]
Tell me your impression, if something can be made, revisioned or deleted. Views isn't complete, because I need some data stored in the db to test it; and, of course, I'm writing a simple script that parse all packages information stored under /var/lib/pacman to this db schemas ( if anyone wants help, it's welcome :D )
Thanks
[1] http://rafb.net/p/XxK62l68.html (Version 0.01)
------------------------------------------------------------------------
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://archlinux.org/mailman/listinfo/pacman-dev
What's a text data type in SQLite? char or varchar? The text field sizes should match the current database schema[1]. I would put name.repository in a separate table (like group). description.id_{replaces,conflicts,provides} only allows for a one-to-one relationship, I can think of several packages (e.g. kernel26) that replace/conflict/provide multiple packages. I would replace those 3 fields with a table similar to depends, with the fields id, type, id_name, id_dep. type would be an integer representing the type of dependence e.g. 0 = replace, 1 = conflict, 2 = provide. I would combine the name and description tables. I don't think splitting them provides much benefit, it only adds more complexity to the SQL statements. (I've never used SQLite before so there could be benefits I'm unaware of) What do depends.{major,same} mean? [1] http://projects.archlinux.org/git/?p=pacman.git;a=blob;f=lib/libalpm/package... Andrew