sqlite or xml

Paul Boddie paul at boddie.org.uk
Fri Dec 7 08:19:35 EST 2007


On 7 Des, 09:31, Kelie <kf9... at gmail.com> wrote:
>
> Ah, now you're making it hard for me to decide again. :-) Talking
> about comfortable, I do like Amara XML toolkit a lot. But I'll stick
> with sqlite in this case.

As a user of unfashionable XML technologies *and* relational database
systems, I'd also recommend that you stick with whatever is more
convenient: a couple of thousand records is not a big database, even
for sqlite, and you could probably load the data into a DOM on modern
hardware (although not necessarily a Web browser DOM, but that's
another topic). The main differentiator is likely to be the
convenience of querying and making edits, especially if the latter is
of any interest, with efficiency only making an appearance if you're
doing intensive or sophisticated queries (as opposed to infrequent
"one off" queries). Indeed, if you're likely to be changing the data,
the relational database approach starts to look more attractive
because you won't need to play around with whichever document
structure that your XML library employs, although updating large parts
of a hierarchy through some DOM-like API can be easier than a plain
SQL-based relational approach.

Some people might recommend sqlite plus an object-relational mapper,
but leaving my own skepticism for object-relational mappers to one
side, if you're tempted to combine the two, I'd argue that sticking
with XML would probably be sufficient in this situation. I suppose
that XML databases are meant to be the ultimate hybrid of object-
oriented data manipulation and efficient access to the data (indexing
and so on), but I can't comment on their merits personally.

Paul



More information about the Python-list mailing list