blob: 104f19c91eff74f60ee93ffc30642127a14ae48a [file] [log] [blame]
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -07001<!DOCTYPE html>
2
3<html>
4<head>
5 <title>AsterixDB TinySocial Demo</title>
6
7 <style>
8 .pretty-printed {
9 background-color: #eeeeee;
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070010 margin-bottom: 1em;
11 }
12
13 .how-to-run {
14 background-color: #c8c8c8;
15 margin-bottom: 1em;
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070016 }
17
18 body {
19 font-family : "Helvetica";
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070020 margin-bottom: 1em;
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070021 }
22 </style>
23
24 <script src="../js/jquery.min.js"></script>
25 <script src="../core/js/easyXDM/easyXDM.debug.js"></script>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070026 <script src="http://localhost:19101/sdk/static/js/asterix-api-core.js"></script>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070027 <script src="js/tinysocial.js"></script>
28</head>
29<body>
30 <h1>AQL: Querying TinySocial AsterixDB</h1>
31
32 <h2>Query 0-A - Exact-Match Lookup</h2>
33 <div class="sample-query">
34
35 <div class="pretty-printed">
36 use dataverse TinySocial;<br/><br/>
37
38 for $user in dataset FacebookUsers<br/>
39 where $user.id = 8<br/>
40 return $user;<br/>
41 </div>
42
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070043 <div class="how-to-run">
44 javascript here
45 </div>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070046
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070047 <button id="run0a">Run #0-A</button>
48 </div>
49 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070050 <h2>Query 0-B - Range Scan</h2>
51 <div class="sample-query">
52
53 <div class="pretty-printed">
54 use dataverse TinySocial;<br/><br/>
55
56 for $user in dataset FacebookUsers<br/>
57 where $user.id >= 2 and $user.id <= 4<br/>
58 return $user;<br/>
59 </div>
60
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070061 <div class="how-to-run">
62 </div>
63
64 <button id="run0b">Run #0-B</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070065 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070066 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070067
68 <h2>Query 1 - Other Query Filters</h2>
69 <div class="sample-query">
70 <div class="pretty-printed">
71 use dataverse TinySocial;<br/><br/>
72
73 for $user in dataset FacebookUsers<br/>
74 where $user.user-since >= datetime('2010-07-22T00:00:00')<br/>
75 and $user.user-since <= datetime('2012-07-29T23:59:59')<br/>
76 return $user;<br/>
77 </div>
78
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070079 <div class="how-to-run">
80 </div>
81
82 <button id="run1">Run #1</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070083 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070084 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070085
86 <h2>Query 2-A - Equijoin</h2>
87 <div class="sample-query">
88 <div class="pretty-printed">
89 </div>
90
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070091 <button id="run2a">Run #2-A</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070092 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -070093 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -070094
95 <h2>Query 2-B - Index join</h2>
96 <div class="sample-query">
97 <div class="pretty-printed">
98 </div>
99
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700100 <div class="how-to-run">
101 </div>
102
103 <button id="run2b">Run #2-B</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700104 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700105 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700106
107 <h2>Query 3 - Nested Outer Join</h2>
108 <div class="sample-query">
109 <div class="pretty-printed">
110 </div>
111
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700112 <div class="how-to-run">
113 </div>
114
115 <button id="run3">Run #3</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700116 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700117 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700118
119 <h2>Query 4 - Theta Join</h2>
120 <div class="sample-query">
121 <div class="pretty-printed">
122 </div>
123
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700124 <div class="how-to-run">
125 </div>
126
127 <button id="run4">Run #4</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700128 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700129 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700130
131 <h2>Query 5 - Fuzzy Join</h2>
132 <div class="sample-query">
133 <div class="pretty-printed">
134 </div>
135
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700136 <div class="how-to-run">
137 </div>
138
139 <button id="run5">Run #5</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700140 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700141 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700142
143 <h2>Query 6 - Existential Quantification</h2>
144 <div class="sample-query">
145 <div class="pretty-printed">
146 </div>
147
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700148 <div class="how-to-run">
149 </div>
150
151 <button id="run6">Run #6</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700152 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700153 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700154
155 <h2>Query 7 - Universal Quantification</h2>
156 <div class="sample-query">
157 <div class="pretty-printed">
158 </div>
159
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700160 <div class="how-to-run">
161 </div>
162
163 <button id="run7">Run #7</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700164 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700165 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700166
167 <h2>Query 8 - Simple Aggregation</h2>
168 <div class="sample-query">
169 <div class="pretty-printed">
170 </div>
171
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700172 <div class="how-to-run">
173 </div>
174
175 <button id="run8">Run #8</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700176 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700177 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700178
179 <h2>Query 9-A - Grouping and Aggregation</h2>
180 <div class="sample-query">
181 <div class="pretty-printed">
182 </div>
183
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700184 <div class="how-to-run">
185 </div>
186
187 <button id="run9a">Run #9-A</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700188 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700189 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700190
191 <h2>Query 9-B - (Hash-Based) Grouping and Aggregation</h2>
192 <div class="sample-query">
193 <div class="pretty-printed">
194 </div>
195
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700196 <div class="how-to-run">
197 </div>
198
199 <button id="run9b">Run #9-B</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700200 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700201 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700202
203 <h2>Query 10 - Grouping and Limits</h2>
204 <div class="sample-query">
205 <div class="pretty-printed">
206 </div>
207
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700208 <div class="how-to-run">
209 </div>
210
211 <button id="run10">Run #10</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700212 </div>
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700213 <hr/>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700214
215 <h2>Query 11 - Left Outer Fuzzy Join</h2>
216 <div class="sample-query">
217 <div class="pretty-printed">
218 </div>
219
genia.likes.science@gmail.com8dbf9dc2013-05-20 17:38:29 -0700220 <div class="how-to-run">
221 </div>
222
223 <button id="run11">Run #11</button>
genia.likes.science@gmail.com1cf49ad2013-05-16 03:48:20 -0700224 </div>
225
226</body>
227</html>