On 12/13/2010 11:17 AM, Stefano Mtangoo wrote:
> Thanks Dr. and I'm checking the zip file. But to be frank, I don't
> understand the calculation done below. How do I come to such claculation
> (excuse my ignorance)? also how do I query that simple BETWEEN?
> That seems to be easiest way but I haven't grasped it yet
> Thanks
>
> On Mon, Dec 13, 2010 at 9:02 PM, Richard Hipp<d...@sqlite.org>  wrote:
>
>> id = book_number*1000000 + chapter*1000 + verse.
The actual book is arranged in a hierarchy: books, then chapters, then 
verses. The above flattens the hierarchy in a way that preserves 
ordering: all verses in Genesis (1M <= v < 2M) have numbers smaller than 
any verse in Exodus (2M <= v < 3M), etc.

Think of it like a phone number: the first few digits give the country, 
the next few the area, and the last several identify whoever you're 
trying to call.

Ryan

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to