Skip to content
kerrishotts edited this page Feb 25, 2013 · 7 revisions

The bibleContent file is missing from the code distribution, but is required for proper functioning of the application. It is critical, therefore, to be able to rebuild this file if you are going to build the source yourself.

There are several methods you can use to retrieve this file (easiest to hardest):

  • Ask the developer for a copy. She's really nice, honestly. You can reach her at [email protected]
  • Obtain the bibleContent file from the most recent version of the app on the app store. You can unzip the IPA file and retrieve the file from the files within.
  • Use the SQL source files to rebuild the database.
  • Rebuild the database from the original sources.

So you want to rebuild the database?

Bless you. I'll describe the table layout and schema. You can then either translate the data from the original sources into the database yourself, or you might want to use the following SQL files:

Greek:

Note: The interlinear Westcott-Hort used in our app is not supplied; it was a gift from biblos.com. The version of the Westcott-Hort above is non-Interlinear, but parsed, and is the same as supplied in Version 1.0. This also means that this version of the WH also does not have the diacritics.

English:

Note: The KJV is changing as of 1.2. The above SQLite source file is the old 1.0-1.1 version.

Database Engine

The database engine is SQLite 3. Therefore you can use any tool that supports SQLite 3 databases in order to rebuild the database.

bibles Table

The bibles table indicates the Greek and non-Greek editions that are supported. The schema for the table is below.

CREATE TABLE bibles (bibleAbbreviation TEXT, 
                     bibleAttribution TEXT, 
                     bibleSide TEXT, 
                     bibleID INTEGER PRIMARY KEY, 
                     bibleName TEXT, 
                     bibleParsedID NUMERIC);

Here's what each field means:

  • bibleAbbreviation - the abbreviated code for the Bible. For example, the King James Version is coded as KJV.
  • bibleAttribution - currently not used. Intended to eventually display the attribution in the app dynamically based on which edition is selected. (Currently attributions are on the About page.)
  • bibleSide - Indicates if the Bible is greek or english. If the former, then the edition will be displayed in the left-hand side of the Bible View. If the latter, it is displayed on the right-hand side. For the future, if additional languages are added, they will be used here as well. For example, a Spanish Bible might be coded spanish.
  • bibleID - a unique ID. This ID must match the IDs used within the application.
  • bibleName - the name of the Bible.
  • bibleParsedID - If the Bible edition is an unparsed edition, this ID provides a link to a respective parsed edition. Not really used anymore since the only unparsed edition is Tischendorf. Parsed editions would point to themselves.

The table must contain the following data:

BYZP||greek|2|Byzantine (Parsed)|2
TIS||greek|3|Tischendorf 8th Ed.|
TRP||greek|5|Textus Receptus (Parsed)|5
WHP||greek|7|Westcott-Hort (Parsed)|7
KJV||english|8|King James/Authorized Version|
YLT||english|9|Young's Literal Translation|

content Table

The content table contains all the verses for every Bible edition. It's schema is as follows:

CREATE TABLE [content] ([bibleID] NUMERIC, [bibleReference] TEXT, [bibleText] TEXT, [bibleBook] INT, [bibleChapter] INT, [bibleVerse] INT, PRIMARY KEY ([bibleID] ASC, [bibleBook] ASC, [bibleChapter] ASC, [bibleVerse] ASC));
CREATE UNIQUE INDEX [idx_content] ON [content] ([bibleChapter] ASC, [bibleBook] ASC, [bibleVerse] ASC, [bibleID] ASC);

Each field is as follows:

  • bibleID refers to the unique ID of the particular Bible Edition (refer to bibles table above).
  • bibleReference is the reference of each verse. This reference is of the form 40N.1.1, where the first number is the book number (where the Book of Matthew is book 40), the second number is the chapter of the book, and the third number is the verse of the book.
  • bibleText is the text of the verse.
  • bibleBook is the book of the Bible for this verse; must match the reference. If this verse is from the Book of Matthew, this should be 40.
  • bibleChapter is the chapter number for this verse.
  • bibleVerse is the verse number for this verse.

Missing verses are not required to have entries, though it is suggested to fill them with [...] so that the reader knows the verse is missing when using the app.

Making Modifications to the Database

Sometimes there's an error in a verse, and you need to change it. Enter the "bibles.py" script (http://dl.dropbox.com/u/154311/bibles.py). You can list the available versions, list verses, and alter content within each verse.

strongsgr Table

The strongsgr table holds the Strong's Definitions for the Greek New Testament. Its schema is as follows:

CREATE TABLE [strongsgr] ([key] VARCHAR (10) PRIMARY KEY NOT NULL, [lemma] VARCHAR (512), [pronunciation] VARCHAR (512), [definition] VARCHAR (4096));

Each field is as follows:

  • key - the G# for the definition. For example, G25.
  • lemma - the Greek word for the definition.
  • pronunciation - the English pronunciation of the Greek Word.
  • definition - the Strong's definition.

Generating the Strong's Data

I don't have a .sql file for this one, since I wrote a python script to convert from the original XML straight into the sqlite database. You can download the script for it (be sure to edit the embedded paths), and run it for yourself to get a full Strong's table.