2486Re: [xml-dbms] Re: Retrieving Data from One of Many Tables using a Single Map File
- Sep 11 6:20 PMThanks for the comments.
In my application a user interface accepts query
requests from users. That means during the run time I
have to figure out which map and filter file can be
applied for a query, and then pass those into
retrieveDocument(). Also, I have to maintain many map
and filter files. Is that reasonable?
What about XQuery? Is that going to address the above
issues? I hope it will.
--- Ronald Bourret <rpbourret@...> wrote:
> There are two things going on here.__________________________________________________
> 1) The map file defines the structure (hierarchy) of
> the retrieved data.
> Each different hierarchy requires a different map
> file, although you can
> enter a given hierarchy at any point.
> For example, consider the sample sales data, which
> uses the following
> / \
> Items Customers
> I can use the map file for this hierarchy to
> generate XML documents that
> match this hierarchy, plus the following
> Items Customers Parts
> Note that XML-DBMS allows you to specify the root
> you want, then follows
> the hierarchy to the leaves. In other words, I need
> a separate map file
> for the following hierarchy, since it omits the
> parts table:
> / \
> Items Customers
> I also need different map files for other
> hierarchies, such as the
> Parts Customers etc.
> | |
> Items Orders
> Furthermore, a map file can define multiple,
> separate hierarchies
> (disconnected graphs), although there is generally
> no reason to do this.
> 2) The filter file defines three things:
> a) Any "wrapper" elements that wrap the returned
> b) The root table to use and the select criteria for
> that table.
> c) Any additional filters between tables.
> For example, if I want to retrieve data starting
> with order number 123
> and getting all items with a quantity greater than
> 10, Orders is my root
> table, order number 123 is my root select criteria,
> and quantity greater
> than 10 is my additional filter criteria on the
> items table.
> So, to answer your question, you need:
> 1) Different map files for different hierarchies.
> 2) Different filter files for different filter
> Note that which filters are used depends on which
> tables are defined in
> the hierarchy. For example, if I include a filter
> for the Foo table but
> there is no Foo table in the hierarchy, the Foo
> filter is never used.
> Similarly, if I include a filter for the Customers
> table but specify
> that the Items table is my root table, the Customers
> filter will be
> ignored since it is not on the branch of the
> hierarchy starting with
> In summary, having different maps and filters is no
> different than
> having different SELECT statements in SQL. The only
> difference is that
> map and filter files are big and hard to read and
> SQL is short and easy
> to read.
> -- Ron
> dling61 wrote:
> > One more question to follow up this.
> > I have a small enterprise data model containing
> about ten tables. I
> > also have different queries to select tables. Some
> of them perform
> > join operations.
> > I want to have a single filter document to cover
> all the queries I
> > have. But it seems like XML-DBMS to construct
> every result set based
> > on each filter defined in filter document. If I
> just want to restieve
> > data from the customer table, XML-DBMS still go
> through all the
> > filters defined and process "select". Is that
> > Do I have to put different filters into different
> filter files in my
> > case? Plus, I do want to use retrieveDocumentBySQL
> in this case.
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
- << Previous post in topic Next post in topic >>