[fdo-users] Is there a Feature class naming convention

Orest Halustchak orest.halustchak at autodesk.com
Wed Jan 23 09:47:41 EST 2008

Hi Bruno,

My view is that encoding the schema name as part of the class name is redundant. However, FDO does not have any "rules" regarding how to reverse engineer a table name into a class name when accessing an existing rdbms schema where there is no additional fdo logical/physical mapping metadata persisted.

FDO does have a concept of physical schema overrides where you can specify or retrieve physical schema information such as table names and column names for classes and properties. However, being physical attributes, they are different for different providers - e.g. file providers have different physical attributes from database providers. Even different database types have different physical attributes. The Autodesk Oracle provider for example includes physical overrides that include table name and column name information such as table name, tablespace name, and owner. These are not exposed in the generic FDO api as they can be quite different for different physical sources. I had thought about a generic technique such as name/value pair list that could be exposed through a generic and still expose provider specific attributes, but we haven't gone down that path yet. It would need some discussion and design. (As an aside, have you seen the futures list on the fdo osgeo wiki, http://trac.osgeo.org/fdo/wiki/FdoFutures?)

While mandating strict rules for table name to class name reverse engineering may be a simple solution, I'm not sure that it's the best way to go.


-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of Bruno Scott
Sent: Wednesday, January 23, 2008 8:51 AM
To: fdo-users at lists.osgeo.org
Subject: RE: [fdo-users] Is there a Feature class naming convention

Specifically for the PostGIS provider
we specify the connection string with
  Service : MyDatabase at host:port
  Datastore : MySchema

So i think the featureclass name could only be "MyTable" instead of
Because we have already the datastore/Schema in the connection string

Am i right?


Bruno Scott wrote:
> Let me explain my problem.
> We have developped a huge application that does lot of specific industry
> task.
> These industry are Transportation,Cadaster,Facility management,Telco and
> so on.
> We historically used 2 driver to access and Maintain all these data :
> OleDb and OCI
> We have recently added support to FDO
> The same application could run on Access,SqlServer,Oracle,MySql.... with
> the same setting (table name, column name...) only the connection string
> change.
> To make sure that everything works fine we do unit testing on each of
> these databases.
> Symmary of the steps involved in unit testing
>   drop all the tables
>   Create all the tables
>   fill all the tables with known values
>   Launch some specific industry fonction
>   Test if the function did the right thing
> A specific industry function consist of one or many of these:
>   Select some record
>   Insert some record
>   Delete some record
>   Update some record
> The only things the application knows to acheive this are
>   a connection string to the database
>   a table name with optionnaly a schema name
>   the column names
> This end up with something like this
>    Drop table "MyTable"...
>    Create table "MyTable"...
>    Insert into "MyTable"...
>    ...
> These sequence of statement work fine on Most fdo provider
>   Autodesk.Oracle
>   Autodesk.SqlServer
>   Osgeo.MySQL
>   Osgeo.SDF
>   Osgeo.SHP
> I have problems with Osgeo.PostGIS,
> with PostGIS i have to do that to make it working
>    Drop table "MyTable"...
>    Create table "MyTable"...
>    Insert into "MySchema~MyTable"...
> How i am suppose to know that the featureclass name should be
> "MySchema~MyTable" instead of "MyTable"
> I wish FDO had a method like GetPhysicalName who would return
> "MySchema.MyTable"
> So i would be able to map featureclassName to physical table name
> automatically
> Bruno
> JasonBirch wrote:
>> I believe that the PostGIS provider only implements the native PostGIS
>> data access, and has no way of storing FDO-specific logical/physical
>> mappings (not sure if I have the right terminology here).  I believe
>> that the second scenario would require the PostGIS provider to implement
>> some way of persisting this information?
>> Jason
>> -----Original Message-----
>> From: Orest Halustchak
>> Subject: RE: [fdo-users] Is there a Feature class naming convention
>> If the provider is accessing an existing schema, e.g. not created by
>> fdo, then the provider decides how to map the table / file to a class
>> and schema. The main thing is that the mapping is unique and unambiguous
>> as Traian said.
>> The other scenario is if a new class is defined via fdo. In this case,
>> the caller is specifying an explicit schema name and class name. A
>> describe of that class then should come back with the same names as long
>> as the input names were valid (FdoISchemaCapabilities has methods to get
>> information about valid names such as name size limits and valid
>> characters).
>> _______________________________________________
>> fdo-users mailing list
>> fdo-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-users

View this message in context: http://www.nabble.com/Is-there-a-Feature-class-naming-convention-tp15021175s18162p15042014.html
Sent from the fdo-users mailing list archive at Nabble.com.

fdo-users mailing list
fdo-users at lists.osgeo.org

More information about the fdo-users mailing list