[DB-SIG] a simple question on rdbms and berkeley db

Magnus Lyckå magnus at thinkware.se
Mon May 5 23:45:23 EDT 2003


At Mon, 5 May 2003 15:36:56 +0800, ali wrote:
>my question is, what is the difference between rdbms and berkeley db or even
>gdb and others of the same genre???

The berkeley db, gdb etc are basically just persistent dictionaries.
You use them as a normal dictionary, but you are restricted to using
strings (I think) for both key and data. I contrast to a dictionary,
their content is stored in files.

In other words, each database file is like a plain table with one
simple key that the rows are indexed on.

So, single item updates, inserts and deletes are trivial dictionary
operations, but aggregarions, queries or multi row updates that are
more complex than "select * where primary_key = ?" have to be done by
looping through all the elements in the python code, and modifying
them as ordinary pyhon data.

>another question, in my simple web-based message board?? what database is
>the most appropriate??

Only you can say...

If you have something working with an SQL database already, why switch?
If you want a simpler database than Firebird and don't need simultaneous
multiple users etc, maybe something that needs no separate server process,
consider sqlite, which uses a fair subset of SQL, but will run embedded in
you python process.


--
Magnus Lycka (It's really Lyckå), magnus at thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The shortest path from thought to working program 




More information about the DB-SIG mailing list