[sword-devel] modules to relational database

Gabriel M. Beddingfield gabriel at teuton.org
Tue Nov 7 11:27:57 MST 2006


> You can split up any XML document at its nodes like <osisID>, <div> etc.
> into
> rows of a database that also holds the rendering context for each of these
> nodes, and also information about the tree structure of the xml document
> (parent-children etc.). How deep you want to split it beyond osisID
> depends
> on what you want to do.

>From what I've seen, a lot (maybe most) of the "serious" bible texts have
structured their documents like you would a book, and then littered it
with "milestones" to mark where chapters and verses begin.  E.g.

<!-- my aplologies for butchering ThML -->
<p>
  <ScripRef verse='Gen 1:1' />In the beginning, God created
  the heavens and the earth.  <ScripRef verse='Gen 1:2' />
  And the earth was shapeless and void...
</p>

On the one hand, you can store the XML document in a relational database
as an XML document... preserving each tag, location, attributes, etc.  On
the other hand, I would expect someone (like me or the OP) to try and
divide things up by Book/Chapter/Verse:

+------+----+-------+---------------------------------------+
| Book | Ch | Verse | Text                                  |
+------+----+-------+---------------------------------------+
| Gen  | 1  |   1   | In the beginning, God created the     |
|      |    |       | heavens and the earth.                |
+------+----+-------+---------------------------------------+
| Gen  | 1  |   2   | And the earth was shapeless and       |
|      |    |       | void...                               |
+------+----+-------+---------------------------------------+

To be clear on what I'm getting at... IMHO, I just don't think there's a
large advantage to converting a module to a RDMS.  If you preserve the
original document (OSIS, ThML, etc.)... why not just leave it in OSIS,
ThML, etc.?  If you redo the schema to the RDMS, I think you'll end up
with a lot of headaches that the XML/SGML schemas solve well.  I can be
convinced otherwise (after all, I really do love RDMS's)... but this is
how I see it.


-- 
               G a b r i e l   M   B e d d i n g f i e l d




More information about the sword-devel mailing list