471,596 Members | 1,061 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,596 software developers and data experts.

Python Database Apps

Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????

Darien

Sep 11 '07 #1
17 2638
da************@gmail.com wrote:
Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????

Darien
http://dabodev.com/
Sep 11 '07 #2
What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????
I like to use elixir [1] on top of sqlalchemy [2]

[1] http://elixir.ematia.de/
[2] http://www.sqlalchemy.org/
Sep 11 '07 #3
On Sep 10, 2007, at 10:52 PM, da************@gmail.com wrote:
Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.
Are you asking for opinions on what sort of database engine to use?
Or are you trying to get a feel for what people use to develop their
apps? Are you looking for a web app, or a desktop app, or a non-UI app?

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
Sep 11 '07 #4
On Sep 11, 9:25 am, Ed Leafe <e...@leafe.comwrote:
On Sep 10, 2007, at 10:52 PM, darien.watk...@gmail.com wrote:
Kindof a poll, kindof curiosity...
What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Are you asking for opinions on what sort of database engine to use?
Or are you trying to get a feel for what people use to develop their
apps? Are you looking for a web app, or a desktop app, or a non-UI app?

-- Ed Leafe
--http://leafe.com
--http://dabodev.com
It would help to get a feel of what is the most popular combination
for people to develop their apps. It's gonna be a desktop app. The
database engine is going to be the critical component. I like sqlite
so that I don't need a database server on the client side. It would
help though if there is a way to sync between multiple clients to a
central server database. That's the tough part. To give you a better
idea of what i'm trying to do, I am trying to write an app where
multiple technicians have an issue tracker that is available both
offline and online. I was looking to use sqlite as the local side
that would sync new and updated issues to a central server when
online. Any technician may work on any issue. Generally they will
not be working on the same issue at the same time. The technicians
are geographically diverse (anywhere in the southeast US, not in an
office.)

Thanks for the feedback so far...

Darien

Sep 11 '07 #5
On Monday 10 September 2007 19:52, da************@gmail.com wrote:
Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????
I have had a lot of good luck with PostgreSQL. It is easy to install and use.
It is also very stable. It maybe overkill for a client side database. The
psycopg package makes interfacing to PostgreSQL very easy and there is a
package for Linux and Windows to make cross-platform development a breeze.

-Tom
Sep 11 '07 #6
On Sep 11, 1:07 pm, Tom Brown <br...@esteem.comwrote:
>
I have had a lot of good luck with PostgreSQL. It is easy to install and use.
It is also very stable. It maybe overkill for a client side database. The
psycopg package makes interfacing to PostgreSQL very easy and there is a
package for Linux and Windows to make cross-platform development a breeze.
SQLAlchemy works wonderfully with PostgreSQL. I absolutely love it.

For client-side apps, managing a PostgreSQL installation might be
asking too much. But for a web site or web service, I absolutely
recommend it.

Sep 11 '07 #7
On Sep 11, 1:39 pm, Jonathan Gardner
<jgardner.jonathangardner....@gmail.comwrote:
>
For client-side apps, managing a PostgreSQL installation might be
asking too much. But for a web site or web service, I absolutely
recommend it.
I should mention that I wrote a medical billing software app (client
side--PyQt) in Python with a PostgreSQL backend and there were no
problems (aside from managing the database--which was easy.) That was
over 4 years ago though.

Sep 11 '07 #8
It would help to get a feel of what is the most popular combination
for people to develop their apps. It's gonna be a desktop app. The
database engine is going to be the critical component. I like sqlite
so that I don't need a database server on the client side. It would
help though if there is a way to sync between multiple clients to a
central server database. That's the tough part. To give you a better
idea of what i'm trying to do, I am trying to write an app where
multiple technicians have an issue tracker that is available both
offline and online. I was looking to use sqlite as the local side
that would sync new and updated issues to a central server when
online. Any technician may work on any issue. Generally they will
not be working on the same issue at the same time. The technicians
are geographically diverse (anywhere in the southeast US, not in an
office.)
If you have an offline mode then the most important thing to work out
is how to handle conflicts in your data synchronization. You need a
clear logic policy for this, and some means of conflict resolution.
Also all parties need to be consistent and not go out of sync too
badly. Maybe avoid conflicts altogether. eg define exactly what types
of updates can take place offline (record insertions only). Or a
policy where deletes+updates can only be made offline by the
technician that "owns" the issue/has locked it. This approach has a
few issues also.

If the database is relatively small and your data is simple then you
could get away with simple table record comparisons to do syncing
(only works properly for inserts, and you need 'natural keys' for
comparison - updates and deletes are more complicated).

Another (really complicated) way is to use a series of log events,
which your app can commit locally or to the server, and merge incoming
events from the server. This is similar in principle to a SCM like
CVS, subversion, git, bazaar, etc. SVK is probably the closest to your
model (centralised scm, with offline commit mode). This gets
complicated very quickly.
Sep 11 '07 #9
Ivo
da************@gmail.com wrote:
Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????

Darien
If you like to make a kind of stand alone app with a database, SQLite a
good choice. It is easy to embed into your app. If you keep to ANSI SQL
there should be no trouble changing databases at a later date.
I use SQLite for my WebSite http://IvoNet.nl and it performs great.
The whole database is less than 1Mb including the SQLite module for
python. No 50Mb install needed if you just want a simple database.
It makes my website very portable and easy to install.

MySQL works great to. I have used it a lot and it is very available.
Just about every provider can provide you one.

Ivo.
Sep 11 '07 #10
Tom Brown a écrit :
On Monday 10 September 2007 19:52, da************@gmail.com wrote:
>>Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????


I have had a lot of good luck with PostgreSQL. It is easy to install and use.
Well... For an experimented (or opiniated) Unix user, at least !-)

But I can only second : PgSql is probably one of the best free RDBMS
around - one of my previous associates (and still friend !-), who has
quite a few years of experience as an Oracle DBA, consider it (pg) as
mostly as good as Oracle, and eventually better on some points. My own
experience with Pg for web applications is that it JustWorks(tm) - never
had a single problem with it. I wish I could say so about MySQL.

wrt/ sqlite, I've only used it for small web apps, and the only problem
I had was a strange incompatibility bug with first PHP5 versions
installed on the same machine. Since I doubt your users will have PHP5
installed on the client machines (!), this should not be a problem.

And, while it may takes some time to learn, SQLAlchemy is a very great lib.
Sep 11 '07 #11
Tom Brown <br***@esteem.comwrites:
On Monday 10 September 2007 19:52, da************@gmail.com wrote:
>Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????

I have had a lot of good luck with PostgreSQL. It is easy to install and use.
It is also very stable. It maybe overkill for a client side database. The
psycopg package makes interfacing to PostgreSQL very easy and there is a
package for Linux and Windows to make cross-platform development a breeze.

-Tom
I use postgresql as well. I wonder if Pythonistas do so out of
concern for rigor, clarity, and scalability. It works fine for a
quick one-off effort and still works fine after scaling to a DBMS
server supporting lots of clients, and running 10's of GBs of data.

If an app comes already designed for mysql, oracle, sqlite, db2, dbm,
etc I'll use those. But for my own projects, it is postgresql, with
maybe SQLAlchemy (I'm back and forth on that. Mostly stay with
straight SQL).

Of course, as long as you write DBI2 compliant code, your app doesn't
much care which DBMS you use. The postgresql payoff is in admin
functionality and scaling and full ACID.

--
Harry George
PLM Engineering Architecture
Sep 11 '07 #12
Harry George wrote:
Tom Brown <br***@esteem.comwrites:
>On Monday 10 September 2007 19:52, da************@gmail.com wrote:
>>Kindof a poll, kindof curiosity...

What is your favorite python - database combination? I'm looking to
make an app that has a local DB and a server side DB. I'm looking at
python and sqlite local side and sql server side.

Any suggestions????
I have had a lot of good luck with PostgreSQL. It is easy to install and use.
It is also very stable. It maybe overkill for a client side database. The
psycopg package makes interfacing to PostgreSQL very easy and there is a
package for Linux and Windows to make cross-platform development a breeze.

-Tom

I use postgresql as well. I wonder if Pythonistas do so out of
concern for rigor, clarity, and scalability. It works fine for a
quick one-off effort and still works fine after scaling to a DBMS
server supporting lots of clients, and running 10's of GBs of data.

If an app comes already designed for mysql, oracle, sqlite, db2, dbm,
etc I'll use those. But for my own projects, it is postgresql, with
maybe SQLAlchemy (I'm back and forth on that. Mostly stay with
straight SQL).

Of course, as long as you write DBI2 compliant code, your app doesn't
much care which DBMS you use. The postgresql payoff is in admin
functionality and scaling and full ACID.
I also have a tendency to prefer PostgreSQL over MySQL, though I run and
use both from time to time as an exercise in application portability.

Don't forget, there is absolutely no need to use the same database
technology for the client-side and the central repository - sqlite is
hard to beat for its simplicity and ease of installations on the client
side, and you could look at PostgreSQL for the repository as and when
that became a practical proposition.

regards
Steve

--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Sep 11 '07 #13
I use MySQL and also sqlite. However, I also use Spring Python (http://
springpython.python-hosting.com) to use both its DatabaseTemplate
utility class and also the remoting functionality. This way, I can
have the database code sitting on the server, and then export the data
access functions remotely to clients. It is also relatively easy to
swap out database engines.

For the record: Spring Python is my pet project. I use it myself, and
recommend it to others as well.

Sep 12 '07 #14
On Sep 12, 2007, at 10:53 AM, da************@gmail.com wrote:
Thanks for ideas Ed. I am checking out dabo now. I do have a few
questions about it. Packaging. Is it easy to package into a quick
install for windows. The users are going to want to get too in
depth.
py2exe is your friend here. I know several developers who have used
this to distribute Dabo apps, so we could certainly help you get your
setup.py working.
Second, data sources. When I'm adding a data source to the
window in class designer, it always picks up the one I created (which
incidentally was a sample, my form for connection manager isn't
working at the moment.) My idea is to have the the local sqlite
database as the only viewable data source, and the server side only
for syncing. So they logon, sync up, sync down, and view. I'm
worried about having to get them to install python, dabo, and the app.
The users would never see any of the Class Designer, connection
editor, or any of the other development tools. I would imagine that
you would need to code the sync parts by getting the current changed
data from the local SQLite database, creating a connection to the
server DB, doing the insert/update as needed, grabbing the latest
from the server, disconnecting from the server, and then updating the
local data. The user would probably need to do nothing more than
click a button to start running your code.

As far as what the user must install, that's what will happen with
any Python solution. py2exe takes care of all of that, bundling
Python, Dabo, your database modules, and any other dependencies into
a single .exe file. You can then use something like Inno Setup to
create a basic Installer that will look and work like any other
Windows application installer.

-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
Sep 13 '07 #15
On Sep 13, 4:55 am, Ed Leafe <e...@leafe.comwrote:
On Sep 12, 2007, at 10:53 AM, darien.watk...@gmail.com wrote:
Thanks for ideas Ed. I am checking out dabo now. I do have a few
questions about it. Packaging. Is it easy to package into a quick
install for windows. The users are going to want to get too in
depth.

py2exe is your friend here. I know several developers who have used
this to distribute Dabo apps, so we could certainly help you get your
setup.py working.
Second, data sources. When I'm adding a data source to the
window in class designer, it always picks up the one I created (which
incidentally was a sample, my form for connection manager isn't
working at the moment.) My idea is to have the the local sqlite
database as the only viewable data source, and the server side only
for syncing. So they logon, sync up, sync down, and view. I'm
worried about having to get them to install python, dabo, and the app.

The users would never see any of the Class Designer, connection
editor, or any of the other development tools. I would imagine that
you would need to code the sync parts by getting the current changed
data from the local SQLite database, creating a connection to the
server DB, doing the insert/update as needed, grabbing the latest
from the server, disconnecting from the server, and then updating the
local data. The user would probably need to do nothing more than
click a button to start running your code.

As far as what the user must install, that's what will happen with
any Python solution. py2exe takes care of all of that, bundling
Python, Dabo, your database modules, and any other dependencies into
a single .exe file. You can then use something like Inno Setup to
create a basic Installer that will look and work like any other
Windows application installer.

-- Ed Leafe
--http://leafe.com
--http://dabodev.com
Have you checked out Brainwave?
http://www.brainwavelive.com

We provide a schema-free non-relational database bundled with an app
server which is basically CherryPy with a few enhancements (rich JS
widgets, Cheetah/Clearsilver templates). Free for non-commercial use.

--Prateek Sureka

Sep 13 '07 #16
On Sep 12, 9:38 pm, Prateek <sure...@gmail.comwrote:
Have you checked out Brainwave?http://www.brainwavelive.com

We provide a schema-free non-relational database bundled with an app
server which is basically CherryPy with a few enhancements (rich JS
widgets, Cheetah/Clearsilver templates). Free for non-commercial use.
You might want to rethink how you are handling databases. What sets
your database apart from hierarchical or object-oriented databases? Do
you understand why people prefer relational databases over the other
options? There's a reason why SQL has won out over all the other
options available. You would do well to understand it rather than
trying out things we already know do not work.

Sep 13 '07 #17
On Sep 14, 1:00 am, Jonathan Gardner
<jgardner.jonathangardner....@gmail.comwrote:
On Sep 12, 9:38 pm, Prateek <sure...@gmail.comwrote:
Have you checked out Brainwave?http://www.brainwavelive.com
We provide a schema-free non-relational database bundled with an app
server which is basically CherryPy with a few enhancements (rich JS
widgets, Cheetah/Clearsilver templates). Free for non-commercial use.

You might want to rethink how you are handling databases. What sets
your database apart from hierarchical or object-oriented databases? Do
you understand why people prefer relational databases over the other
options? There's a reason why SQL has won out over all the other
options available. You would do well to understand it rather than
trying out things we already know do not work.

I didn't mention any details in my previous post. Basically, the
Brainwave database is very similar to an RDF triple store which
captures semantic information.
There are some fundamental differences however, (e.g. a simplified
API, no schema, ability to store objects by introspecting and breaking
it up into its primitives etc.)

In general, it works well if you're dealing with a lot of unstructured
data or even semi-structured/structured data where the structure is
constantly changing. Key areas of benefit are in terms of integrating
legacy databases and also analytics heavy applications. This is
because there is no concept of normalized/denormalized schemas so your
data does not need to go through any structural transformations in
preparation for OLAP use.

Since we're new, I probably won't recommend using it with very very
large data-sets. However, we've seen significant benefits with small
and medium sized data-sets. At any rate, whatever you choose, you can
import and export all data in CSV/XML at any time so your data is
safe.

Some of the benefits I have described above have been shown to be
areas of concern when dealing with SQL stores. There is a lot of
research and many opinion pieces available on this subject. I'd be
happy to discuss any aspect with you further.

Sorry for the delayed response. I've been in and around airplanes for
the last 24 hours (and its not over yet).

-Prateek

Sep 16 '07 #18

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

37 posts views Thread by Ubaidullah Nubar | last post: by
1 post views Thread by Chuck Spears | last post: by
9 posts views Thread by limor | last post: by
14 posts views Thread by Sam | last post: by
114 posts views Thread by Maurice LING | last post: by
28 posts views Thread by H J van Rooyen | last post: by
11 posts views Thread by walterbyrd | last post: by
37 posts views Thread by Michael Palmer | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.