-
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.
- Use the SQL source files to rebuild the database.
- Rebuild the database from the original sources.
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:
- Parsed Byzantine: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/byzp.sql
- Un-parsed Tischendorf: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/tis.sql
- Parsed Textus Receptus: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/trp.sql
- Parsed Westcott-Hort: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/wchp.sql
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:
- King James/Authorized Version: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/kjv.sql
- Young's Literal Translation: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/ylt.sql
Note: The KJV is changing as of 1.2. The above SQLite source file is the old 1.0-1.1 version.
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.
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.
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.
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.
- the Strong's python script: https://github.com/photokandyStudios/gbible-scripts-assets/blob/master/strongsImport.py
- The XML: https://github.com/morphgnt/strongs-dictionary-xml/downloads