Hi all<br><br>I&#39;m on a project using JSword and we&#39;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&#39;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>&quot;Does the bible reference provided by the user
match any of our material?&quot;, or more simply, &quot;Does passage A overlap
with passage B&quot;?<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&#39;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&#39;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&#39;ll be doing many searches on our data and updating it only very
rarely. I&#39;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><font color="#888888">Chris<br></font>