- Artificial Intelligence for Big Data
- Anand Deshpande Manish Kumar
- 277字
- 2021-06-25 21:57:11
Additional SPARQL features
The additional SPARQL features are as follows:
- Optional matching: Unlike traditional relational data stores, where the database schemas and constraints are predefined for the structured representation of data, in the big data word we deal with unstructured datasets. The attributes of the two resources of the same type may be different. Optional matching comes in handy when handling heterogeneous representations of the entities. The OPTIONAL block is used to select the data elements if they exist.
- Alternative matching: Once again, considering the unstructured nature of knowledge assets, alternating matching provides a mechanism to return whichever properties are available.
- UNION: This is in contrast to the OPTIONAL pattern. In the case of UNION, at least one of the datasets must find a match given the query criteria.
- DISTINCT: This is the equivalent of the DISTINCT SQL clause, which excludes multiple occurrences of the same triple within the result.
- ORDER BY: Instructs the query to sequence results by a specific variable either in ascending or descending order. This is also equivalent to ORDER BY clause in SQL.
- FILTERS and regular expressions: SPARQL provides features to restrict the result set triples by using expressions. Along with mathematical and logical expressions, SPARQL allows for the use of regular expressions to apply filters on datasets based on textual patterns.
- GROUP BY: This allows the grouping of the resulting RDF triples based on one or more variables.
- HAVING: This facilitates a selection of the query results at the group level.
- SUM, COUNT, AVG, MIN, MAX, and so on are the functions available to be applied at the group level.