[Qgis-developer] table join

Jürgen E. Fischer jef at norbit.de
Tue Dec 1 18:51:25 EST 2009


Hi Martin,

On Tue, 01. Dec 2009 at 23:39:24 +0100, Martin Dobias wrote:
> As Marco has written, a way to achieve table joins will be to
> transparently add further fields when iterating the vector layer. But
> first of all we need some support for tables - basically it's the same
> data type like vector layer but doesn't include a geometry, only
> attributes. With ability to open and work with separate attribute
> tables, we're half done (IMHO).

Yes, that's also something I (shortly) discussed with Marco on the hackfest.

A vector layer would have multiple data providers.  A primary with geometry
and ids and secondaries for joined attributes along with an expression that
connects an primary attribute with an secondary.

The vector layer would report the attributes of all providers as fields.

A nextFeature on the vector layer would trigger a nextFeature on the primary
provider and for each secondary provider a setSubsetString with the expression
from the primary provider and load the secondary attribute via select,
nextFeature and add the secondary attributes to the feature.

The question is how poor that will perform.


Jürgen


-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the Qgis-developer mailing list