alan.gauld at btinternet.com
Sun Sep 11 00:24:54 CEST 2011
On 10/09/11 20:44, Andre' Walker-Loud wrote:
>> What type of databases? sql server, mysql, sqllite?
> well this already helps. I don't even know.
> Do I have to know ahead of time? Or is there a general database
> package that can open a databases without knowing there format?
The Python DB API is pretty good at covering all the common databases
but sadly everyone has some slight variances so you do need to know
which product you will be using.
As an example the SQLite package that comes in the standard library -
and is a good starter - doesn't require login credentials but Oracle,
MySQL etc do. Also Sqllite is stored in a single file accessed via a
code library whereas most other SQL databases use multiple files and a
server frontend. (That's why there's a connect() function - to connect
to the server... in SQLite connect just opens the file!)
If you are a database noob I'd keep it simple and stick with SQLite,
it's powerful enough for most beginner type projects and misses out some
of the more complex features of the other packages. Provided you aren't
expecting to scale up to 10's of millions of records it will do just
fine. Once you understand SQLite moving to MySQL or Firebird or whatever
will be an easy next step.
Author of the Learn to Program web site
More information about the Tutor