[fdo-users] Object and Association Support
Brent Robinson
brent.robinson at autodesk.com
Thu Jul 22 15:04:26 EDT 2010
Hi Crispin,
There are a few other (RDBMS-based) providers that support Association and Object properties:
OSGeo.SQLServerSpatial
OSGeo.PostgreSQL
OSGeo.MySQL
Autodesk.SqlServer
Autodesk.Oracle
The SQLite provider might also support Association but I haven't checked, and there might be a few other providers that I'm not aware of.
The capabilities are:
FdoISchemaCapabilities::SupportsAssociationProperties()
FdoISchemaCapabilities::SupportsObjectProperties()
Association Properties are analogous to relational constraints, or RDBMS foreign key constraints. Whether the RDBMS-based providers actually use foreign keys depends on whether the datastore has FDO MetaData. If it does then the association and object properties are defined in the MetaData and any foreign keys in the datastore are ignored. For datastores without this MetaData, an association property is generated for each foreign key present; but no object properties are generated. These providers do not have a way to create foreign keys in either type of datastore (except by FdoISqlCommand) but, if the datastore does not have FDO MetaData, then any foreign keys added by other means will be picked up as association properties.
The current FDO API does not use them to do joins but does provide a way to do nested reading. If you have an FdoIFeatureReader on a feature class with association and/or object properties, then FdoIFeature::GetFeatureObject() can be used to get a reader for all the associated features or object property values for a particular association or object property for the current feature. However, this is a bit different from getting a flat results set resulting from a join. RFC50 will be adding the ability to do joins through the FDO API.
The 5 RDBMS providers mentioned above handle filters such as "PrimaryClass.SecondaryAssociation.Value = 1" and "PrimaryClass.SecondaryObject.Value = 1". I haven't checked the other providers.
Brent.
-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Crispin_at_1Spatial
Sent: Thursday, July 22, 2010 11:18 AM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Object and Association Support
All,
We are looking at the capabilities of FDO for modelling "rich / complex
objects". There are two approaches to this, AFAIK, namely 'Object
Properties' and 'Association Properties'.
It appears that client-side support for both is poor but that doesn't worry
me at the moment. What I want to achieve is a homogenised way of handling
such things.
There was a discussion by JNg on scope for FDO Toolbox
(http://osgeo-org.1803224.n2.nabble.com/Questions-about-advanced-schema-elements-td4163239.html#a4163239)
but little else.
Could I get clarification on a couple of things?
1) Association Properties
a)Is SDF the only provider to support them? Where is this defined in the
provider capabilities?
b)Is this analagous to having relational constraints in the provider - and
how, therefore would it be different to joins when querying information? Is
it like an implied view or better than that?
c)Is there potential to do clever queries like
"PrimaryClass.SecondaryAssociation.Value = 1" ?
2) Object Properties
a) Are there any providers that support them? Where is this defined in the
provider capabilities?
b) Is there potential to do clever queries like
"PrimaryClass.SecondaryObject.Value = 1" ?
Thanks - I expect this is a bit specialised but someone (Orest?) designed
this and it would be good to be able to put it to work.
Crispin
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Object-and-Association-Support-tp5325810p5325810.html
Sent from the FDO Users mailing list archive at Nabble.com.
_______________________________________________
fdo-users mailing list
fdo-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/fdo-users
More information about the fdo-users
mailing list