Skip to content

Bible Database

Oliver Tseng edited this page Jan 1, 2021 · 3 revisions

How to create your own Bible database

All Bibles are sqlite3 database files in the marvelData/bibles directory. The filename is used as the Bible name abbreviation in all Bible listings in Unique Bible App.

Create the database

sqlite3 MYBIBLE.bible
CREATE TABLE Details (Title NVARCHAR(100), 
    Abbreviation NVARCHAR(50), Information TEXT, Version INT, OldTestament BOOL,
    NewTestament BOOL, Apocrypha BOOL, Strongs BOOL);
CREATE TABLE Bible (Book INT, Chapter INT, Scripture TEXT);
CREATE TABLE Verses (Book INT, Chapter INT, Verse INT, Scripture TEXT);
CREATE TABLE Notes (Book INT, Chapter INT, Verse INT, ID TEXT, Note TEXT);

Insert Bible information

INSERT INTO Details VALUES ('My Bible', 'MYBIBLE','https://example.com', 1, 1, 1, 0, 1);

Bible text

All Bible text are in the Bible table and Verses table.

The Bible table contains the entire chapter and is displayed in formatted view. The Verses table contains individual verses and is displayed in the simple style and verse comparisons.

The Book column contains the book number (eg, Genesis is 1, Matthew is 40).

Formatted text

In the Bible table, formatting for each verse is like:

<verse>
<vid id="v40.1.1" onclick="luV(1)">1</vid>
The book of the generation of Jesus Christ, the son of David, the son of Abraham.
</verse>

In the Verses table, there is no formatting required:

The book of the generation of Jesus Christ, the son of David, the son of Abraham.
Clone this wiki locally