Title: <title> XML?XQuery ,????????? </title>
1lttitlegtXML?XQuery ,?????????lt/titlegt
- ltprofgt???lt/profgt
- ltstud.gtD954020009 ???
- D954020002 ???lt/stud.gt
2Outline
- ??
- ????
- ???SQL??
- XML???????????
- ??
31.?? (1/4)
- XML???
- XML?HTML
- ML??
- HTML???
- 1.????????
- 2.???????
- 3.?????????
41.?? (2/4)
lt?xml version"1.0" encoding"Big5" ?gt -
ltlibgt ltbookgt lttitlegtXML???lt/titlegt
ltauthorgtMarylt/authorgt ltpricegt590lt/pricegt
lt/bookgt - ltbookgt lttitlegt??? 7-11 ????lt/titlegt
ltauthorgt???lt/authorgt ltpricegt120lt/pricegt
lt/bookgt lt/libgt
51.?? (3/4)
- XML???
- ???
- ???
- ????
- Xquery
- ?XML?????
- 2007/1/23 XQuery???W3C????
- ??????
61.?? (4/4)
- XML????
- ?????????
- ????
- ????
- ???????
72.???? (1/4)
- (1)????
- DTD
- Schema
- (2)????
- ??(Element)
- ??(Attribute)
- ????(Entity Reference)
- CDATA??? PCDATA
- PI(Processing Instructions)
82.???? (2/4)
- XML???
- XML-Enabled ???(XED)
- ??XML??????
- ?????RD?????
- ???????XML??
- Native XML???(NXD)
- ????????XML
- ??????????
- ?????????
92.???? (3/4)
102.???? (4/4)
- XML????(Xquery )
- ???XML?????
- W3C ?1999 ???????XML
- 2007/1??????Xquery 2.0
- ???20?????????,??MS SQL????
- Xquery???
- ?XML ??????XML ?????????
- ????????
- ???????????
- ??XLink?XPointer
- ??????(Namespace Alias)??????
- ?????????????
- ??????????XML ???????
113.???SQL?? (1/10)
- Xquery?????
- Xpath??????
- FLWR??
- ????????
- Xpath??????
- Xpath?Xquery???
- Xpath????????????XQuery
123.???SQL?? (2/10)
- Xpath????
- ??????????
- //Author
- --------------------------------------------------
- ??store????Author
- Document("store.xml")//Author
-
133.???SQL?? (3/10)
- FLWR??
- Xquery????????
- FlwrExprFOR?LET?????????WHERE??
- WhereClauseWHERE????????????XQuery
??,?????FLWR?? - ReturnClause??????
143.???SQL?? (4/10)
?????? LET Author//Author RETURN
Author
?????? FOR Author IN // Author
RETURN Author
153.???SQL?? (5/10)
????????? FOR book in //book FOR author
IN book/author RETURN
author ?? ????FOR??,book???K?(??book???),???
?????FOR?????ltbookgt???ltauthorgt????????????author?
?(?????????????),???????????
163.???SQL?? (6/10)
??????????100????? FOR p IN
distinct(document("booklist.xml")//publisher)
LET b document(booklist.xml)/bookpublishe
r p WHERE count(b) gt 100
RETURN p
????????????????? LET a
avg(//book/price) FOR b IN /book WHERE
b/price gt a RETURN b/title
173.???SQL?? (7/10)
- XQuery ????????
- ?????????????
183.???SQL?? (8/10)
- Joint??(1)
- ????????????????????????
SQL Select c.c_Name From Customer as c, Order as
o, Product as p Where p.p_Name'???????????' and
o.pIdp.pId and c.mIdo.Mid
XML FOR p IN document("product.xml")//o_record
p_Name '???????????' o IN document("order.xml
")//o_recordpId p/pId c IN
document("customer.xml")//c_record mIdo/mId,
RETURN c/c_Name
193.???SQL?? (9/10)
- Joint??(2)
- ???????????????,???????????
SQL Select c.c_Name, p.p_Name From Customer as
c, Order as o, Product as p Where o.pIdp.pId and
c.mIdo.Mid
XML FOR c IN document(customer1.xml)//c_recor
d RETURN ltcustomer1gt c/c_Name
FOR o IN document(order.xml)// order_record
mId o/mId p IN
document(product.xml)//product_record pId
o/pId RETURN p/p_Name
lt/customer1 gt
203.???SQL?? (10/10)
- Group??? (1)
- ????????????????????
SQL SELECT avg(p_Price) AS avgprice FROM order
GROUP BY pId HAVING count() gt 5
XML FOR op IN distinct(document("order.xml")/
/pId) LET o document("customer1")//order_rec
ordpId op WHERE count(o) gt5 RETURN
ltcustomer1gt op, ltavgpricegt
avg(o/price) lt/avgpricegt lt/ customer1gt
214. XML??????????? (1/3)
- Tamino??
- ?????XML???(NXD)
- ??Software AG??
- ????
- 1.X-Engine
- 2.Data Map
- 3.Tamino Manager
- ??????
- 1.Tamino Schema Editor
- 2. Tamino X-Plorer
- 3. Tamino X-Application
224. XML??????????? (2/3)
- Xquery??????(1)
- ??????(Tamino-1??,MS SQL??)
234. XML??????????? (3/3)
- Xquery??????(2)
- ?????????(Tamino-1??,MS SQL??)
245.??
- 1. XML??????????????,?XQuery ??XML?????,??XQuery
?????????? - 2. XQuery ?????????????,??????????Update????
- 3. XQuery ???????SQL??????,????????????????
- 4. XML?SQL????10??????,???????????
25Q A