inset
Catalog Links SharePoint Server to Business Data
Mar. 26, 2007

The Business Data Catalog (BDC), a new component of SharePoint Server 2007, acts as a bridge between the Web portal and back-end databases and business applications, such as customer relationship or enterprise resource planning systems. The BDC has the potential to make information in databases and business applications more easily accessible. However, the BDC is in many ways an immature solution—incomplete documentation and a lack of developer tools make it difficult to create and debug systems.

Business Data in SharePoint

The BDC stores information needed by SharePoint Server to retrieve data from back-end systems, such as databases and business applications. SharePoint can display that data in a Web browser through a number of prebuilt Web Parts (user-configurable components that allow Web pages to be easily customized) as well as through SharePoint's enterprise search capabilities. For example, once the BDC is configured to access an accounting and billing application, users can create Web pages that display up-to-date account information. (For an illustration of how the BDC connects SharePoint Server to back-end systems, see "BDC Architecture".)

SharePoint Server 2007's predecessors gave developers a number of ways to create sites that displayed data from back-end systems, but all required developers to write custom code to communicate with each system. The BDC simplifies this by providing a consistent API that any Web Part can use to access data from any supported database or application. Once the BDC is configured to communicate with a data source, data from that source can appear in multiple places via the BDC Web Parts with no further coding.

Connecting to Databases and Applications

The BDC can connect to databases via ADO.NET (the data access library that is part of the .NET Framework) and to applications that expose their functionality via Web services. In either case, a developer creates an XML description, or metadata, that instructs SharePoint how to retrieve the information. Metadata define types of information, or entities, to be retrieved from a database or Web service. A sales tracking database, for example, might contain information on products, customers, and sales orders; the developer would define BDC metadata for retrieving each of those three entity types from the database. It's important to note that the BDC neither stores any application data nor processes any queries itself. Rather, it delegates the processing of the request to the back-end database or application.

The metadata to access a database via ADO.NET contains, among other information, the type of information to be retrieved, the name of the database server, which ADO.NET provider to use, and the text of the SQL query used to retrieve the information. The metadata to connect the BDC to a sales tracking database, for instance, would include SQL queries to return lists of products, customers, and sales orders.

Web services are configured in a similar fashion, although the specific information stored in the metadata differs. Rather than containing SQL queries, the metadata for Web services contain URLs to access the entities. SharePoint Server 2007 and the BDC use the Simple Object Access Protocol (SOAP) to access back-end applications (rather than the Windows Communication Framework) and do not support the advanced WS-* Web services protocols. As a result, the BDC can't take advantage of the reliability and security improvements those technologies provide over generic SOAP.

Presenting Data to Users

Once a developer has configured the BDC to communicate with an application or database, data from that source can appear in a number of places within SharePoint Server.

Web Parts. Built-in Web Parts allow SharePoint Server 2007 to display information from the BDC without requiring custom code. For example, a business analyst can use SharePoint's drag-and-drop design tools to create a site that displays a list of customers or orders matching some defined criteria. (For an example, see the illustration "Displaying Business Data in SharePoint".)

SharePoint lists. Information from the BDC can also appear in SharePoint lists, such as those used in document libraries. For example, an organization may have a SharePoint library that contains requests for proposal (RFPs) in Word document format and that displays a list of the documents along with information about those documents, such as the name of the company submitting the RFP. With the BDC, SharePoint can augment that information with data from business applications systems, such as the total annual revenue associated with each company that submitted an RFP.

Actions. The BDC lets developers specify how information in the back-end system is to be updated, albeit in a primitive fashion. Each entity can have an action associated with it, a URL that will take the user to a site where the user can update the entity. For example, a user could select an action that takes him to a form in a Web application for updating customer information. Most database sources, however, don't provide a built-in Web interface for modifying database records, and the BDC doesn't provide a way to update them directly. (This "action" method of updating is similar to the method used to drill down for more information in SQL Server Analysis Services.)

Search. The BDC can connect information in back-end systems to SharePoint's enterprise search capability if a developer creates a special form of metadata that gives SharePoint the ability to enumerate all of the entities in the application (e.g., crawling all customers in a sales database). SharePoint's full-text search indexing system will then periodically examine all entities in the data source and update its search catalog.

Interesting, but Immature

The BDC is a major new component and has the potential to make information in databases and business applications more visible in portals. But it is also clearly a "1.0" version and has several weaknesses that may cause some organizations to wait.

Documentation Not Complete

Despite having shipped with Office 2007 in November 2006, the product shows signs of having been rushed. As of this writing, the developer documentation is still incomplete and carries a note saying: "This SDK release contains most of the highest-priority documentation for developing solutions on Office SharePoint Server 2007. Some of the SDK topics are more or less complete than others—the intent is to provide as much information as is currently available. The subsequent release of this SDK will contain more documentation. You should periodically check for SDK updates and technical articles on MSDN."

Incomplete documentation leaves developers having to "periodically" check for updates, but it's unclear exactly how often a developer should check, and as helpful as technical articles or blog postings may be, they are no substitute for complete documentation.

Coding in XML, No Debugging

The BDC requires that developers write XML metadata, but SharePoint Server (like some other recent Microsoft products, such as Office 2007's new Ribbon user interface) lacks any tools to do so—developers must author XML data by hand. Microsoft suggests that developers use Visual Studio to author XML because that product includes a text editor that provides statement completion—a feature that allows a developer to begin typing an XML tag and have the editor provide a list of suggestions based on the context. But even with statement completion, authoring XML in a text editor is no substitute for a graphical tool designed specifically for the task: developers must still have a thorough understanding of XML, the XML schema description language, the XML schema for BDC metadata, and the specific schema of the target business application or database.

The type of XML used by the BDC is particularly difficult because it often contains islands of code written in another language: the SQL query language. Because certain characters used in the SQL language have a different meaning in XML, they must be represented through cumbersome XML "escape sequences." For example, the commonly used greater-than and less-than symbols (">" and "<", respectively) must be entered as "&gt" and "&lt", making it impossible to use Visual Studio's query designer to build a query, then copy and paste the resulting SQL code into the XML.

In addition to lacking design tools, SharePoint provides no way to debug solutions built around the BDC. Because of this limitation, developers must author metadata very carefully, adding entities to the BDC one at a time and carefully testing each to make sure they work properly before moving on to the next.

Resources

The home page for SharePoint Server 2007 is www.microsoft.com/sharePoint/default.mspx.

New IT and administrative features of SharePoint 2007 are discussed in "SharePoint 2007 Tweaks Portals, Administration" on page 3 of the Apr. 2007 Update.

SharePoint 2007's document management features are described in "Document Management with SharePoint Server 2007" on page 12 of the Feb. 2007 Update.

Updates to SharePoint's search capabilities are described in "SharePoint 2007 Improves Enterprise Search" on page 8 of the Mar. 2007 Update.