This is probably more of a python question rather than a wxpython
question, but there may be a wx solution that is more appropriate.
I'm looking to use a database with wxpython to table and graph some
information. I know that mysql and postgresql are available with python
bindings, at least on linux. Does anyone know if they are available on
other platforms such as MSW, MacOS, etc. I'm pretty sure MySql is
available for MSW.
Yes and yes. Postgresql offers drivers for MSW. Whenever there is a driver to
the database most likely you can use it with python. Since there is no
"database support" in wxWindows (unlike QT) you just have to depend on the
capabilities python offers - which is quite a lot.
So, what is the best cross-platform database? ie. the best database
engine that is useable on multiple platforms and has python bindings ?
What do you mean by "cross-platform" ? Beeing able to access a database from
one platform is the one thing - running the database server on it is another.
If you can I'd rather leave the server part on a platform relieable enough to
keep it up - which IMHO would be any of the *nix flavours out there. The
environment I tend to suggest to my customers is generally having a *nix box
playing the server and use the MSW and Mac boxes what they where designed to
to - beeing a desktop.
'Best' is a relative term - depending on the application I'd say either
DB2/Oracle (large scale) or if it's smaller and has to be cheaper postgresql.
Personally I don't like mysql at all - it lacks a lot of SQLish features and
IMHO the user management really sucks. But hey, if you like it and it meets
your requirements - use it.
You can be sure that as long as there is a driver for the platform and python
has bindings to the database in general you can access the database.
Does wxWindows have DataBase support and if so does wxPython support
access to it ?
What about MS-Access on MSW machines. Is it a good idea to use this DB
on that platform and other DBs on other platforms. If so, then I would
want a wx solution which hides the specifics of each DB.
You where asking about "Databases" - does that include enhanced spreadsheets ?
:-))
Access is nice for a little "DVD collection" type of program. You sure can use
it from python (via ODBC) - but do yourself a favour and use a more standard
type of database if you think about cross plattform. Depending on the version
used Access is far away from any standard - so you'd rewrite the queries if
you ever want to switch to something else.
Older versions of Access (like 98) have so limited capacity that you are very
likely having big trouble if you access file ever exceeds about 60MB in size.
Access lacks any network capability and as others already pointed out
"multiuser" is not a thing MS has mastered yet - not even in their own
environment (ever tried to install MS Office on a MSW Terminalserver ?)
So no - don't use access - use something like postgresql or mysql.
The whole point in using wxPython is the ability to "write once, run
everywhere" (now where did I hear that first ..). You certainly can embed OS
specific stuff - but you'll limit one of the best features wxP has to offer.
As for hiding the DB - python will do that for you by default. The DB Api is
the same for all the newer drivers. However it will never hide your code - if
you use i.e. array datatypes with postgres you will never be able to switch
to a different database - no matter what. If you depend on triggers and
foreign keys you can't switch to MySQL later on.
Better think about what databases you might _have_ to use later on. If you use
postgresql to start with and you know that later there might be so much load
on the DB Server that you have to switch to something huge - think about your
queries. If they use SQL92 standard you won't have much trouble switching
over. Well - you'll always have to tweak a little bit here and there but
that's not the point as long as you don't have to do a rewrite
Long story - doesn't really belong into the wxPython list .
Anyways, hope this helps
UC
···
On Monday 02 December 2002 03:53 am, Brendan J Simon wrote:
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417