Databases: Which one's right for me?

M

Marc

Hi all,

Having never used a database before and immersing myself in reading
stuff about databases over the last two days I have come to this
conclusion, I still don't know which one I need. I've been using
Python for a while, storing things that I'll need later in files. I am
now looking for a better solution; ergo the need for a database.

Basically I need a db that will travel with my executable script and
faithfully store and edit the data needed in that script. People using
this script will need to be stand alone users. Having a client/server
arrangement is not possible over a network.

Also, installing some type of db engine outside of Python is also not
possible. This rules out installing such readily available databases
as mySQL or any other type of db that must have a separate install.
Everything must be contained within the Python executable package.
However, all of the users WILL have MS Access already installed. So
that is a good possibility, and I have already played around with DAO
and run a couple of scripts with it.

However, I've also read some things about the Python independent db
called Gadfly. This is also an interesting possibility as it reduces
the need to even have Access around and lowers the complexity in
freezing applications (which can run into problems when using COM
clients sometimes).

So from reading I've narrowed it down to two possibilities - MS Access
with DAO and Gadfly. What I can't get from reading is experience or
someone who has done this type of thing before and already knows which
one will work best based on what I need to do. Or, if there exists
another solution other than the two I mentioned, please throw that out
there because it's almost impossible to completely examine every
possibility out there. All suggestions are helpful.

Thanks ahead of time,
Marc
 
T

Tim Churches

Hi all,

Having never used a database before and immersing myself in reading
stuff about databases over the last two days I have come to this
conclusion, I still don't know which one I need. I've been using
Python for a while, storing things that I'll need later in files. I am
now looking for a better solution; ergo the need for a database.

Basically I need a db that will travel with my executable script and
faithfully store and edit the data needed in that script. People using
this script will need to be stand alone users. Having a client/server
arrangement is not possible over a network.

You know about pickling, don't you, specifically cPickle. If not,
investigate that first.
Also, installing some type of db engine outside of Python is also not
possible. This rules out installing such readily available databases
as mySQL or any other type of db that must have a separate install.
Everything must be contained within the Python executable package.
However, all of the users WILL have MS Access already installed. So
that is a good possibility, and I have already played around with DAO
and run a couple of scripts with it. ....
So from reading I've narrowed it down to two possibilities - MS Access
with DAO and Gadfly. What I can't get from reading is experience or
someone who has done this type of thing before and already knows which
one will work best based on what I need to do. Or, if there exists
another solution other than the two I mentioned, please throw that out
there because it's almost impossible to completely examine every
possibility out there. All suggestions are helpful.

Look at the support for the various flavours of the BSD database which
are part of the standard Python library, and also the shelve interface
to those databases.

Also look at PySQLite (see http://pysqlite.sourceforge.net/ ) and
MetaKit (http://www.equi4.com/metakit/python.html).

--

Tim C

PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
or at http://members.optushome.com.au/tchur/pubkey.asc
Key fingerprint = 8C22 BF76 33BA B3B5 1D5B EB37 7891 46A9 EAF9 93D0



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA//1nGeJFGqer5k9ARAv0jAJ4lUqxhapAMJ/dlUUJY11wAb3f6AwCfWgRb
p/6ZZT4XsGj4o2aGUvsS3UM=
=6oAk
-----END PGP SIGNATURE-----
 
P

Paul Rubin

What do you need to do with the database? For a lot of standalone
applications, one of the standard Python dbm modules is good enough.
 
S

Steve Williams

Marc said:
Hi all,
[snip]

Basically I need a db that will travel with my executable script and
faithfully store and edit the data needed in that script. People using
this script will need to be stand alone users. Having a client/server
arrangement is not possible over a network.

Also, installing some type of db engine outside of Python is also not
possible.
[snip]

Or, if there exists
another solution other than the two I mentioned, please throw that out
there because it's almost impossible to completely examine every
possibility out there. All suggestions are helpful.

Thanks ahead of time,
Marc

Firebird 1.5 has a nice stand-alone database capability I use for demos.

You don't have to install anything on the target machine, but it's not
something that can be packed up in a python exe, as far as I know. You
have to have the Firebird database, its dll, config file and message
file in the same directory as your Python program, but that's all.

Firebird, as a database, is worth a look. I'd spend an hour evaluating
it before using ACCESS and DAO.

You might run into deployment problems with ACCESS 2, 3, 4, 5, 7,
2000/DAO on Windows 95, Windows 98, Windows NT, Windows XP, service
packs 1-5, plus corruption/compaction headaches. But that's just my
experience. "You have moved the mouse, please insert the ACCESS
installation CD...".

If you just want some data persistency, use pickle.
 
A

Aaron Watters

Rene Pijlman said:

BTW, I would like to see somewhere an explanation of how
ZODB concurrency control and recovery work. Please inform if
there is some information. I'm not encouraged by the fact that
in what documentation I can find the definitions are not the
standard ones. For example

zodb.pdf:
"""
Isolation means that two programs or threads running in two different
transactions cannot see each other's changes until
they commit their transactions.
"""
Database System Concepts, 4th edition, Silberchatz, Korth, Sudarshan p.566
"""
Isolation: Even though multiple transactions may execute concurrently
the system guarantees that for every pair of transactions Ti and Tj
it appears to Ti that either Tj finished executing before Tj started
or Tj started executing after Ti finished.
"""
The zodb definition is far weaker than the standard one (at least in
this document). Maybe they really meant something different?

For an example of what I'm looking for please see the xsdb documentation
http://xsdb.sourceforge.net/concurrency.html
or the gadfly documentation
http://gadfly.sourceforge.net/recover.html

-- Aaron Watters
===
....and somewhere in the eprom
that hacker he switched context
but in is cryptic code I found
a statement I could parse:
you got to know when to kludge up
know when to core dump
know when to single step
know when to "run"
you never count your source lines
while your sittin' at the keyboard
there'll be time enough for metrics
when the hackings done.
The Hacker (with apologies to The Gambler)
 
J

Jeremy Hylton

Which doesn't have a built-in query system, so isn't a database in the
same way as a relational DB like Postgres or Oracle. It's more like
BSDDB + pickle.

A database is a lot more than a query system, although for some
applications query support is very important. Zope has a custom query
system, called the catalog, that is built on top of ZODB. Whether ZODB
sans a builtin query system is suitable really depends on the
application.

Jeremy
 
J

John J Lee

A database is a lot more than a query system, although for some
applications query support is very important. Zope has a custom query
system, called the catalog, that is built on top of ZODB.

I thought ZCatalog was dependent on Zope?

There is IndexedCatalog, of course.

Whether ZODB
sans a builtin query system is suitable really depends on the
application.

Of course.


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top