SDS-2024-0077-TR-0070_0_0_1_baseline
Compare changes
- Andreas Kraft authored
+ 191
− 36
@@ -4,10 +4,10 @@
@@ -65,32 +65,23 @@ NO REPRESENTATION OR WARRANTY IS MADE THAT THE INFORMATION IS TECHNICALLY ACCURA
@@ -136,45 +127,209 @@ For the purposes of the present document, the [following] symbols [given in ...
The current method for providing filters and queries in oneM2M requests is currently done by providing **_FILTER CRITERIA_** in a request. This is a complex attribute that contains a structure of matching conditions attributes and filter handling attributes that can be applied for certain RETRIEVE and DISCOVERY operations. The detailed description and the applicability is specified in TS-0001, clause 8.1.2 and table 8.1.2-2.
The *matching conditions* is a set of attributes that specify for some common and universal resource attributes matching (or comparison) a value and the kind of comparison that should be applied if present. For example, the value of the *createdBefore* attribute is compared against the *creationTime* attribute during matching, and it will be matched if a resource's *createdTime* attribute is before the timestamp specified in *createdBefore*. Through the specific nature of the attributes it is possible to compare against the respective attributes in resources not only for equality, but also for smaller, larger, before, after, etc.
It is possible to add multiple queries and to logical combine them with setting the *filterOperations* **_FILTER CRITERIA_** attribute. This attribute specifies the logical operator that is used for all the given filter expressions. No sub-queries are allowed, eg. to mix different boolean operations. Negation of query results is also not possible.
Semantic queries are different from the filter method described in clause [5.1](#51-current-method-of-filtering-in-onem2m). The filtering methods described in that clause are part of the request handling. A result set of resources or references is created or filtered afterwards according to the given configuration in the **_FILTER CRITERIA_** request attribute.
For semantic discovery and query two different methods are defined that use semantic service components to compute the result set according not only by just comparing queries and values, but by deriving explicit and implicit information from the semantic information that are provided together with the resources as well as from external information that are semantically referenced.
Resources may have child resources of type <semanticDescriptor>, which contain additional semantic information that may describe resource resp. the data contained in that resource further. For example, the data from a temperature sensor may be annotated this way to explain that data producing device is a thermostat used indoor in an industrial context, and that the data is in degree Celsius.
- A *semantic query* is used to send and process a semantic expression by the semantic service component of the CSE. It may use all the available semantic information from the resources in the resource tree. The result, however, is not a set of resources or resource references, but a semantic result string (usually RDF triples).
The current filtering method described in clause [5.1](#51-current-method-of-filtering-in-onem2m) has limitations that is preventing to execute more sophisticated RETRIEVE and DISCOVERY requests in the CSE. This means that an AE that want to make use of this feature needs to implement them itself, which in case of a restricted device is not always easy or even possible.
In addition to the queries and filters provided in requests some resources also use a similar method to perform their tasks. The <action> and <dependency> resources provide a simple method to react on changes in other resources without going through an application entity to perform the necessary requests. Both resource types have attributes that contain an evaluation criteria that is used for the comparison as soon as an update happens to a target resource. This is sufficient for simple scenarios, more sophisticated scenarios, for example evaluating multiple or complex attributes is not possible.
An application entity needs to store extra meta tags in a resource, e.g. the IMEI number of the hosting devices, and other tags. For this, the application entity uses the *label* attribute. Another application entity that wants to retrieve resources by the IMEI number wants to query for these resources by only the single tag in the *label* attribute.
Data query languages are syntaxes designed specifically for querying and retrieving data from databases or data repositories. These query languages provide a simplified way to interact with data, making it easier for applications to retrieve the information they need. Here is a short summary of relevant data query languages:
1. **SQL (Structured Query Language)**: SQL is the most widely used query language for relational databases. It allows users to retrieve, manipulate, and manage data stored in tables. SQL uses a declarative approach, where applications specify what data they want to retrieve rather than how to retrieve it. SQL supports various operations like SELECT, INSERT, UPDATE, and DELETE, enabling users to perform complex queries and aggregations on structured data. Relevant for filtering is the WHERE clause where filter expressions resp. query statements can be formulated.
2. **XQuery**: XQuery is a query language specifically designed for querying XML (eXtensible Markup Language) data. It allows users to extract and manipulate data from XML documents using a variety of query and transformation capabilities. XQuery supports XPath, a language for navigating XML structures, making it suitable for querying and transforming complex XML data. ==examples==
3. **JSON Query** (also known as JSONPath) is a syntax used to query and extract specific data from JSON documents provides a way to navigate through the hierarchical structure of JSON data and select elements based on specific criteria. It uses a path-like syntax to traverse the JSON structure and select elements or values.
These simple data query languages provide efficient and straightforward methods for retrieving and manipulating data from databases or data sources. They offer different syntaxes and capabilities tailored to specific data formats and use cases, simplifying data retrieval and empowering users to work with data more effectively.
<mark>Notwithstanding the provisions of the copyright clause related to the text of the present document, oneM2M grants that users of the present document may freely reproduce the <proformatype> proforma in this {clause|annex} so that it can be used for its intended purposes and may further publish the completed <proformatype>.</mark>