Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 2007

Introducing the Business Data Catalog

Exploit key business data via MOSS 2007
RSS
Subscribe to Windows IT Pro | See More Business Intelligence Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Microsoft Office SharePoint Server (MOSS) 2007 provides a service called the Business Data Catalog (BDC). The primary purpose of the BDC is to unlock and expose data held in back-end line of business (LOB) applications so that people, processes, and other information can easily and seamlessly link to that data. As long as someone (typically a developer) has a solid understanding of the data, the BDC can make that data pervasive throughout the MOSS platform. In this article I look at the architecture of the BDC and, by way of an example, reveal its power.

The Business Data Catalog
As its name suggests, the BDC is a catalog of business data. As such, it doesn't physically store business data. Think of a shopping catalog that you've recently viewed. What does it contain? That's right—descriptions of items that you can then physically go retrieve. So the BDC is a metadata-driven connector that describes the data, describes how to connect and retrieve that data, and physically retrieves the data on request. The data remains in the back-end application, with the BDC acting as a read-only conduit to it. It will cache some data and some data is physically copied into SharePoint but you need to find another vehicle if you want to write to the back-end data.

You can use multiple vehicles to access the data described in the BDC. Out-of-the-box, MOSS lets you access the data through Web Parts, columns in lists and libraries, fields in user profiles, and via search results. And, of course, if you do want to write some code, you can harness the BDC for custom purposes as well. But, as we will see, you can do very powerful things without lifting one coding finger. Figure 1 shows the logical architecture of the BDC.

Describing Data: The Application Definition File
I make it sound so simple by saying you don't need to write any code, don't I? Although this is true, you do need to do some groundwork to describe the data, and this will take effort on the part of the business application owner and someone from IT who's knowledgeable about the physical storage of the data and possible access methods. The application owner will describe the purpose of the data and how it's linked to meet a particular business requirement. The IT person will then create an application definition file (ADF), an XML file that describes the data, and load the file into the BDC.

The BDC supports two data access methods—direct calls to most popular databases via ADO.NET, OLE DB, and ODBC drivers or calls to application-specific Web services that can gather and return the desired data. Because of space limitations, I'll tackle the Web services method at a later time. In this article, I use a simple database example that will expose the data shown in the two tables that Figure 2 shows, with the end result being a page shown in a standard MOSS team site, as Figure 3 shows. The business purpose of these tables is to list all the movies an actor has appeared in. An analysis of the data shows that the ActorId column links the two tables for such a purpose, with the Actor table being the parent table and the Movie table being the child.

Forget the BDC for a second and imagine the main coding stages you'd need to go through to achieve such a result. First, you'd need to identify and connect to the database with suitable credentials. Next you'd need to open the tables and run some queries that return various rows and columns (e.g., one to gather the parent item and one to link the parent to its child items). So you'd need to define the relationship between the parent and child and the columns that you want returned. Finally, you'd need to format and display the returned data.

The BDC removes the complexity of this process, and the ADF essentially describes how to perform each of these stages except data formatting and display. That step is performed by BDCaware Web Parts, list columns, user profile properties, and search.

The ADF must be well-formed and adhere to the schema defined at C:\Program Files\Microsoft Office Servers\12.0\Bin\bdcmetadata.xsd on a SharePoint Web front-end server. The schema defines connections, entities, methods, filters, actions, and relationships. Let's look at each of these components and the associated XML code that I used to deliver our example. You can download the entire XML metadata file from Windows IT Pro's Web site. (Go to http:// www.windowsitpro.com, enter 96772 in the InstantDoc ID text box, then click Download the Code.)

Connections
The LOBSystemInstance node in Listing 1, defines authentication and connection information such as which database instance to connect to and which catalog to open. (Note that some lines wrap because of space limitations.) From an authentication point of view, the BDC can access the database as a system account or as the calling user.

The code shows that I've defined an instance called SpiesInstance. It accesses a table called Spies in a SQL Server database called dc2\sqlexpress using the credentials of the calling user. The calling user therefore will need permissions to access the data.

Entities
An entity describes an item in the LOB application. The code in Listing 2, defines two items: an actor and a movie. Each entity contains child nodes that define identifiers, methods, filters, and actions. Think of the identifier as the primary key within a database table. It uniquely identifies a particular instance of an entity, which, in our case, are the primary keys called ActorId and MovieId. (Note some sound advice from a badly scarred human being: The XML is case-sensitive so make sure the names match the database columns.)

The properties node defines some characteristics of the entity. The code in Listing 2 shows that the ActorName and MovieName columns will be the default display value that's returned for the entity. It also associates a default action called View Profile that I discuss later.

   Previous  [1]  2  3  Next 


Reader Comments
very good

hongde November 12, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

Microsoft Touts Xbox 360 'Black Friday' Success

Microsoft this week revealed that its Xbox 360 video game console outsold its Sony PlayStation 3 rival 3-to-1 on "Black Friday," which curiously describes the three day weekend after Thanksgiving, a period that unofficially kicks off the holiday selling ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Microsoft BI Unleashed | Online Conference

SQL Server 2008 – Can You Wait? | Philadelphia

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing