[GRASS5] Re: question about sqlite

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Wed Oct 19 16:11:49 EDT 2005


You're welcome :)

BTW, for beginning to work in SQL (and understand a lot about relational
databases), sqlite is truly great. You need only one executable file and
you're set. Along with any SQL tutorial, it should get you experimenting with
SQL in minimal time. And the code is beautifully written and commented.
Really, it's one of the nicest sourcebases around.

About speed, I'm pretty sure that SQLite *can* be much faster than our DBF
driver, given proper index management. I haven't looked in detail at Radim's
work, so can't really comment on that.

About flexibility, the SQL subset handled by SQLite is very large, and the
limitiations (field name length, number of fields,...) inherent to DBF are
gone. You don't have the geometric/GIS features of PostgreSQL+PostGIS, but as
far as RDB handling, you might find yourself willing to delve into SQL proper.

As for the best way to interface with GRASS, I don't have a strong opinion.
For sure we have to extend v.in.db and db.copy. I mostly use db.execute, which
becomes somewhat superfluous for SQLite since we might bundle the sqlite CLI
front-end if we bundle the library. v.db.* is a nice way of GRASSifying (and
foremost integrating) the DB back-ends, but I can't come up with a more GRASSy
interface, lest we begin experimenting with d.m from where Michael gave us the
field list.

Anyway, I think that if we have consensus about a DBF->SQLite transition we
should set up a roadmap.

Daniel.

-- Daniel Calvelo Aros

---------- Original Message -----------
From: Maciek Sieczka <werchowyna at epf.pl>
To: daniel.calvelo at minag.gob.pe
Cc: Radim Blazek <radim.blazek at gmail.com>, GRASS dev list <grass5 at grass.itc.it>
Sent: Wed, 19 Oct 2005 21:38:46 +0200
Subject: Re: [GRASS5] Re: question about sqlite

> Daniel,
> 
> Thanks for your message. You have answered questions I have tried to 
> ask on the grasslist recently but didn't know how to, being a woose 
> in DB stuff.
> 
> My 0,01 PLN: if sqlite improves the v.* and db.* modules speed, as weel
> as provides functionality to drop/rename/change type of columns without
> all the complexity of Postgresql I, a simple user, am all my hands 
> and legs for making it a default DB backend in Grass 6.1.
> 
> Thanks Radim for your effort on implementing sqlite in Grass, and 
> BTW for all the recent wonders you have contributed to Qgis-Grass
interoperability.
> 
> Maciek
> 
[UTF-8?]> Daniel Calvelo Aros napisał(a):
> > From: Radim Blazek <radim.blazek at gmail.com>
> > Sent: Wed, 19 Oct 2005 10:22:09 +0200
> > 
> >>On 10/18/05, Michael Barton <michael.barton at asu.edu> wrote:
> >>
> >>>Radim,
> >>>
> >>>Could you give me a quick overview of what it means to compile GRASS with
> >>>sqlite? Here are a couple questions I have.
> >>>
> >>>1) Is it simply a driver that lets GRASS recognize a database/table created
> >>>by sqlite in an active sqlite session started in another process, like a
> >>>Postgresql table in an active Postgresql session?
> > 
> > 
> > Not quite. A SQLite "database" is a file, just like with DBF. There is no
> > client-server infrastructure for SQLite. SQLite is transactional, so you can
> > open the same file in two sessions, and there will be concurrent access,
> > mostly problem-free.
> > 
> > 
> >>>2) Does it/can it active an sqlite session from within GRASS?
> > 
> > 
> > What it does is access the indicated sqlite file using the SQLite language and
> > tranaction infrastructure, through the libsqlite library.
> > 
> > 
> >>>3) Are there other features that I'm not asking about that I should know?
> >>
> >>The sqlite driver works like any other db driver (dbf, pg, mysql,
> >> odbc). You can use an existing database or create a new one from GRASS.
> >>Just set the driver and database file with db.connect and all new
> >>attribute tables will be created in that database.
> >>
> >>Radim
> > 
> > 
> > _______________________________________________
> > grass5 mailing list
> > grass5 at grass.itc.it
> > http://grass.itc.it/mailman/listinfo/grass5
> > 
> >
> 
> --------------------
[UTF-8?]> W polskim Internecie sÄ
 setki milionów stron. My przekazujemy 
> Tobie tylko najlepsze z nich! http://katalog.epf.pl/
> 
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5
------- End of Original Message -------




More information about the grass-dev mailing list