SQL Support Reference for Siebel
This topic describes SQL support for Siebel, and for Siebel Multi-Valued Groups, which manage data relationships.
| • | Understanding Siebel Resources |
| • | Siebel Multi-Valued Groups |
Understanding Siebel Resources
TDV integrates with Siebel at the level of data objects and services. In Siebel, objects and services are called Business Components and Business Services, respectively. The Siebel Adapter enables Siebel Business Components and Business Services to be used as fully SQL-92-compliant relational data sources.
|
Topic |
Description of what the topic covers |
|
describes the list of Business Components and Business Services, allows the user to select them and translates the Siebel metadata into relational tables that TDV understands. |
|
|
describes how a SQL statement is divided among Siebel TDV and other data sources that might be referenced in the query. |
|
|
describes how joins can affect query performance, and discusses options for improving performance. |
|
|
describes how some SQL queries using time stamp operations might need to be modified for use with TDV. |
Siebel Resources within TDV
The following sections describe how Siebel resources work within TDV:
| • | Resource Hierarchy |
| • | Metadata Mapping |
Resource Hierarchy
The Siebel Adapter provides Siebel Business Components and Business Services as resources in TDV. Business Components are introspected by starting with the folder named “Business Objects” and drilling down into a two-level hierarchy of folders. The first level is the Business Object, which is a grouping of Business Components. If you are not sure which Business Object contains the Business Component you need, you can use Siebel Tools to find it.
Introspection automatically includes these system fields for Business Components: Created, Created By, Updated, and Updated By.
Business Services are introspected starting with the folder named “Business Services” and drilling down into a two-level hierarchy of folders. The first level is Business Service, which contains a collection of Business Service Methods.
Metadata Mapping
When introspecting Business Components, each field of the Business Component becomes a column in TDV with the same name. When introspecting Business Services, each parameter of the Business Service Method becomes a parameter in the TDV procedure with the same name. In both cases, data types in Siebel are mapped to TDV SQL-based types. The following table lists the Siebel data types, whether they are supported in TDV, and their corresponding TDV type.
|
Siebel Data Type Name |
Supported? |
TDV Data Type |
|
TEXT, ID, PHONE, NOTE, BOOL |
Yes |
VARCHAR. If length is undefined in Siebel, it defaults to 255. |
|
INTEGER |
Yes |
BIGINT |
|
NUMBER, CURRENCY |
Yes |
DOUBLE |
|
DATE |
Yes |
DATE |
|
TIME |
Yes |
TIME |
|
UTCDATETIME |
Yes |
TIMESTAMP |
|
Link Specification |
Yes |
Inherits type of linked business component. |
|
Multi-valued Field |
Yes |
Inherits type of associated business component. |
|
String |
Yes |
VARCHAR(65536) |
|
Integration Object |
Yes |
XML |
Some field definitions, particularly link specifications, contain no type information in Siebel. TDV considers untyped fields to be VARCHAR(255). The data types of multi-valued and link specification fields are obtained from their associated Business Components, and MULTI_VALUED or LINK_SPECIFICATION is appended to native type names.
Supported Capabilities
Capabilities characterize the features and limitations of data sources. For example, an Oracle data source can execute subqueries, while Siebel cannot. Capabilities are consulted when a query is processed so that data sources receive only the query processing work they support; otherwise, TDV performs the work itself.
The following table lists commonly used capabilities and whether they are supported in queries against Siebel Business Components. Pushed indicates whether query processing can be passed to Siebel. For efficient queries, minimize use of non-push capabilities.
|
Capability |
Supported? |
Pushed? |
Notes |
|
CASE |
Yes |
No |
|
|
DELETE |
Yes |
Yes |
Special behavior for multi-valued groups. |
|
DISTINCT |
Yes |
No |
|
|
Filter |
Yes |
Yes |
|
|
Filter - LIKE |
Yes |
Yes |
|
|
Filter – BETWEEN |
Yes |
Yes |
|
|
Filter – IN |
Yes |
Yes |
|
|
Functions – Aggregate |
Yes |
No |
|
|
Functions – CAST |
Yes |
Yes |
|
|
Functions – Others |
Yes |
No |
|
|
GROUP BY |
Yes |
No |
|
|
INSERT |
Yes |
Yes |
Special behavior for multi-valued groups. |
|
Join |
Yes |
No |
|
|
ORDER BY |
Yes |
Yes |
|
|
Subquery |
Yes |
No |
|
|
Transactions |
No |
No |
|
|
UNION |
Yes |
No |
|
|
UPDATE |
Yes |
Yes |
Special behavior for multi-valued groups. |
Joins and Query Performance
Joins cannot be pushed to Siebel. Executing joins in TDV can degrade performance, because a table scan would be required to fetch every row of the joined tables. The technology that TDV uses to connect with Siebel is not optimized for large data sets, so table scans should be avoided. It is better to use filters on queries to Siebel Business Components.
A semijoin is the best way to reduce the number of Siebel rows retrieved and processed. To force a semijoin to occur in a query, add the option immediately before the table to be joined. For example:
SELECT * FROM A INNER {OPTION SEMIJOIN} JOIN B ON A.K = B.K
Values of A.K are collected and passed in a query to B as the filter:
SELECT * FROM A
SELECT * FROM B WHERE K IN ({values_of_X.K_from_previous_queryy})
If A has many rows, queries against B can be lengthy. TDV automatically partitions them and reassembles the results into a unified set.
Put the table that returns the larger number of rows on the right side of the join whenever possible. When running a new query for the first time, activate the Execution Plan tab in Studio and click Execute and Show Statistics. Examine each node’s row count and query after processing has begun to make sure filters are pushed down to Siebel. This is a good way to see the mechanics of a semijoin in action. If the interaction between TDV and Siebel is still unclear and performance is poor, enable debug logging for the adapter as described in the TDV Installation and Upgrade Guide.
Timestamp Operations
Some Siebel time stamp operations might need to be modified due to TDV’s more stringent time stamp requirements. For example, you might have this Siebel time stamp operation:
WHERE Service_Request."Opened Date" = date '2015-11-02'
You must change this to:
WHERE Service_Request."Opened Date" BETWEEN date '2015-11-02' AND date '2015-11-03'