comparison m-toolbox/html_help/help/ug/repo_explore.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
3
4 <html lang="en">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
8 <meta http-equiv="Content-Type" content=
9 "text/html; charset=us-ascii">
10
11 <title>Exploring an LTPDA Repository (LTPDA Toolbox)</title>
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14 <meta name="description" content=
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
16 </head>
17
18 <body>
19 <a name="top_of_page" id="top_of_page"></a>
20
21 <p style="font-size:1px;">&nbsp;</p>
22
23 <table class="nav" summary="Navigation aid" border="0" width=
24 "100%" cellpadding="0" cellspacing="0">
25 <tr>
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
27
28 <td valign="baseline" align="right"><a href=
29 "repo_submit.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Submitting LTPDA objects to a repository"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "repo_retrieve.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Retrieving LTPDA objects from a repository"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Exploring an LTPDA Repository</h1>
37 <hr>
38
39 <p>
40 <p>
41 Exploring an LTPDA repository is most easily achieved using the purpose-built graphical user interface. This
42 interace is accesible either from the LTPDA workbench, or via a toolbar button the workspace browser.
43 </p>
44 <p>
45 The figure belows shows the query dialog that appears through either interface:
46 <br>
47 <img src="images/querydialog.png" alt="LTPDA Query Builder" border="3">
48 <br>
49 </p>
50 <p>
51 You can construct a query by use of the drop-down menus and buttons, then execute
52 the query to retreive a table of results, like the one shown below:
53 <br>
54 <img src="images/queryresults.png" alt="LTPDA Query Results" border="3">
55 <br>
56 </p>
57 <p>
58 If the query dialog is launched from within the LTPDA Workbench, the results table has an
59 additional button which can be used to create constructor blocks on the current pipeline
60 corresponding to the selected records in the results table.
61 </p>
62
63
64 <!--
65 <p>
66 Since an LTPDA repository is just a MySQL database, you can query the database using standard
67 SQL commands via any of the popular MySQL clients. In addition, the LTPDA toolbox provides a
68 simplified command that can be used to execute simple queries with only basic SQL knowledge.
69 </p>
70 <p>
71 The command is <tt>utils.mysql.dbquery</tt> and it can be used to perform various queries.
72 It takes the following input arguments:
73 <table border="1" cellpadding="2" width="30%" bgcolor="#DDDDDD">
74 <tr valign="top">
75 <td><tt>conn</tt></td><td>A database connection object</td>
76 </tr>
77 <tr valign="top">
78 <td><tt>tablename</tt></td><td>The name of a table to search</td>
79 </tr>
80 <tr valign="top">
81 <td><tt>query</tt></td><td>The query string written in MySQL SQL syntax</td>
82 </tr>
83 </table>
84 <br>
85 Examples of usage are:
86
87 </p>
88
89 <h2>Searching particular tables</h2>
90
91 <p>
92 <div class="fragment"><pre>
93 >> info = utils.mysql.dbquery(conn, 'select * from objmeta where id>1000 and id<2000');
94 >> info = utils.mysql.dbquery(conn, 'ao', 'id>1000 and id<2000');
95 >> info = utils.mysql.dbquery_dbquery(conn, 'objmeta', 'name like "x12"');
96 >> info = utils.mysql.dbquery(conn, 'users', 'username="aouser"');
97 >> info = utils.mysql.dbquery(conn, 'collections', 'id=3');
98 >> info = utils.mysql.dbquery(conn, 'collections', 'obj_ids="1,2"');
99 >> info = utils.mysql.dbquery(conn, 'transactions', 'user_id=3');
100 >> info = utils.mysql.dbquery(conn, 'transactions', 'obj_id=56');
101 </pre></div>
102 </p>
103
104 <h2>Retrieving a list of tables</h2>
105
106 <p>
107 You can retrieve a list of the tables in a database with the call:
108 <div class="fragment"><pre>
109 >> info = utils.mysql.dbquery(conn)
110 </pre></div>
111
112 </p>
113
114
115 <h2>High-level queries</h2>
116 <p>
117 Various standard queries are envisaged which ask typical questions, such as:
118 "Give me data for a particular signal spanning a particular time-span".
119 </p>
120 <p>
121 Formulating this question as an SQL query requires a good knowledge of the SQL
122 syntax used by MySQL. The query has to search across multiple tables in order
123 to gather the IDs of the objects that fulfill the query. For these standard questions,
124 high-level functions will be built which perform the query given some input information. This
125 avoids the user having to formulate complicated SQL statements.
126 </p>
127 <p>
128 The following high-level queries currently exist in the toolbox:
129 <table border="1" cellpadding="2" bgcolor="#DDDDDD">
130 <tr valign="top">
131 <td><tt>ltpda_getAOsInTimeSpan</tt></td><td>Retrieve particular AOs in the given time-span</td>
132 </tr>
133 </table>
134 </p>
135
136 -->
137
138 </p>
139
140 <br>
141 <br>
142 <table class="nav" summary="Navigation aid" border="0" width=
143 "100%" cellpadding="0" cellspacing="0">
144 <tr valign="top">
145 <td align="left" width="20"><a href="repo_submit.html"><img src=
146 "b_prev.gif" border="0" align="bottom" alt=
147 "Submitting LTPDA objects to a repository"></a>&nbsp;</td>
148
149 <td align="left">Submitting LTPDA objects to a repository</td>
150
151 <td>&nbsp;</td>
152
153 <td align="right">Retrieving LTPDA objects from a repository</td>
154
155 <td align="right" width="20"><a href=
156 "repo_retrieve.html"><img src="b_next.gif" border="0" align=
157 "bottom" alt="Retrieving LTPDA objects from a repository"></a></td>
158 </tr>
159 </table><br>
160
161 <p class="copy">&copy;LTP Team</p>
162 </body>
163 </html>