views:

445

answers:

1

Actual Question:

As the title implies, I am having confusion in choosing a better embedded RDBMS for a simple website, only few pages need some server side scripting language otherwise all HTML. I have already chosen Python for that, now could you folks recommend me which embedded database system I should use.

The requirement goes like, I need to query a table or two - not sure at the moment - which will, possibly, be having columns like date, content, title, etc. That table/s are meant to provide the data of news and news archive.

I am more inclined towards ThinkSQL or aSQL. But I am open to any other better, in terms of <you define>. I am more concerned about performance, ease of use, capability to make sub-queries and joins if needed, date datatype support etc.

Not very much relevant information:

I am an expereinced Java programmer, but don't think Java would be the most suitable language here. After adequate research I found that most of the hosting services are providing Python, and PHP support. And I am not familiar with either. Being Python biased I chose Python over PHP. There are few other reasons as well but that might sound stupid because I am not an experience developer in any of these.

I hope it will give you enough insight to make a recommendation.

+11  A: 

I think you're looking for SQLite. Support is built-in to Python, so you're set.

musicfreak
Python wiki says, "If you want to use other types like DATE and TIME in pysqlite, you need to use its "pysqlite types mode", where things can get a little nastier". And its making me worried. :)
Adeel Ansari
SQLite is, well, light, so it only supports the basic data types. If you want stuff like that you'll have to do it on the Python-side.
musicfreak
http://wiki.python.org/moin/SQLite .... Although I can see that its very widely used database. And please elaborate a bit how its superior - besides being the most widely used - to aSQL, or ThinkSQL?
Adeel Ansari
I second the SQLite recommendation -- while it holds all data as strings, there's nothing "nasty" about type adaptation (it follows PEP 246, which I co-wrote, so of course I'm biased;-). Just follow http://docs.python.org/library/sqlite3.html#sqlite3-types (and note that date and datetime are supported by default).
Alex Martelli
@Vinegar: It's fast. It's light. ;)
musicfreak
No but seriously, it probably isn't superior to aSQL or ThinkSQL (I don't know, I've never used either). But it's widely accepted as THE embedded RDBMS for Python (and Ruby, too). Why? Because it's fast, it has a low memory footprint, and it does its job.
musicfreak
Ah, fair enough. Nonetheless, I would like to wait for few more responses. Hoping someone, having experience with aSQL or ThinkSQL, might come up. +1
Adeel Ansari
Found out that aSQL is slow at the moment - 100 to 1000 times - they say it themselves. Whereas, ThinkSQL seems commercial. So, SQLite is the way to go, I guess. Thanks for your inputs.
Adeel Ansari
+1 SQlite3, works for me in both my Django projects and Delphi! i guess its pretty good and thats why firefox3 uses it too.
gath
In addition to the technical features folks have mentioned, SQLite has the most flexible open-source license of all: public domain!
Bill Karwin