[GRASS-dev] sqlite and grass64

Ivan Shmakov ivan at theory.asu.ru
Mon Jan 14 05:08:57 EST 2008


>>>>> Glynn Clements <glynn at gclements.plus.com> writes:

 >> DBF works "out of the box" on all platforms and is as well tested
 >> and implimented as these things get. Its problems are well known.

 >> AFAIU SQLite (by default) stores the DBs for all vector maps in a
 >> single file per mapset. This makes it hard to share individual
 >> vector maps and may have LFS issues when your data + mapset gets to
 >> be huge.  (??)

 > I doubt that LFS will be an issue in practice; I doubt that you'll
 > find an SQLite without LFS on any platform which supports it (i.e.
 > everything except for ancient Unices).

 > It probably wouldn't be hard to modify the SQLite DBMI driver to
 > allow one file per map (like for DBF), but then you lose the ability
 > to perform joins (OTOH, if you're using DBF, you never had this
 > ability in the first place).

	A shot in the air:

$ cat create-table.sql 
CREATE TABLE foo
    AS SELECT 1 AS item, 'Foo'
       UNION SELECT 2 AS item, 'Bar'
       UNION SELECT 3 AS item, 'Baz';
$ cat create-and-join.sql 
CREATE TABLE bar
    AS SELECT 1 AS item, 'Description #1'
       UNION SELECT 2 AS item, 'Description #2'
       UNION SELECT 3 AS item, 'Description #3';
ATTACH DATABASE 'foo.db' AS "foo-db";
SELECT * FROM "foo-db".foo INNER JOIN bar USING (item);
$ sqlite foo.db < create-table.sql 
$ sqlite bar.db < create-and-join.sql 
1|Foo|Description #1
2|Bar|Description #2
3|Baz|Description #3
$ 

[...]



More information about the grass-dev mailing list