DEIM Forum 2011 C7-5 SuperSQL 223 8522 3 14 1 E-mail: tomonari@db.ics.keio.ac.jp, toyama@ics.keio.ac.jp SuperSQL, SQL SELECT GENERATE SQL., SuperSQL HTML,.,. SuperSQL, HTML, Equivalent Transformation on Link Expression in a SuperSQL Query Abstract Yosuke TOMONARI and Motomichi TOYAMA Department of Information and Computer Science, Keio University Hiyoshi 3 14 1, Kouhoku-ku, Yokohama-shi, Kanagawa, 223 8522 Japan E-mail: tomonari@db.ics.keio.ac.jp, toyama@ics.keio.ac.jp SuperSQL is an extension language, which enables us to express a variety of layouts, specifying output medium using GENERATE clause which syntax is GENERATE< media >< T F E > instead of SELECT clause in SQL. This article proposes a system which performs equivalent transformation on a link expression of a SuperSQL query specifying output medium to HTML and divides queries we can update partly. Additionally, we describe effectivenesses of what enables us to update queries partly. Key words SuperSQL, HTML, query language 1.,,,. WWW,. SuperSQL, SQL SE- LECT GENERATE< media >< T F E > GENERATE. media, HTML, PDF, SWF, Excel. T F E Target Form Expression,,. SuperSQL, HTML, Web. HTML, SuperSQL. TFE %, link, invoke. %,,,. Web. link, %, Web,., %, link.,. 2 SuperSQL. 3, 4. 5, 6. 2. SuperSQL SuperSQL. SuperSQL, SQL,
[1] [3]. SQL SELECT GENERATE< media >< T F E > GENERATE. < media > HTML PDF < T F E > Target Form Expression. 2. 1 ( ), 3.. (,). : Name, Tel name tel (! ). name : Name! Tel tel (%) 3. HTML. : Name % Tel name tel % SuperSQL, % HTML. HTML, HTML. SuperSQL Qa.sql, HTML Qa1.html, HTML, Qa2.html, Qa3.html,.... 1 % html 2. 2,.,. [ ]!, [ ]!, [ ]!,. [![, ]! ]!,,.,. ( [ ], ),. : [Name], name1 name2 name10 ( [ ]! ),. name1 name2 : [Name]! name10 2. 3 SuperSQL,,,,,,,. ( ). < >@{ < > } =.,. 2. 4 SuperSQL. 4. 2. 4. 1 imagefile imagefile.,. imagefile(id, path=./pic ) 2. 4. 2 link ( HTML link foreach.. link(cou.name, file=./menu.sql, att=co.country) link 1 URL, 2, 3. foreach, foreach. link 3 foreach,. foreach SuperSQL, foreach HTML. link Super-
SQL HTML, link 3 URL. link HTML, foreach foreach,. 2. 4. 3 invoke invoke,. link, SuperSQL, invoke,,. invoke(cou.name, file=./menu.sql, condition= ca.country= +co.country) 2. 4. 4 embed embed., HTML embed. embed(file=./test.sql where= ca.id= att=ca.id) 3. % link [4]. 3. 1 web SuperSQL, GENERATE media HTML, %,. %, Web,.,. % link,,. 3. 2 %,,. link,. % link,. 3. 3 % Web,. link,. 2 %, 3 link, Web. %,. link,, HTML. 2 3 3. 4 %,. link,,,,. 4. % link. %, TFE. TFE,,., FROM WHERE, % link [5] [6]. 4. 4, 5.
5 4. 1 GENERATE T F E. 6 Q0.sql TFE. 4. 2 link %,., TFE., TFE.. link, link 1., link 1 foreach, link 3.. link.,., link 2.. q1.sql TFE,, n.nation. link., q2.sql. 4. 3 FROM,. FROM, FROM. 4. 4 WHERE FROM, WHERE, WHERE. 6 Q0.sql TFE, %.,. %, % link. %. 7 Q0.sql q1.sql, q2.sql, q3.sql. 4. 5, foreach link 1,. link 1 S(1), foreach S(f). link 3, S(1) = S(f),. Q from T Q f (T ), where T Q w (T ). Q, Q f (T ) = Q w (T ).,. 7 q1.sql, q2.sql, q3.sql 5. 5. 1, % link. %, 2010 14 14., SuperSQL,., link, link %,. 14 % link 8., % link
8,, 21%. 8, link 3, 3. 43%. 9. link 3, 3., link 3 HTML link 3. 3. link 3.. 5. 2 % link, link. SuperSQL % 1, 2, 3, link.,.,. % 3, 3. 11. 9 9 SuperSQL, HTML., web.,,. 43%.,,. 10. 10 11, % 1, 2, 3, 2., %, link. %, link. SuperSQL, %. SuperSQL link,. 10, movie.id=cast.movie cast.actor=actor.id,,. link 3, % link. 6. 6. 1 SuperSQL HTML %, link.., 60%
., % link,,., SuperSQL % link. 6. 2 link 3, link 3., link 1 link 3,, link 3. 2010, link 3,. % link,, link 3., link 3,. % link, link 3., link 3. [1] SuperSQL: http://supersql.db.ics.keio.ac.jp/ [2] :,, Vol.93,No.152, P79-88,, 1993 [3] Motomichi Toyama, SupreSQL: An Extended SQL for Database Publishing and Presentation, Preceedings of ACM SIGMOD 98 International Conference on Management of Data, pp. 584-586, 1998 [4], : Web, 46(SIG 13(TOD 27)), 1-15, 2005-09-15 [5] T. Seto, T. Nagafuji and M. Toyama, Generating HTML Sources with TFE Enhanced SQL, Proc. ACM Symp. on Applied Computing(SAC 97), pp. 96-105, 1997 [6] Motomichi Toyama and Takuhiro Nagafuji: Dynamic and Structured Presentation of Database Contents on the Web Lecture Notes in Computer Science, 1998, Volume 1377/1998, 451-465 [7] E. F. Codd: A relational model of data for large shared data banks, Communications of the ACM, Volume 13 Issue 6, June 1970 [8] Alfred V. Aho, Jeffrey D. Ullman and John E. Hopcroft: Data Structures and Algorithms, Addison Wesley, January 11, 1983 [9] David Gries: Compiler Construction for Digital Computers, John Wiley & Sons, December, 1971 [10] J s GOAL - J : http://www.jsgoal.jp/