Content starts here Create Physical Data Services Based on Database Functions
This page last changed on Mar 13, 2008.

eDocs Home > BEA AquaLogic Data Services Platform Documentation > Data Services Developer's Guide > Contents

How To Create Physical Data Services Based on Database Functions

You can create library physical data services based on two types of database functions:

  • Functions that are provide with your database.
  • Custom functions that you have created and stored in your database.
    A library data service created based on database functions is restricted to that type of function. For example, a library function based on a stored procedure cannot be added to a library data service that contains database functions.

The following topics describe how you can create physical data services from database functions:

You can use the the physical data service creation wizard to:

  • Select relational as the Data Source type.
  • Select a data source from available relational sources.
  • Choose a database type. Database types listed would be drawn from the list of available database providers for your data source. By default GenericSQL, the base platform provider, and Pointbase are provided.
  • Select the Database function option.

Setting Up the Physical Data Service Creation Wizard

Physical data services are created using a wizard.

Physical Data Service Creation Wizard

Starting the Wizard

To start the physical data service creation wizard:

  1. Right-click on your dataspace project or any folder in your project.
  2. Choose New > Physical Data Service
Creating a New Physical Data Service

Setting Up the Import Wizard for Relational Objects

When importing a relational object available options include the ability to:

  1. Set a location for your new data service to be saved within your project.
  2. Select a data source from the dropdown listbox.
  3. Select the database type for the selected source (PointBase for the sample RDBMS) from the dropdown listbox.
  4. Select among the relational source types listed in the following table. 
Types of available relational data sources
Relational Type Description
Tables and Views
Displays all public tables and views in the selected data source.
Stored Procedures
Displays all public stored procedures in the selected data source.
SQL Statement
Allows creation of a SQL statement for extracting relational data from the data source.
Database Function
Allows creation of an XQuery function in a library data service based on build-in or custom database functions.
  1. In the Select a Data Source dialog choose Database function.
  2. Click Next. 
Importing Database Function Metadata 

Providing Database Function Details

  1. Select a data source from the dropdown list of data sources available to your server. You should identify a data source that contains the built-in or user-defined database functions you want to access through your data services.
  2. Enter the information necessary to identify your database function.
  3. Complete the function definition including identifying parameters in Source view.
Entering Database Function Information

Database Function Information Dialog Options
Option Action
Comment/Reference
Catalog:
Enter catalog name, if needed by your RDBMS

Schema:
Enter schema name, if needed by your RDBMS  
Package: Enter package name, if needed by your RDBMS   
Function name:
Database function name
Required.
XQuery function
XQuery function name
Required; will invoke the database function.
Public Select, if you want to make your operation public
Default for created XQuery functions is protected.

Click Next
 
Review
Enter library data service name
If the name of an existing library data service is provided.
There is no type checking or other type of verification regarding external function parameters.

Verifying Data Service Composition

On the Review New Data Service(s) page you can set, confirm or, optionally, change suggested data service names depending on the type of physical data service you are creating.

Default Physical Data Service Names 

The nominated name for a new data service is, wherever possible, the same as the source object name. In some cases, however, names are adjusted to conform with XML naming conventions.

XML Name Conversion Considerations

About Automatic Data Service Name Changes

Name conflicts occur when there is a data service of the same name present in the target directory. Name conflicts are highlighted in red.

There are several situations where you will need to change the name of your data service:

  • There already is a data service of the same name in your application.
  • You are trying to create multiple data services with the same name.

Data services always have the file extension:

.ds
Document generated by Confluence on Apr 28, 2008 15:54