SLIDE 4 4
Specialization
<AirTrip from= to=”London”>
<AirTrip from= to=”London”>
<AirTrip from= to=”London”>
<AirTrip from= to=”London”>
"
<AirTrip from= to=”London”>
" #$%& # </AirTrip>
XDD database modeling
– Formalized as an XDD description containing ground XML unit clauses (facts, see definition 5)
- Extensional XML DB (XDBE)
– 1+ XML documents formalized as above
- Intensional XML DB (XDBI)
– Comprised of XML non+unit clauses defining axioms, relationships or deductible knowledge (XML non+unit clauses)
- Set of structural and integrity constraints (XDBC)
– XML non+unit clauses defining particular constraints
- XDD Description: XDB = XDBE υ XDBI υ XDBC
Extensional XML DB (XDBE)
<Flight number=”TG916” airline=”TG”> <Origin>Bangkok</Origin> <Destination>London</Destination> <Price>750</Price> </Flight> <Flight number=”SQ61” airline=”SQ”> <Origin>Bangkok</Origin> <Destination>Singapore</Destination> <Price>150</Price> </Flight> <Flight number=”SQ320” airline=”SQ”> <Origin>Singapore</Origin> <Destination>London</Destination> <Price>500</Price> </Flight>
Intensional XML DB (XDBI)
– Minimum waiting time between two connecting flights is 1 hour
- Example deductible information
– There is a flight from Singapore to Bangkok – There is a flight from Bangkok to London – Hence there is a 2+step flight from Singapore to London
– see definition 5 and figure 4
Constraints (XDBC)
– A flight can not have the same origin and destination – The price of a flight must be an integer – The price of a flight must be less than 1500 – The flight number must be unique – Elements in the database must conform to a certain schema
– see definition 4 and figure 5
XDD querying
- An XML query can be formalized as an
XML non+unit clause ( )
- The result of the query is a sequence of all
possible specializations of the query clause in the database.
- An example query is presented in figure 7