18.01.2015 Views

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

Content Management Interoperability Services (CMIS) Version 1.1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.<strong>1.1</strong>4 Query<br />

<strong>CMIS</strong> provides a type-based query service for discovering objects that match specified criteria, by defining<br />

a read-only projection of the <strong>CMIS</strong> data model into a relational view.<br />

Through this relational view, queries may be performed via a simplified SQL SELECT statement. This<br />

query language is based on a subset of the SQL-92 grammar (ISO/IEC 9075: 1992 – Database Language<br />

SQL), with a few extensions to enhance its filtering capability for the <strong>CMIS</strong> data model, such as existential<br />

quantification for multi-valued property, full-text search, and folder membership. Other statements of the<br />

SQL language are not adopted by <strong>CMIS</strong>. The semantics of this query language is defined by the SQL-92<br />

standard, plus the extensions, in conjunction with the model mapping defined by <strong>CMIS</strong>'s relational view.<br />

<strong>CMIS</strong> Query<br />

Syntax<br />

SQL-92 subset + Extensions for<br />

• Multi-valued properties<br />

• Fulltext search<br />

• Folder membership<br />

Semantics<br />

SQL-92 subset<br />

+ Extensions<br />

+ Relational View mapping<br />

Table (è Object Type, Type Inheritance)<br />

Row (è Object)<br />

Column (è Property)<br />

Relational View<br />

<strong>CMIS</strong> Data Model<br />

Object Type, Type Inheritance, Object,<br />

Property, <strong>Content</strong> Stream, <strong>Version</strong>ing<br />

Figure 2.4: <strong>CMIS</strong> Query<br />

2.<strong>1.1</strong>4.1 Relational View Projection of the <strong>CMIS</strong> Data Model<br />

The relational view of a <strong>CMIS</strong> repository consists of a collection of virtual tables that are defined on top of<br />

the <strong>CMIS</strong> data model. This relational view is used for query purposes only.<br />

In this relational view a virtual table is implicitly defined for each queryable object-type defined in the repository.<br />

(Non-queryable object-types are NOT exposed through this relational view.)<br />

In each virtual table, a virtual column is implicitly defined for each property defined in the object-type definition<br />

AND for all properties defined on ANY ancestor-type of the object-type but NOT defined in the object-type<br />

definition. Virtual columns for properties defined on ancestor-types of the object-type but NOT defined in<br />

the object-Type definition MUST contain the SQL NULL value. Virtual columns for properties whose value<br />

is "not set" MUST contain the SQL NULL value.<br />

An object-type's queryName attribute is used as the table name for the corresponding virtual table, and a<br />

property's queryName attribute is used as the column name for the corresponding table column. Please<br />

see the restrictions on queryName in section 2.1.2.1.3 Query Names.<br />

The virtual column for a multi-valued property MUST contain a single list value that includes all values of<br />

the property.<br />

2.<strong>1.1</strong>4.<strong>1.1</strong> Object-Type Hierarchy in the Relational View Projection<br />

The relational view projection of the <strong>CMIS</strong> Data Model ensures that the virtual table for a particular objecttype<br />

is a complete super-set of the virtual table for any and all of its ancestor types.<br />

<strong>CMIS</strong>-v<strong>1.1</strong>-csprd01<br />

Standards Track Work Product<br />

Copyright © OASIS Open 2012. All Rights Reserved.<br />

18 August 2012<br />

Page 101 of 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!