]> matita.cs.unibo.it Git - helm.git/blob - mathql/homepage/whatsnew.html
auto => auto new.
[helm.git] / mathql / homepage / whatsnew.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4   <title>MathQL</title>
5                                                                         
6                         
7   <meta http-equiv="content-type"
8  content="text/html; charset=ISO-8859-1">
9                                                        
10   <meta name="author" content="Ferruccio Guidi">
11                                                        
12   <meta name="description" content="MathQL Home Page">
13 </head>
14   <body>
15                           
16 <h1 align="center">MathQL-1</h1>
17                        
18 <h2 align="center">A query language for RDF metadata</h2>
19                            
20 <table cellpadding="10" cellspacing="2" border="0" width="95%"
21  bgcolor="#ffffff">
22                 <tbody>
23                   <tr>
24                     <td valign="top" align="left">                      
25                                                                         
26   
27       <ul>
28                       <li><a href="index.html">Forward</a><br>
29                    </li>
30                                                                         
31                                       
32       </ul>
33                                                                         
34                       
35       <ul>
36                     <li><a href="features.html">Features</a></li>
37                                                        
38       </ul>
39                                                        
40       <ul>
41                <li>What's new<br>
42                </li>
43                                                                         
44                       
45       </ul>
46                                                                         
47                       
48       <ul>
49                     <li><a href="documentation.html">Documentation</a></li>
50                                                                         
51                                       
52       </ul>
53                                                                         
54               
55       <ul>
56                    <li><a href="implementation.html">Implementation</a><br>
57                    </li>
58                                                                         
59               
60       </ul>
61                                                                         
62               
63       <ul>
64                    <li><a href="authors.html">The authors</a><br>
65                    </li>
66                                                                         
67                                       
68       </ul>
69                                                                         
70               
71       <ul>
72                    <li><a href="links.html">Links</a><br>
73                    </li>
74                                                                         
75               
76       </ul>
77                  <br>
78                     </td>
79                     <td valign="top">                                   
80                                          
81       <div align="right"><b>What's new</b><br>
82           <br>
83                  </div>
84      This page reports the newly <a href="implementation.html">implemented</a> 
85   features of MathQL-1 that are not included in the official <a
86  href="documentation.html">documentation</a> yet.<br>
87              <br>
88                
89       <hr width="100%" size="2"><br>
90       <h3 align="center"><img
91  src="http://www.cs.unibo.it/%7Efguidi/download/bbb11.png" alt="New"
92  width="38" height="37" align="top">
93  &nbsp;MathQL-1 version 4 now under development ...</h3>
94 We are now implementing the new unstable version of MathQL-1 (i.e. MathQL-1.4).
95 The main goals of this release are:<br>
96       <ul>
97         <li>A clear distinction between the core language and the auxiliary
98 functions, which should be part of an extensible library.<br>
99         </li>
100       </ul>
101       <ul>
102         <li>The elimination of the explicit casts between the &lt;query&gt;
103 and &lt;value&gt; types in queries.<br>
104         </li>
105       </ul>
106       <ul>
107         <li>A tight connection with a query generator (i.e <a
108  href="implementation.html">HELM query generator</a>).<br>
109         </li>
110       </ul>
111       <hr width="100%" size="2">              
112       <div align="center">
113       <h3>Changes and additions to MathQL-1 operators:</h3>
114         </div>
115                                
116       <ul>
117             <li>The <b>add</b> operator now accepts a syntax extension allowing
118   to specify more than one explicit attribute group.</li>
119                                
120       </ul>
121                                
122       <blockquote>The syntax now is:</blockquote>
123                                
124       <blockquote>&lt;query&gt; := "add" [ "distr" ]? [ &lt;groups&gt; |
125 &lt;avar&gt; ] "in" &lt;query&gt;<br>
126     &lt;groups&gt; := &lt;group&gt; [ ";" &lt;group&gt; ]*<br>
127     &lt;group&gt; := &lt;attribute&gt; [ "," &lt;attribute&gt; ]*<br>
128     &lt;attribute&gt; := &lt;value&gt; "as" &lt;path&gt;<br>
129             <br>
130     Examples:<br>
131     the query <b>add "1" as "a", "2" as "b" in subj "A"</b> gives the result
132           <b>"A" attr {"a"="1"; "b"="2"}</b> while<br>
133     the query <b>add "1" as "a"; "2" as "b" in subj "A"</b> gives the result
134           <b>"A" attr {"a"="1"}, {"b"="2"}</b>.<br>
135           </blockquote>
136                                
137       <ul>
138             <li>The new <b>align</b> operator takes an integer <i>i</i> (represented
139   as a string), a multiple string value <i>v</i> and returns the same <i>v</i>
140   where each string with length <i>n &lt; i</i> is prefixed with <i>i - n</i>
141   spaces. The syntax of the add operator is:</li>
142                                
143       </ul>
144                                
145       <blockquote>&lt;value&gt; := "align" &lt;string&gt; "in" &lt;value&gt;<br>
146             <br>
147     This operators aligns strings containing numbers so that their alphabetic
148   order agrees with their numeric order.<br>
149           </blockquote>
150                                           
151       <ul>
152             <li>The <b>intersect</b> operator now intersects the attribute
153  groups  of the matching subject strings set-theoretically rather than making
154  their  "Cartesian product". This semantics reduces the computational costs
155  and makes  intersection the dual of union.</li>
156                                
157       </ul>
158                                
159       <ul>
160             <li>The <b>property</b> operator now accepts more than one <b>isfalse</b>
161   clause to increase the complexity of the constraint condition used to filter
162   the raw query results. This feature is exploited in the queries produced 
163  by the           <a href="implementation.html">HELM query generator</a>.</li>
164                                
165       </ul>
166         <br>
167                
168       <hr width="100%" size="2">              
169       <div align="center">              
170       <h3>The PostgreSQL database map:</h3>
171         </div>
172   The <b>PostgreSQL database map</b> is a file describing how the MathQL-1
173  interpreter must interact with the underlying PostgreSQL database, when
174 it  is run in Postgres mode. Currently this file contains the following information:<br>
175                
176       <ul>
177           <li>the <i>database connection string</i> to be used when the interpreter
178  opens a connection with the database;</li>
179                
180       </ul>
181                
182       <ul>
183           <li>the <i>map</i> describing the correspondence between the metadata
184  access paths used by the <i>property</i> operator and the fields of the
185 database  tables.</li>
186                
187       </ul>
188   The format of the file is textual and line oriented, but a corresponding
189  XML syntax will be provided soon.<br>
190   The first line must contain the database connection string and the subsequent
191  lines contain the map with the following syntax:<br>
192                
193       <ul>
194           <li>blank lines: ignored (used for separation);</li>
195                
196       </ul>
197                
198       <ul>
199           <li>lines starting with a # followed by a space: ignored (used
200 for  comments);<br>
201           </li>
202                
203       </ul>
204                
205       <ul>
206           <li>&lt;table_name&gt;&nbsp; &lt;field_name&gt; &nbsp;"&lt;-"&nbsp;
207  [&nbsp; &lt;path_component&gt; &nbsp;]*<br>
208           </li>
209                
210       </ul>
211                
212       <blockquote>the information about the metadata denoted by the given
213  path is found in the given field of the given table in the database. For
214 example the line:<br>
215           <br>
216   refobj&nbsp; h_occurrence &nbsp;&lt;-&nbsp; refObj &nbsp;h:occurrence<br>
217           <br>
218   tells that the metadata denoted by the path <b>/"refObj"/"h:occurrence"</b>
219  is found in the field "h_occurrence" of the table "refobj" in the database,
220  while:<br>
221           <br>
222   refobj&nbsp; source &nbsp;&lt;-<br>
223           <br>
224   tells that the metadata denoted by the path <b>/</b> is found in the field
225  "source" of the table "refobj" in the database;<br>
226         </blockquote>
227                
228       <ul>
229           <li>&lt;table_name&gt;&nbsp; &lt;field_name&gt; &nbsp;"&lt;+"&nbsp;
230  [&nbsp; &lt;path_component&gt; &nbsp;]*<br>
231      </li>
232                
233       </ul>
234                
235       <blockquote>same as the previous but defines a default table and field
236  for the given path. This is used to force the interpreter to query a particular
237  table when the information denoted by a path can be found in more than one
238  table and field. For example:<br>
239           <br>
240   objectname&nbsp; source &nbsp;&lt;+<br>
241   refobj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;source&nbsp; &lt;-<br>
242   refrel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; source&nbsp;
243 &lt;-<br>
244   refsort&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;source &nbsp;&lt;-<br>
245           <br>
246   tells that the metadata denoted by the path <b>/</b> is found in the "source"
247  field of the "objectname", "refobj", "refrel" and "refsort" tables, and
248 that  the first choice is preferred;<br>
249         </blockquote>
250                
251       <ul>
252           <li>&lt;table_name&gt; &nbsp;"&lt;-" [ &lt;path_component&gt; &nbsp;]*</li>
253                
254       </ul>
255                
256       <blockquote>the given path denotes a structured metadata whose components
257  are found in the fields of the given table. For example:<br>
258           <br>
259   refobj &nbsp;&lt;- &nbsp;refObj<br>
260           <br>
261   tells that the path <b>/"refObj"</b> denotes a structured metadata whose
262  components are found in the fields of the table "refobj"; <br>
263         </blockquote>
264                
265       <ul>
266           <li>&lt;table_name&gt; &nbsp;"&lt;+" [ &lt;path_component&gt; &nbsp;]*</li>
267                
268       </ul>
269                
270       <blockquote>same as the previous but tells that this is a default &nbsp;correspondence;
271          <br>
272         </blockquote>
273                
274       <ul>
275           <li>&lt;virtual_table_name&gt; &nbsp;"-&gt;" &lt;concrete_table_name&gt;</li>
276                
277       </ul>
278                
279       <blockquote>defines a correspondence between a virtual table name an
280  a concrete table name. All the &lt;table_name&gt; entries represent virtual
281  table names that are mapped to concrete table names using the identity function
282  unless a particular mapping is defined for them using the above construction.
283  This mechanism allows to define several set of metadata on the same database
284  table as in:<br>
285           <br>
286   refobj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
287  &nbsp; &nbsp; &nbsp; &nbsp;&lt;-<br>
288   refobj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;h_occurrence &nbsp;&lt;-
289  &nbsp;refObj&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; h:occurrence<br>
290   backpointer &nbsp;source&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;
291  &nbsp; &lt;- &nbsp;backPointer&nbsp; h:occurrence<br>
292   backpointer &nbsp;h_occurrence&nbsp; &lt;-<br>
293   backpointer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
294  &nbsp; &nbsp; &nbsp; &nbsp;-&gt; &nbsp;refobj<br>
295         </blockquote>
296                
297       <blockquote>which defines four path accessing two virtual tables ("refobj"
298  and "backpointer") and then maps these tables in a single concrete table;<br>
299         </blockquote>
300                
301       <ul>
302           <li>"-&gt;" <br>
303           </li>
304                
305       </ul>
306                
307       <blockquote>a line like this must end the map file.&nbsp; <br>
308         </blockquote>
309   Here you can find the <a
310  href="http://www.cs.unibo.it/cgi-bin/cvsweb/helm/mathql_db_map.txt">current
311  version of PostgreSQL database map for HELM</a>.<br>
312         <br>
313         <b>How does the interpreter use the map?</b> The map file is read 
314 during the interpreter initialization process from the file pointed by the 
315 MATHQL_DB_MAP environment variable and is used during the execution of each 
316       <i>property</i> operation in the issued queries.When executing a <i>property</i> 
317 operation, the interpreter uses the map to find the smallest set of database 
318 tables containing the information required by the given access paths and then
319 queries these tables to obtain the wanted information. <br>
320                         </td>
321             </tr>
322                                
323   </tbody>        
324 </table>
325         <br>
326  <br>
327 </body>
328 </html>