This documentation is archived and is not being maintained.

DatabaseSchemaProvider Class

Visual Studio 2008

Exposes a suite of factory objects and factory methods for instantiating service objects related to schema and script modeling.

Namespace:  Microsoft.Data.Schema.Extensibility
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

public abstract class DatabaseSchemaProvider : IExtension

The purpose of the interface is to abstract concrete implementations such as SQLSchemaProvider or MySqlServicesProvider from the rest of the application. At the high-level, DatabaseSchemaProvider implementations (IDSPs) expose the following services:

  • Parse a script file into a script model,

  • Interpret a script model into a schema model,

  • Generate script model from a schema model and

  • Generate a script file from a script model.

In addition to these high-level abilities are more detailed services such as comparison services and UI helpers for display names, icons, or other UI objects. These detailed services are ultimately exposed from IDatabaseServices provider.

The second purpose of DatabaseSchemaProvider implementations is to act as a key that application features can use to declare compatibility with various IDSPs. For example, if a feature declares compatibility with DatabaseSchemaProvider, that feature is designed to work with abstract interfaces such as ITable and IScriptDom. Meanwhile, if a feature declares compatibility with a concrete implementation such as SqlSchemaProvider, that feature will not be loaded unless the project is of the declared compatible provider type. This gives the feature safe access to functionality that is specific to the concrete implementation without first undergoing a dynamic discovery operation.

System.Object
  Microsoft.Data.Schema.Extensibility.DatabaseSchemaProvider
    Microsoft.Data.Schema.Sql.SqlDsp.SqlDatabaseSchemaProvider

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: