Tell Me Glossary
 

Objects as Documents

Previous previous|next Next Page

In the SQL connector framework, the concept of a document can be extended to cover objects stored in databases. Each object can be considered as a document and the attributes of the object can be modeled as attributes of the document.

Consider a sales system where the sales records or objects are stored in a database.

Each sales object can then be modeled as a document.

Consider this example:

SELECT
'Sale ID: ' + SALE_ID + 'Customer: ' + CUSTOMER + 'Objective: ' + OBJECTIVE + 'Status: ' + STATUS CONTENT, P.NAME, REGION, ESTIMATE
FROM
SALES, SALES_PERSON P
WHERE
SALES.PERSON_ID = P.ID

Note that the document CONTENT is formed using appropriate attributes of the object. The remaining attributes can be indexed as attributes of the document.