Business Data Catalog in Microsoft Office SharePoint Server 2007: Architecture and Schemas, Page 2
The BDC does not copy the data from the business application, but captures the data directly each time it needs to be displayed. To avoid delays in rendering the data, SharePoint uses a software caching mechanism that is refreshed each minute: If the data has been changed, the cache is deleted and refilled; the consequence is that rapidly changing data is restricted to one-minute snapshots. As a counterbalance, by utilizing the BDC Object Model, the caching of parts of the BDC can be shut down programmatically, permitting no-caching and accelerating the data display (for fast-changing systems) or releasing server resources (for never-changing systems).
Creation of a BDC
No specialized skills or knowledge of programming are required to design a BDC definition; a basic knowledge of XML is all that is needed. The definition consists of a XML (ASCII) file that can be constructed with almost any standard program, including Notepad-like software. Likewise, no compilation is necessary and the registration in SharePoint can be done by using the system's user interface. Although no programming knowledge is essential, a firm grasp of the back-end structure and an awareness of business requirements is indispensable: To illustrate relevant information, the BDC designer needs to totally understand the construction of the LOB system.
To illustrate this point, a Business Data Catalog will be defined for a simple DataBase of a hypothetical zoo. The schema of the DataBase is displayed in Figure 2 and consists of two linked tables (one for the animals and another of their perceived danger to humans).
Figure 3: DataBase schema for the sample BDC
The principal parts of the metadata schema include the following:
The LobSystem describes the data source and is an obligatory element of the XML file. One LobSystem object contains at least one instance, but if it is necessary to define different systems, more than one instance is allowed. The properties of the LobSystemInstance define the data provider as well as the connection configuration and security for the LOB system to be used. The LobSystem and LobSystemInstance in the sample are as follows:
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.microsoft.com/office/ 2006/03/BusinessDataCatalog BDCMetadata.XSD" xmlns="http://schemas.microsoft.com/office/2006/03/ BusinessDataCatalog" Type="Database"/p> Version="220.127.116.11" Name="MyZooLOBSystem"> <Properties> <Property Name="WildcardCharacter" Type="System.String">% </Property> </Properties> <LobSystemInstances> <LobSystemInstance Name="MyZooInstance"> <Properties> <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server. ApplicationRegistry.SystemSpecific.Db. DbAccessProvider">SqlServer</Property> <Property Name="AuthenticationMode" Type="Microsoft.Office.Server. ApplicationRegistry.SystemSpecific.Db. DbAuthenticationMode">PassThrough </Property> <Property Name="RdbConnection Data Source" Type="System.String">SQLServerName</Property> <Property Name="RdbConnection Initial Catalog" Type="System.String">MyZoo</Property> <Property Name="RdbConnection Integrated Security" Type="System.String">SSPI</Property> <Property Name="RdbConnection Pooling" Type="System.String">false</Property> </Properties> </LobSystemInstance> </LobSystemInstances>
An Entity is an element of the process. An Entity consists of Identifier, Methods and Actions. In the example, there is only one Entity ("AnimalsEntity"), and the Identifier identifies the DataBase key field (type and name) for the BDC. The following is a possibility:
<Entities> <Entity EstimatedInstanceCount="0" Name="AnimalsEntity"> <Identifiers> <Identifier Name="AnimalID" TypeName="System.Int32" /> </Identifiers>
Page 2 of 5