Re: [xml-dbms] Filter concepts
- gv_web wrote:
> 1. Is there a programmatic way to specify the actions when using theNo. If you call DOMToDBMS or DBMSDelete directly, there are methods for
> Transfer API ? Instead of *.act files?
specifying a single action. You can also construct an Actions object
directly -- .act documents are compiled into Actions objects -- but
there seems little point in doing this.
> 2. When i use the retrieveDocument() API specifying the "Select"The filter document has two purposes:
> query, what is the use of the filter file?
> For example :
> select.put("Select", "select * from auction");
> _transfer.retrieveDocument(parserProps, "auction.map", select,
> "auction.ftr" , null, "auction_out.xml");
> where auction.ftr looks like :
> <?xml version='1.0' encoding="iso-8859-1"?>
> <!DOCTYPE FilterSet SYSTEM
> "file:///home/giriraj/xml/xml2db/test/filters.dtd" >
> <FilterSet Version="2.0"
> <ResultSetInfo Table="AUCTION" />
1) Associate a table name (used by the map file) with a result set. For
more information and examples, see the section on filter documents in:
2) Instruct XML-DBMS how to filter more deeply nested data that the map
specifies should be retrieved. This is done with RelatedTableFilter
elements. For example, suppose your map specifies how to construct a set
of sales orders from the Orders and Items tables. By passing in a result
set, you are specifying which top-level elements (sales orders) to
construct. The RelatedTableFilter element can be used to specify which
items to retrieve. For more information, see the description of
RelatedTableFilter in filters.dtd and the ordersrs.ftr sample in the
samples directory. If none of this makes sense, write back and I'll
expand the FAQ.
> 3. What is the use of the filter file and how can i use it forXML-DBMS essentially defines a query language with two parts. The map
> parameterized values? (Instead of hard coding values)
document defines the structure of the XML documents -- which tables map
to which elements and which columns map to which elements / attributes.
The filter document specifies which data to actually retrieve through
what are essentially a series of WHERE clauses. (These are copied almost
verbatim to the SELECT statements XML-DBMS constructs.)
Filter documents can be parameterized through the use of named
parameters. For details, see the description of the Where attribute in
filters.dtd and the ordersparams.ftr sample. Again, write back if you
have specific questions.