Hi Mark,

In BaseX, there is generally no need to create schemas before creating
databases. Queries are rewritten to benefit from existing index
structures, no matter if texts are ids or other text string (see
Indexes [1] and, in particular, the section on Exact Queries, for more
insights).

If you have eixsting queries that you believe could be sped up, feel
free to forward them to the list, and we may be able to give you some
more hints.

Best,
Christian

[1] http://docs.basex.org/wiki/Indexes




On Wed, Aug 21, 2019 at 6:59 AM Marko Niinimaki <manzi...@gmail.com> wrote:
>
> Dear all,
>
> I have a database with suppliers/parts/orders/customers/listitems and I'm 
> trying to gain performance for queries like "sum up all orders where 
> customers are in Japan". This results to many joins of documents representing 
> each type of entity. With a relational database I'd use foreign keys.
>
> It looks like BaseX supports DTD's. Would creating DTD's improve the query 
> speed? In the mailing list I saw only one reference to this 
> https://www.mail-archive.com/basex-talk@mailman.uni-konstanz.de/msg02586.html.
>  In the response "a DTD-aware XQuery processor can
>
> supply the id() and idref() XPath functions. However, these do not work 
> across documents, and the values must be legal XML identifiers.
> Having said that, most XML databases make indexes, so joins using FLWOR and 
> values will work based on values."
>
>
> Based on that, I'd need to create a DTD for a structure that has id's and 
> idref's and the corresponding document would be 1 GB large (to contain all 
> the suppliers/parts/orders/customers/listitems). Would this make sense?
>
>
> Mark

Reply via email to