|
1 |
|
2 Introduction |
|
3 ------------ |
|
4 |
|
5 Goals of RQL |
|
6 ~~~~~~~~~~~~ |
|
7 |
|
8 The goal is to have a language emphasizing the way of browsing |
|
9 relations. As such, attributes will be regarded as cases of |
|
10 special relations (in terms of implementation, the language |
|
11 user should see virtually no difference between an attribute and a |
|
12 relation). |
|
13 |
|
14 RQL is inspired by SQL but is the highest level. A knowledge of the |
|
15 `CubicWeb` schema defining the application is necessary. |
|
16 |
|
17 Comparison with existing languages |
|
18 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
19 |
|
20 SQL |
|
21 ``` |
|
22 RQL builds on the features of SQL but is at a higher level |
|
23 (the current implementation of RQL generates SQL). For that it is limited |
|
24 to the way of browsing relations and introduces variables. |
|
25 The user does not need to know the model underlying SQL, but the `CubicWeb` |
|
26 schema defining the application. |
|
27 |
|
28 Versa |
|
29 ````` |
|
30 We should look in more detail, but here are already some ideas for |
|
31 the moment ... Versa_ is the language most similar to what we wanted |
|
32 to do, but the model underlying data being RDF, there is some |
|
33 number of things such as namespaces or handling of the RDF types which |
|
34 does not interest us. On the functionality level, Versa_ is very comprehensive |
|
35 including through many functions of conversion and basic types manipulation, |
|
36 which may need to be guided at one time or another. |
|
37 Finally, the syntax is a little esoteric. |
|
38 |
|
39 Sparql |
|
40 `````` |
|
41 The query language most similar to RQL is SPARQL_, defined by the W3C to serve |
|
42 for the semantic web. |
|
43 |
|
44 |
|
45 The different types of queries |
|
46 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
47 |
|
48 Search (`Any`) |
|
49 Extract entities and attributes of entities. |
|
50 |
|
51 Insert entities (`INSERT`) |
|
52 Insert new entities or relations in the database. |
|
53 It can also directly create relationships for the newly created entities. |
|
54 |
|
55 Update entities, create relations (`SET`) |
|
56 Update existing entities in the database, |
|
57 or create relations between existing entities. |
|
58 |
|
59 Delete entities or relationship (`DELETE`) |
|
60 Remove entities or relations existing in the database. |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 .. _Versa: http://uche.ogbuji.net/tech/rdf/versa/ |
|
66 .. _SPARQL: http://www.w3.org/TR/rdf-sparql-query/ |