[XML-SIG] xml vs. sql
Martin v. Loewis
martin@v.loewis.de
Tue, 8 Jan 2002 00:03:25 +0100
> I'm considering building a data-centric website using xml instead of the
> usual SQL database. I expect the site will receive about 1000 hits per
> day. There will never be more than a couple thousand records in the
> data. I'm planning on using Apache, mod_python and Python's minidom.
If you are looking into a Python implementation, I recommend to use
pickle/cPickle over XML. If desired, you can still offer XML
import/export.
> The benefits of doing without the database are:
> 1. the data will be highly portable
If, by that, you mean "across operating systems and software
versions", then this will be about pickles as well.
> 2. the data will not be subject to corruption
Depends on how you operate on them. It is certainly possible to
truncate or otherwise garble XML files.
> 3. no need for DB admin
The same would be true for pickles.
> Potential downsides:
> 1. Slow processing under load
pickles likely load much faster than XML is being parsed.
> Any thing else I need to consider?
Complexity of the source code. An XML application will be many more
lines than using pickles.
> Anyone care to share past experiences doing the same?
mailman uses pickles for its databases, and I believe many other tools
do as well. 4Suite offers pickle support for all their DOM
implementations.
Regards,
Martin