Basic Datastructure-Design Understanding Problem

I am doing a research for a diploma thesis at the moment - that is mainly about XML and its dynamic use itself and not that much about tamino - but I am using tamino to store XML data natively. I understand that tamino is REALLY native, so that each XML document is stored as is.

But I have some basic understanding problems. I got a big schema to work with that has already been designed - at this point it is not clear if it is designed properly, though. Fact is that the schema is quite enormous, and contains various references and types. a small fragment of the whole structure can be seen here:

[url]http://img252.imageshack.us/img252/7063/examplehn1.png[/url]

In this example, “Modul” has a sequence, and that sequence contains an element called “Literature”. So, if I want to just store some literature that does not belong to any specific “Modul”, how can this be managed? As far as I can see, due to the hierarchical structure of xml the Literature cannot exist without the parent it is bound to - in this case “Literature” can not exist without “Modul” - even if it would exist as proper complexType, being refered to from within the parent-tree…

Maybe that my mind is strongly shaped by relational thinking, and I am trying to map relations to the xml data, but is there a possibility to keep “Literature” independent from “Modul”, while still belonging to the same schema that defines Modul? I don’t think so, since the schema is not used to store anything, but to validate a stored XML tree against it, so even references within a schema do not create a proper space for elements of type Literature, but are only acting as a placeholder within the schema definiton - refering to another “structure” used to build the whole schema, and not creating an object that later properly exists within the database without being bound to the whole structure defined by the schema. Am I right?

So I guess that object references should be made where the data is actually stored - which means within the XML files.
By definig a proper doctype for Literature and have both the doctype “Modul” and “Literature” in the same collection, it would be possible to keep them both independent. As far as I read, object references are possible within tamino - but then again the whole tree would be interrupted at the reference-point and xquerys won’t be applicable to the whole structure.
Furthermore I am not sure how object references interact with the schema that defines the whole… My assumption is that it would be best to break the whole schema into small fragments, with a doctype for each element that has to be used separately, using kind of split xquerys that query both instances… or maybe x-query.

To be clear: What I actually want is to store data defined by a small fragment by within ONE giant schema on a place where it does not depend on the whole tree and the existance of its parent. Because the way it is, a new “Literature” must always be bound to a “Module”.

Can anyone explain me how object references happen on tamino level, and what the mapping type (native / doctype) is all about? How does this exactly act within tamino?

Thanks in advance,
Mux

Hi Mux,

in fact in XML you could use a different root element, I am using HTML as an example again: usually the root element is but if you think that the head does not contribute significantly, you can leave out the and element and use as the root element of the document. However that means that you need to adjust the doctype, saying that the type is body.

I tested this with DTDs before, and with Schemas in Tamino. If you create a new XML file based on a schema in Oxygen for example, the creation dialog asks you for the root element. This is exactly what this is for.

If you like to discuss more openly, I would like to point you to the German working group “Arbeistkreis Tamino”, which is part of the German Software AG user group, and which will be meeting in April. See [url]The Web page cannot be found.
Maybe you would like to discuss your findings with a group of Tamino users?

Good luck for your thesis.

Hmm, meeting sounds interesting, unfortunately it is too late in order to use the gained insights for my thesis.
About the example…I am not sure if this helps me… maybe my post was too complicated. What I want is to combine the benefits of relational databases with XML.

One Easy example:
I have a set of computers… each of them having a OS.


<computers>
	<computer>
		<type>Lap</type>
		<owner>Hans</owner>
		<os>
			<name>Win xp</name>
			<version>bla</version>
		</os>
	</computer>

	<computer>
		<type>Desk</type>
		<owner>Martin</owner>
		<os>
			<name>Win xp</name>
			<version>bla</version>
		</os>
	</computer>
<computers>

and I also use ONE schema, containing an Element complexType for the os… with the computer as root element - but, if I want to add another OS to a list of all possible OSes, it is not possible. if I only have this ONE schema defined, I have to associate it with a parent node “computer” in any case, it cannot exist out of “computer” - so I would have to entirely define a new computer for this os.

What I want is another set of OSes, that exists independently from the users:


<operatingsystems>
	<os>
		<name>OSX</name>
		<version>bla</version>
	</os>
	<os>
		<name>Ubuntu Linux</name>
		<version>bla</version>
	</os>
	...
	...
</operatingsystems>

But then again, I want to be able to use them within the users as a reference… I read something about dynamic joins and object references within the schema…
how do I have to design the schema to achieve what I want? can I use the same schema I use for “computers” with a different doctype?

The way I have it now, the same entries exist in parrallel maybe a hundred times… instead of just existing once and being refered to.

Does anybody have a short, working example of such a reference, with all the needed schemas defined, and a query for it? I wasnt able to find one…