Databases: Which one's right for me?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc

    Databases: Which one's right for me?

    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
  • Tim Churches

    #2
    Re: Databases: Which one's right for me?

    On Sat, 2004-01-10 at 12:17, Marc wrote:[color=blue]
    > 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.[/color]

    You know about pickling, don't you, specifically cPickle. If not,
    investigate that first.
    [color=blue]
    > 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.[/color]
    ....[color=blue]
    > 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.[/color]

    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//1nGeJFGqer5k9AR Av0jAJ4lUqxhapA MJ/dlUUJY11wAb3f6A wCfWgRb
    p/6ZZT4XsGj4o2aGU vsS3UM=
    =6oAk
    -----END PGP SIGNATURE-----

    Comment

    • Paul Rubin

      #3
      Re: Databases: Which one's right for me?

      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.

      Comment

      • Steve Williams

        #4
        Re: Databases: Which one's right for me?

        Marc wrote:[color=blue]
        > Hi all,
        >[/color]
        [snip]
        [color=blue]
        > 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.[/color]

        [snip]
        [color=blue]
        > 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[/color]

        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.

        Comment

        • Rene Pijlman

          #5
          Re: Databases: Which one's right for me?

          Marc:[color=blue]
          >Basically I need a db that will travel with my executable script and
          >faithfully store and edit the data needed in that script.[/color]

          Have a look at ZODB.

          Introduction:


          Programming guide (PDF):


          --
          René Pijlman

          Comment

          • John J. Lee

            #6
            Re: Databases: Which one's right for me?

            Rene Pijlman <reply.in.the.n ewsgroup@my.add ress.is.invalid > writes:
            [color=blue]
            > Marc:[color=green]
            > >Basically I need a db that will travel with my executable script and
            > >faithfully store and edit the data needed in that script.[/color]
            >
            > Have a look at ZODB.
            >
            > Introduction:
            > http://www.python.org/workshops/2000...ton/zodb3.html[/color]

            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.


            John

            Comment

            • Aaron Watters

              #7
              Re: Databases: Which one's right for me?

              Rene Pijlman <reply.in.the.n ewsgroup@my.add ress.is.invalid > wrote in message news:<qu7000dot 866j3qd9hi6hgkh 4np5nuq7fa@4ax. com>...[color=blue]
              > Marc:[color=green]
              > >Basically I need a db that will travel with my executable script and
              > >faithfully store and edit the data needed in that script.[/color]
              >
              > Have a look at ZODB.
              >
              > Introduction:
              > http://www.python.org/workshops/2000...ton/zodb3.html[/color]

              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

              or the gadfly documentation


              -- 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)

              Comment

              • Jeremy Hylton

                #8
                Re: Databases: Which one's right for me?

                On Sat, 2004-01-10 at 19:50, John J. Lee wrote:[color=blue]
                > Rene Pijlman <reply.in.the.n ewsgroup@my.add ress.is.invalid > writes:
                >[color=green]
                > > Marc:[color=darkred]
                > > >Basically I need a db that will travel with my executable script and
                > > >faithfully store and edit the data needed in that script.[/color]
                > >
                > > Have a look at ZODB.
                > >
                > > Introduction:
                > > http://www.python.org/workshops/2000...ton/zodb3.html[/color]
                >
                > 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.[/color]

                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



                Comment

                • John J Lee

                  #9
                  Re: Databases: Which one's right for me?

                  On Mon, 12 Jan 2004, Jeremy Hylton wrote:[color=blue]
                  > On Sat, 2004-01-10 at 19:50, John J. Lee wrote:[/color]
                  [...about ZODB...][color=blue][color=green]
                  > > 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.[/color]
                  >
                  > 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.[/color]

                  I thought ZCatalog was dependent on Zope?

                  There is IndexedCatalog, of course.

                  [color=blue]
                  > Whether ZODB
                  > sans a builtin query system is suitable really depends on the
                  > application.[/color]

                  Of course.


                  John

                  Comment

                  Working...