badperson
May 25th, 2009, 12:03 AM
Hi,
If you're writing an app that will read data from an xml file and import it into a database, and you have lots of stuff like this:
<entry>
<heading>Here's a heading</heading>
<para>This morning <date>4/34/09</date> I had a <emph type="bold">really</emph> good cup of coffee.</para>
<heading>Here's another heading</heading>
<para>Then I got me some more cowbell</para>
</entry>
</entry>
from a design standpoint, do you want to have a heading table with an entry_id value that will map to that entry, and so on? It seems to me that if the data gets too complex, there's all sorts of potential to screw up an inner join statement and get god knows what as your output.
Is it better to have one text field, leave all the xml markup there and let the app sort it all out? Of course if you're creating an xml document by extracting different text fragments out of the db your could also end up with a document that doesn't parse...
bp
If you're writing an app that will read data from an xml file and import it into a database, and you have lots of stuff like this:
<entry>
<heading>Here's a heading</heading>
<para>This morning <date>4/34/09</date> I had a <emph type="bold">really</emph> good cup of coffee.</para>
<heading>Here's another heading</heading>
<para>Then I got me some more cowbell</para>
</entry>
</entry>
from a design standpoint, do you want to have a heading table with an entry_id value that will map to that entry, and so on? It seems to me that if the data gets too complex, there's all sorts of potential to screw up an inner join statement and get god knows what as your output.
Is it better to have one text field, leave all the xml markup there and let the app sort it all out? Of course if you're creating an xml document by extracting different text fragments out of the db your could also end up with a document that doesn't parse...
bp