0% found this document useful (0 votes)
368 views

Query by Example: EAI Siebel Adapter

Query by Example (QBE) allows users to query for data by providing an example record as a search criteria, rather than requiring users to know a formal query language. With QBE, the user populates fields in an Integration Object (IO) instance with example values, and the EAI Siebel Adapter uses the populated fields as a dynamic search specification to query for matching records. It is important when using QBE that all example fields provided have valid values, as empty fields could return unintended results by being included in the search criteria.

Uploaded by

Snehal Bhujbal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
368 views

Query by Example: EAI Siebel Adapter

Query by Example (QBE) allows users to query for data by providing an example record as a search criteria, rather than requiring users to know a formal query language. With QBE, the user populates fields in an Integration Object (IO) instance with example values, and the EAI Siebel Adapter uses the populated fields as a dynamic search specification to query for matching records. It is important when using QBE that all example fields provided have valid values, as empty fields could return unintended results by being included in the search criteria.

Uploaded by

Snehal Bhujbal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Query by Example (QBE) is a method of query creation that allows the user to search for documents based on an example

in the

form of a selected text string or in the form of a document name or a list of documents. Because the QBE system formulates the

actual query, QBE is easier to learn than formal query languages, such as the standard Structured Query Language (SQL), while

still enabling powerful searches.

To conduct a search for similar documents based on matching text, the user enters or copies selected text into the form search field.

This is then passed to the QBE parser for processing. A query is created using the relevant words (common words such as "and,"

"is" and "the" are ignored by default) and a search is carried out for documents containing them. Because the meaning of the

selected text is less precise than a formal query, results may be more variable than those in a formal query entry.

To conduct a search for similar documents based on full document text, the user submits documents or lists of documents to the

QBE results template. The QBE parser performs an analysis of these and formulates a query to submit to the search engine, which

in turn conducts a search for similar material.

In terms of database management system, QBE can be thought of as a "fill-in-the blanks" method of query creation. The Microsoft

Access Query Design Grid is an example. To conduct a search for field data matching particular conditions, the user enters criteria

into the form, creating search conditions for as many fields as desired. A query is automatically generated to search the database for

matching data

Query by Example: EAI Siebel Adapter


Category- EAI

Alright, to those who already know what is meant by ‘Query by Example’- Kudos!
To those who do not know ‘Query by Example’, not to worry. Read on...

Query by Example or as it is known by its popular acronym- QBE is one of the ways by which we can query data using the
‘EAI Siebel Adapter’ vanilla Business Service.

Details:
Method: Query
BS: EAI Siebel Adapter

Input Arguments:
VF Siebel Message (this will hold the IO instance or the Siebel Message which will be used for query the data)
OutputIntObjectName (this is the IO name which acts as a container for output data)

Output Argument:
SiebelMessage (this is the queried data in the format of the output IO defined in the input and can be stored in a custom
hierarchical property set)

Now,
Let’s disintegrate the ‘Query by Example’ and understand it word by word.
‘Query’: This essentially means that a query needs to be carried out. Now since ‘EAI Siebel Adapter’ is being used for the
query purpose then obviously this query will involve an IO (Integration Object).
But wait- what’s the search criteria?
In normal situations, when we use this ‘Query’ method of ‘EAI Siebel Adapter’ we either provide the search spec in
the ‘SearchSpec’ input or we give it in ‘Primary Row Id’ input, but these are used when we exactly know what the search
spec would be. But what would anyone do if the search spec is dynamic…?

‘by’: Are you kidding me!?

‘Example’: This is where the dynamism of the search spec of the ‘Query’ method comes into play. With the help of an IO
instance (Siebel Message), we instruct the ‘EAI Siebel Adapter’ to query by the ‘Example’ we gave in the input.

To implement the QBE, we give a Siebel Message in the input with certain fields populated with the data that needs to be
used for searching the data. Like say for example, there is a Query webservice implemented and you want to give the
freedom to the user to query on any field of the exposed IO. You then use the QBE approach and ask the user to populate
the fields of the IO in the Request XML.

< soapenv:Body >


< ExposedMethodname >
< ListOfIO >
< Account >
< Location >48884458M
< PrimaryContactWorkPhone >
600000000< / PrimaryContactWorkPhone >
< / Account >
< / ListOfIO >
< / ExposedMethodname >
< / soapenv:Body >

Here the search spec would include Location= 48884458M and PrimaryContactWorkPhone = 600000000

Got it?
Ok, so now the caution!
Since by now you know that in QBE, the populated fields become the search spec, therefore it is very (very very) important
to no give blank fields in the request XML. Why?

Because they also start participating in the search spec and produces undesirable results.
i.e. say in the above example, if I had added one more field with a blank value:
< Name >< / Name >

Then Name= ' ' will be appended in the search spec and will definitely bring about undesirable output record set and the
search expression will become as:
Location= ‘48884458M’ and PrimaryContactWorkPhone = ‘600000000’ and Name = ' '
I hope the message got through!

You might also like