Changes between Version 9 and Version 10 of FDORfc23


Ignore:
Timestamp:
Jul 11, 2008, 12:05:30 PM (16 years ago)
Author:
ronnielouie
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc23

    v9 v10  
    1 = FDO RFC 23 - !DescribeSchema Enhancement and add new !EnumerateFeatureClasses command =
     1= FDO RFC 23 - !DescribeSchema Enhancement and new !EnumerateSchemas, !EnumerateFeatureClasses command =
    22
    33This page contains a request for change document (RFC) for the FDO Open Source project. 
     
    3030Currently this information is retrieved from executing a !DescribeSchema command, which returns a full database schema, containing detailed information about every feature class available from that provider.  For a typical real-world database deployment, containing hundreds of feature classes, it can take a very long time to retrieve all the data for a full schema.
    3131
    32 For commonly required tasks such as requesting a list of feature class names, or a list of properties for a specific class or classes, it could be accomplished more efficiently by retrieving only the requested information.
     32For commonly required tasks such as requesting a list of schema names, feature class names, or a list of properties for a specific class or classes, it could be accomplished more efficiently by retrieving only the requested information.
    3333
    3434== Proposed Solution ==
     35
     36To retrieve the names of the available schemas in a feature source without having to incur the cost of a !DescribeSchema, a new command !EnumerateSchemas, will be added to the API.  The interface for this command is shown below.
     37
     38{{{
     39/// \brief
     40/// The FdoIEnumerateSchemas interface defines the EnumerateSchemas command, which
     41/// retrieves the list of available schemas.
     42/// The Execute operation returns an FdoStringCollection
     43/// object.
     44class FdoIEnumerateSchemas : public FdoICommand
     45{
     46    friend class FdoIConnection;
     47
     48public:
     49
     50    /// \brief
     51    /// Executes the EnumerateSchemas command and returns a
     52    /// FdoStringCollection.
     53    ///
     54    /// \return
     55    /// Returns the string collection of the names of the available schemas.
     56    FDO_API virtual FdoStringCollection* Execute() = 0;
     57};
     58}}}
    3559
    3660To retrieve the feature class names without having to incur the cost of a !DescribeSchema, a new command, !EnumerateFeatureClasses, will be added to the API for obtaining a list of feature class names for a given schema.  If schema is not specified, the list will consist of all feature classes in the feature source.
     
    104128}}}
    105129
    106 The proposed changes will need to be completed for all FDO providers.  Generally speaking, response time for a full !DescribeSchema command is not much of an issue for the file-based FDO providers when compared to the response time for the RDBMS-based FDO providers. 
    107 
    108 The performance gain from using the new !EnumerateFeatureClasses command will be most notable for the RDBMS-based FDO providers. The !EnumerateFeatureClasses command will throw a "Not Implemented" exception when executed against non-RDBMS FDO providers.  Support for this command will be indicated by the provider's command capabilities object.  Hence, only the RDBMS-based FDO providers will include  !FdoCommandType_EnumerateFeatureClasses in the !GetCommands() response.  Providers that do not support this command will have to fall back on using !DescribeSchema and walk through the results to retrieve the class names.
     130The performance gain from using the new !EnumerateSchemas and !EnumerateFeatureClasses command will be most notable for the RDBMS-based FDO providers. Support for the commands will be indicated by the provider's command capabilities object.  Hence, only the RDBMS-based FDO providers will include  !FdoCommandType_EnumerateSchemas and !FdoCommandType_EnumerateFeatureClasses in the !GetCommands() response.  Providers that do not support this command will have to fall back on using !DescribeSchema and walk through the results to retrieve the schema and class names.
    109131
    110132The !DescribeSchema command for non-RDBMS FDO providers will return the schema(s) for all the feature classes regardless of the set of classes specified by the !SetFeatureClassNames method.  !SetFeatureClassNames will return a boolean to provide feedback to the caller for indicating whether the command supports specifying classes as a criteria when executed against a particular provider.
     
    112134== Implications ==
    113135
    114 Application code that currently uses !DescribeSchema to retrieve only class names or class definitions should be updated to utilize the new APIs for improved performance.  The application developer should be aware that not all occurrences of the original !DescribeSchema can be replaced, such as when a complete schema is required for a particular operation.
     136Application code that currently uses !DescribeSchema to enumerate schema/class names or retrieve class definitions should be updated to utilize the new APIs for improved performance.  The application developer should be aware that not all occurrences of the original !DescribeSchema can be replaced, such as when a complete schema is required for a particular operation.
    115137
    116138The existing !DescribeSchema API, which retrieves the full schema for all the available feature classes, will continue to perform as before.  Performance gains will only be realized when the new API is used to restrict the response to the feature class or classes of interest.