I have a question about how to query eXist for information that relates to
more than one documents? For example, if there is a document person.xml with
information such as the following:
And there is another document office.xml with the following information:
The query is to find the address of a certain peron's office.
It is not clear how to make this kind of query based on the samples since
they always deal with only one data source. Your help is appreciated!
<b>Get MSN 8</b> and help protect your children with advanced parental
From: Michael Beddow <mbnospam@mb...> - 2003-08-23 09:59:27
> I have a question about how to query eXist for information that relates to
> more than one documents? For example, if there is a document person.xml
> with information such as the following:
> And there is another document office.xml with the following information:
> The query is to find the address of a certain peron's office.
It looks like your documents, though marked up in xml, are unmodified
translations of normalized tables from an RDBMS.
In whch case eXist is neither designed nor equipped to handle them. That
may change one day as XML query languages develop, stabilize and acquire
more SQL-like features, but right now. if you have a lot of data like this,
you would be better either sticking with an RDBMS to handle it, or
pre-processing it so that it is denormalized.
If on the other hand, you are merely giving examples of the sort of data
storage structure you intend to design, then you need to investigate the XML
approach to data organisation before going any further. Many of the key
issues which RDBMS normalization addresses are treated completely
differently in "native" XML databases.
If you still want to use eXist with this type of normalized data, you will
have to perform two queries. If you are using the Java API , you can write
code to conceal this dual querying from users, but if you are simply firing
off XPaths from an external client this is harder to achieve. And updates or
deletions that retain data integrity would be pretty hard to manage.