V
Victor
I was typing a bit yesterday, trying to make a reasonable XML format for
a calendar system which I will perhaps implement. One thing which struck
me after chopping down a few lines, was that to make the format
extensible and uniform, I ended up with only having
- grouping elements, like <persons> and <locations>, containing
- individual elements, like <location> and <company>, containing
- one of either <name>, <description>, or <title> element and
- numeric references to other (grouping or individual) elements.
This seems to look a lot like a relational DB, or indeed RDF. Only one
element per "object" describing it, and then the rest of the object data
references other objects.
Example:
<persons id="1">
<person id="1">
<name>
<bornName>John</bornName>
<familyName>Doe</familyName>
</name>
<job ref="1"/> <!-- a <job> with a company / organization, title etc. -->
<spouse ref="2"/> <!-- person[@id=2] -->
</person>
</persons>
<jobs id="1">
<job id="1">
<title>Professor at CERN</title>
<location ref="1"/>
<organization ref="1"/>
</job>
</jobs>
etc.
One of the intriguing things I thought to be able to do with this was
exporting / backing up data easily by just copying the file. Would you
say this is a good enough reason to avoid using an RDB? Do you have any
good reasons to
- change this format and continue using it,
- continue using this format unchanged,
- using a relational / XML DB, or
- using something else?
a calendar system which I will perhaps implement. One thing which struck
me after chopping down a few lines, was that to make the format
extensible and uniform, I ended up with only having
- grouping elements, like <persons> and <locations>, containing
- individual elements, like <location> and <company>, containing
- one of either <name>, <description>, or <title> element and
- numeric references to other (grouping or individual) elements.
This seems to look a lot like a relational DB, or indeed RDF. Only one
element per "object" describing it, and then the rest of the object data
references other objects.
Example:
<persons id="1">
<person id="1">
<name>
<bornName>John</bornName>
<familyName>Doe</familyName>
</name>
<job ref="1"/> <!-- a <job> with a company / organization, title etc. -->
<spouse ref="2"/> <!-- person[@id=2] -->
</person>
</persons>
<jobs id="1">
<job id="1">
<title>Professor at CERN</title>
<location ref="1"/>
<organization ref="1"/>
</job>
</jobs>
etc.
One of the intriguing things I thought to be able to do with this was
exporting / backing up data easily by just copying the file. Would you
say this is a good enough reason to avoid using an RDB? Do you have any
good reasons to
- change this format and continue using it,
- continue using this format unchanged,
- using a relational / XML DB, or
- using something else?