One-One, One-Many and Many-Many Relations in XML Schema (Page 1 of 6 )
If you are new to XML Schema, I strongly suggest you go through my series “Designing your own XML Schema.” That series will introduce you to all the necessary concepts for designing XML schemas, even for beginners.
Implementing a “One to One” relation in XML Schema: the schema
Since I already introduced the topic of “relations in XML Schema” in my previous article, I don’t think it is necessary to define or explain it here. Concepts such as primary key, composite primary key, simple relations, and so on are already covered in the previous article of this series.
Now, we shall examine the concept of a one to one relation. A one to one relation means that only one element can occur in a child table to the corresponding element in a parent table (in RDBMS). The same concept is used in XML Schema as well. The only difference is that instead of “tables” we have “element hierarchies” here.