The Artima Developer Community
Sponsored Link

Python Buzz Forum
databases

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Andrew Dalke

Posts: 291
Nickname: dalke
Registered: Sep, 2003

Andrew Dalke is a consultant and software developer in computational chemistry and biology.
databases Posted: May 17, 2005 8:45 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Andrew Dalke.
Original Post: databases
Feed Title: Andrew Dalke's writings
Feed URL: http://www.dalkescientific.com/writings/diary/diary-rss.xml
Feed Description: Writings from the software side of bioinformatics and chemical informatics, with a heaping of Python thrown in for good measure.
Latest Python Buzz Posts
Latest Python Buzz Posts by Andrew Dalke
Latest Posts From Andrew Dalke's writings

Advertisement

Accessing a SQL database with Python is very simple. There are Python modules that interface to most database servers. All of those implement a standard API which makes it easy to port from one database to another. (Though each database has its own nuances and sticky points.) There are tutorials and many people know how to use it so you can ask questions on the comp.lang.python newsgroup or read recipes (how-tos).

Because of the standard API there are libraries like SQLObject to do object-relation mapping on top of an existing SQL database. There are even several self-contained SQL libraries if you don't want to run a server.

If you decide to use a relational database, the best Oracle client for Unix is cx_Oracle and the best Windows ODBC solution is mxODBC.

If you don't like relational databases you can use an object database instead. Again there are several, including ZODB and Durus. I've used ZODB for several projects where I had to store lots of different data types and didn't need fast searching.

Or you can try out Sleepycat's BerkeleyDB.

The options are almost overwhelming. This should help simplify your decisions:

  • If you have reasonably well-defined data and/or want multiple languages to connect to the database, use Oracle, MySQL or PostgreSQL
  • If you are mostly dealing with Python and want a relational database backend then use SQLObject on top of one of those listed SQL databases
  • If you don't need a server now but might in the future (for performance, perhaps) then use one of the server-free SQL libraries like SQLLite.
  • If you have a lot of Python objects and/or complex data structure that you want to manipulate as a data structure, use ZODB or another object database.
  • If your data is well-structured and simple and you don't need a server, use BerkeleyDB.

Read: databases

Topic: IronPython 0.7.1 is out Previous Topic   Next Topic Topic: Breaking the Web We Have

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use