[pacman-dev] Hypotetic pacman's db structure (SQL)

tardo tardo at nagi-fanboi.net
Fri Nov 9 14:39:42 EST 2007


Aaron Griffin wrote:
> On Nov 9, 2007 10:26 AM, JJDaNiMoTh <jjdanimoth at gmail.com> wrote:
>> may be useful when someone decide to use SQLite as backend, and not
>> simple text file
>
> Ugh. I don't want to do this, personally. You're welcome to submit
> patches, but it's such a bad idea.
>
> Why do people like sqlite for this? BDB is probably a much better
> solution, for the record. A solution is not good simply because it
> supports SQL syntax.
>

Well you seem to be changing your mind quite often here. You first said
you hated SQLite, then said it might be somewhat decent... But that
doesn't matter anyway. I prefer SQLite over BDB because I know SQL and
it's relatively easy to use. Plus, anyone can access the sqlite db without
needing to use pacman's API (should it be integrated). On the other hand,
BDB has an unusual license clause (check the wikipedia entry for BDB)
which may or may not go well with pacman.

On to the actual SQL part: I'm impressed. Many people talk about wanting
to do it, yet few come up with a good DB. Here are my comments:

1. What is the point of the table "groups"? Seems awfully redundant to me.
2. Some of the columns I don't get. What is depends.{major,same}? Can you
provide an example?
3. Have you thought about indexing? I strongly suggest indexing
name.{name,desc} at least.
4. AUR uses somewhat of a similar table for depends. Is there a better way
to do this? (I can't think of any, but there has to be!)

Great job on coming up with a schema! As soon as I graduate, I plan on
hacking pacman for sqlite support...

- tardo





More information about the pacman-dev mailing list