Introduction To DQL -Documentum Query Language
2005-06-21 by Dayana Susmi George
DQL is the language used to query Documentum, which is a content management system used to create, manage, deliver, and archive all types of content from text documents and spreadsheets to digital images, HTML, and XML components.
Contents
• Define DQL
• Behind the scenes
• Describe a SELECT statement
• Describe how search conditions are specified in a WHERE clause
• Using DQL to search a specific cabinet/folder location
• Describe the DQL REGISTER statement
DQL (Documentum Query Language) is a query language which allows you to do very complex queries involving:
1. Property searches
2. Searches for words and phrases within documents
3. Other specialized searching capabilities added for document and content management
DQL uses syntax that is a superset of ANSI-standard SQL (Structured Query Language)
• In fact, part of your DQL statements are translated automatically into SQL before being executed by the eContent Server
Behind the Scenes
• A DQL query is sent to the eContent Server using one of four API methods readquery, execquery, query, or cachequery
• A DQL engine on eContent Server generates
- SQL queries for the RDBMS
- Verity queries for the full-text search engine
The results of the query are stored on the server in a non-persistent collection object. Typically, a Documentum client will automatically present the results of the query to the user in some useful way.
Alternatively, a Developer may want to use the resulting collection object or manipulate the results programmatically.
Basic Select Statement
Select (list the properties you want returned)
>From (list the type of objects you want searched)
Using WHERE clause
Allows the search to be narrowed by imposing search conditions on your Query
select [all | distinct] value [as name] {,value [as name] } from
source_list [(all)]
...
[where qualification ]
Eg : SELECT object_name, title FROM dm_document WHERE FOLDER
(ID('0b9af3ce800001ff')) AND title LIKE '%SOP%'
Searching folders and cabinets
The scope of the search can be specified as folder and cabinet in the where clause to provide a way to search the cabinet/folder hierarchy.
Eg : select object_name from dm_document where folder('/Sales')
REGISTER statement
• Registers an RDBMS table so the eContent Server can "see" it
• Allows access to data in an existing RDBMS table that may be
- created to support additional application data
- part of another application
- owned by someone else
• Does not verify that the table or its columns exist
• All columns in a table need not be registered
• Creates a dm_registered object in the System cabinet which provides a description of the table and user access to it
REGISTER permissions
• Only the Docbase owner with a SUPERUSER privilege can register a table from within Documentum.
• To register a table, you must have at least READ permission on the table (through the RDBMS grant command).
• The eContent Server account (installation owner) needs the appropriate RDBMS privileges on the table to perform different operations on rows in the table.