Hi all<br><br>I'm on a project using JSword and we're linking Scripture
to various reference materials. For various reasons, we will need to
store references to our material in the database and not in a Sword
module. Does anyone have any views as to the best way of storing the
verse/passage reference?<br>
<br>I've come up with a few solutions, but not sure which would be the
most efficient, speed, space, etc.-wise... It will be used mainly to
serve the questions:<br>"Does the bible reference provided by the user
match any of our material?", or more simply, "Does passage A overlap
with passage B"?<br>
<br>Our material will be keyed by passage as opposed to per verse, ie. ranges of verses...<br><br>1-
Storing the reference as is in the database, say 1Kings.2:10-15;3:2-3
would mean we'd have to do lots of string manipulations to figure out
overlap of 2 references<br>
<br>2- Storing the beginning and end of each section say as a group of
sub references { (book, start_chapter, start_verse, end_chapter,
end_verse)+ }. <br>In this case a reference would be many of the
previous definition. I can see how we could work it out here, but i can
see also having to do lots of index range scans on our database<br>
<br>3- Number each verse of the bible from 1 to 30000 or something like
that, and then workout and store each verse that is included in the
reference in a table somewhere in the database<br>The benefit here
seems to be that we would get lots of unique index lookups, but maybe
the number of lookups would actually be better off doing range scans...
Also, we would have quite a bit more disk space overhead, if we're
storing a row for each verse.<br>
<br>4- Number each verse of the bible from 1 to 30000 or something like
that, but only store the ranges say verses 30-140 + verses 1500-1512<br><br>5- Numbering each verse, but keying the numbers by book, say Exodus verse 750, 751, 752, etc.<br>
<br>6- We have the benefit of working in Java with a Java database, and
so could write a Java stored procedure to parse whatever solution comes
out of here... It would have to be fast though, given the end product
is the web, and the main activity will searching across scripture
references...<br>
<br>We'll be doing many searches on our data and updating it only very
rarely. I'm a bit at a loss as to best way of doing this... How does
JSword cope with this? or does it uniquely do scripture lookups and not
scripture overlap? (ie. working out whether two portions of scripture
overlap with each other).<br>
<br>Any ideas anyone?<br>Chris<br><br>