Re: [Tutor] Re: Data storage, SQL?
> Both Gadfly and SQLite have DB-API compliant drivers and use SQL My apologies, I obviously gott confusd somewhere I thought Gadfly was a non SQL DB. In which case you can ignore my previous comments about Gadfly being less suitable than SQLite. > I guess I see three rough categories. I'd agree with Kents summary. > At the top of the heap are the industrial strength databases. > This includes free products like MySQL, PostgreSQL and Firebird > as well as commercial products like MS SQL Server, Sybase and Oracle. The commercial ones all tend to scale better at the very big end of things. But you only need to worry if you have more than a thousand users or over a terabyte of data. For 90% plus of applications the freeware ones will do fine. > In the middle tier are databases that are not as full featured > but still very usable for small to midsize work. I would put > SQLite and Gadfly into this category. Some people would argue that MySQL > belongs here. I'd have put MySql here up until release 5 but its now pretty solidly in tier 1 territory - especially since their tie up with SAP and MaxDB for large data sets and with the addition of stored procedures. The other popular one in this tier 2 category is MS Access. > In the bottom tier are programs that are more of a persistence mechanism > than a true database. I put KirbyBase here along with the standard > Python shelve and dbm modules. The other category are the Object Databases like ZODB from Zope. However they are so disparate in capability and architecure that there is little in common. The big win with a SQL solution is that the knowledge transfers easily from one DB to aother as the size grows. Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Re: Data storage, SQL?
> ...So, trying to get this straight - if I were going to use SQLite, > what would I actually download from http://www.sqlite.org/sqlite.html > ? Well, I haven't usd it yet but I think you need(for Windoze) 1) The Sqllite executable OR the DLL 2) The pysqlite library to interface between Pyhon DBI and SQLIte and probably 3) SQLIte Explorer for a civilised SQL IDE environment > Also, would Gadfly be easier, being native Python? Gadfly might be easier to accomplish the task but the knowledge would be less transferrable IMHO The effort of learning SQL is fairly minimal (at least to get up to basic speed) but the benefits are immense. I strongly recommend taking the extra time to learn SQL and SQLite looks like a fairly easy way in - it doesn't have power user features like Oracle, Interbase, PostGres etc, but almost all you learn in it will transfer to those heavier weight DBs later if you need it. Thanks for reminding me about SQLite Sandip, I've been meaning to try it for ages and your post was the incentive to download it... It looks promising and I will probably use it for my tutorial, whenever I get round to it! Alan G Author of the Learn to Program web tutor http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Re: Data storage, SQL?
Liam Clarke wrote: ...So, trying to get this straight - if I were going to use SQLite, what would I actually download from http://www.sqlite.org/sqlite.html ? SQLite itself does not use / interface with Python. So you would download the appropriate version of SQLite for your platform from http://www.sqlite.org/download.html. Then get the matching release of pysqlite from http://sourceforge.net/projects/pysqlite/ - this is the Python interface to SQLite. Also, would Gadfly be easier, being native Python? Gadfly might be a little easier to install since there is only one piece. Both Gadfly and SQLite have DB-API compliant drivers and use SQL for their command language, so in use they will be similar. Gadfly keeps the database in memory so for large amounts of data it won't work. I think SQLite has been around longer than Gadfly so it may be more mature. If you want a simple database with a Pythonic interface, take a look at KirbyBase. Though from your brief description I think you will want a database that supports joins. There is a great variety of databases usable from Python. Most of them use DB-API and SQL for the interface, so you have to pick one based on features. I guess I see three rough categories. This is a rough opinion based on reading about these databases. My own experience is with MS SQL Server, PostgreSQL and MS Access. At the top of the heap are the industrial strength databases. This includes free products like MySQL, PostgreSQL and Firebird as well as commercial products like MS SQL Server, Sybase and Oracle. These databases will take anything you can throw at them with style and aplomb. (MySQL is probably the most limited of this category but it is widely used and clearly quite capable.) They are well supported with tools and they are used in a wide variety of projects. In the middle tier are databases that are not as full featured but still very usable for small to midsize work. I would put SQLite and Gadfly into this category. Some people would argue that MySQL belongs here. These databases will be missing features like transactions, large database support, unicode support... In the bottom tier are programs that are more of a persistence mechanism than a true database. I put KirbyBase here along with the standard Python shelve and dbm modules. OK...I don't know if this has been any help...I suggest you look at the *features* of SQLite and Gadfly and see if either is missing anything you need. Finally, you might want to look at SQLObject. This is a wrapper on top of the database that makes your objects persist themselves. It shields you from DB-API and SQL. http://sqlobject.org HTH, Kent Regards, Liam Clarke On Sat, 12 Feb 2005 14:27:21 +0500, Sandip Bhattacharya <[EMAIL PROTECTED]> wrote: On Fri, 11 Feb 2005 20:09:10 +1300, Liam Clarke wrote: Hi, I'm looking to create a prog that will store disparate bits of info all linked together, i.e. address details for a person, transaction records, specific themes, and the ability to search by certain criteria, so I'm pretty sure I want a database. Can anyone recommend a useful database library for Python that's not too complex? Also, I keep hearing about SQL, would this be the best way to go? I don't know much about databases. You can take a look at sqlite (http://www.sqlite.org/). It doesn't require a client server setup, and offers you the same sql syntax for manipulating data on it. Some amazing facts about this from the website: [...] SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Features include: * Transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures. * Zero-configuration - no setup or administration needed. * Implements most of SQL92. * A complete database is stored in a single disk file. * Database files can be freely shared between machines with different byte orders. * Supports databases up to 2 terabytes (2^41 bytes) in size. * Sizes of strings and BLOBs limited only by available memory. * Small code footprint: less than 30K lines of C code, less than 250KB code space (gcc on i486) * Faster than popular client/server database engines for most common operations. * Simple, easy to use API. * Well-commented source code with over 95% test coverage. * Self-contained: no external dependencies. * Sources are in the public domain. Use for any purpose. The SQLite distribution comes with a standalone command-line access program (sqlite) that can be used to administer an SQLite database and which serves as an example of how to use the SQLite library. [...] - Sandip -- Sandip Bhattacharya*Puroga Technologies * [EMAIL PROTECTED] Work: http://www.puroga.com *Home/Blog: http://www.sandipb.net/blog PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3 ___ Tutor maillist - Tutor@python.org http://mail.pyt
Re: [Tutor] Re: Data storage, SQL?
...So, trying to get this straight - if I were going to use SQLite, what would I actually download from http://www.sqlite.org/sqlite.html ? Also, would Gadfly be easier, being native Python? Regards, Liam Clarke On Sat, 12 Feb 2005 14:27:21 +0500, Sandip Bhattacharya <[EMAIL PROTECTED]> wrote: > On Fri, 11 Feb 2005 20:09:10 +1300, Liam Clarke wrote: > > > Hi, > > > > I'm looking to create a prog that will store disparate bits of info > > all linked together, i.e. address details for a person, transaction > > records, specific themes, and the ability to search by certain > > criteria, so I'm pretty sure I want a database. > > > > Can anyone recommend a useful database library for Python that's not > > too complex? > > Also, I keep hearing about SQL, would this be the best way to go? I > > don't know much about databases. > > You can take a look at sqlite > (http://www.sqlite.org/). It doesn't require a client > server setup, and offers you the same sql syntax for manipulating data on > it. > > Some amazing facts about this from the website: > > [...] > SQLite is a small C library that implements a self-contained, > embeddable, zero-configuration SQL database engine. Features include: > > * Transactions are atomic, consistent, isolated, and durable (ACID) > even after system crashes and power failures. > * Zero-configuration - no setup or administration needed. > * Implements most of SQL92. > * A complete database is stored in a single disk file. > * Database files can be freely shared between machines with > different byte orders. > * Supports databases up to 2 terabytes (2^41 bytes) in size. > * Sizes of strings and BLOBs limited only by available memory. > * Small code footprint: less than 30K lines of C code, less > than 250KB code space (gcc on i486) > * Faster than popular client/server database engines > for most common operations. > * Simple, easy to use API. > * Well-commented source code with over 95% test coverage. > * Self-contained: no external dependencies. > * Sources are in the public domain. Use for any purpose. > > The SQLite distribution comes with a standalone command-line access > program (sqlite) that can be used to administer an SQLite database and > which serves as an example of how to use the SQLite library. > > [...] > > - Sandip > > -- > Sandip Bhattacharya*Puroga Technologies * [EMAIL PROTECTED] > Work: http://www.puroga.com *Home/Blog: http://www.sandipb.net/blog > > PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3 > > > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor