[Qgis-developer] table join

Mailing Lists lists at linfiniti.com
Mon Nov 30 16:11:47 EST 2009


Hi Alex and others

8<---------------snip-----------------------------

> I had contemplated this a little recently along similar lines. SQLite
> has a concept of IN-Memory databases. What if we created the procedure
> to put joins/relates (Any sql relationship) into an in memory DB, that
> way the procedure just needs to be re-run on project load. It would make
> accessing the "joined" tables fast and allow querying against them.

As I commented on the ticket for table joins, I don't think this is
the way to go. There are several reasons for this:

- if the joined table is very large it wont all fit in memory and will
ultimately cause a crash or a bogged down OS
- dba's will hate us for hammering their databases with full table
queries instead of paging

I think that we should implement this using Qt's model view framework.
It provides a way to abstract data access, provides pagination, and
can be used in many contexts for 'free' e.g. list and table views.
Also if we use the built in database drivers for Qt they are easy to
hook up to a model. And we can create custom models for esoteric
datasources that are not directly supported.

Our custom model can ad hoc fetch data from the related table as each
page is requested so the need for loading heaps of stuff into memory
can be avoided.

Just my 5c

Regards

Tim


>
> The Arc model has some really good and some really annoying features,
> particularly poor handling of many to many and the lack of a full SQL
> operations as join operators.




>
> Alex
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list