-
Notifications
You must be signed in to change notification settings - Fork 31
Bible Database
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.
- Rebuild the database from the sources.
Bless you. I'll describe the table layout and schema. It's up to you to figure out how to translate the source texts into the database format.
The database engine is SQLite 3. Therefore you can use any tool that supports SQLite 3 databases in order to rebuild the database.
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 asKJV
. -
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 isgreek
orenglish
. 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 codedspanish
. -
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|
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 tobibles
table above). -
bibleReference
is the reference of each verse. This reference is of the form40N.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.
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.