schema.md

November 8, 2024 ยท View on GitHub

Database Schema

The following sections describe the general database schema used in this project:

Table: <translation>_books

This table lists all the books in the given translation of the Bible.

Column NameTypeNullableKeyDefaultExtraDescription
idintNOPrimary KeyNULLauto_incrementUnique identifier for each book.
namevarchar(255)YESNULLThe name of the book.

Table: <translation>_verses

This table contains all the verses in the given translation of the Bible.

Column NameTypeNullableKeyDefaultExtraDescription
idintNOPrimary KeyNULLauto_incrementUnique identifier for each verse.
book_idintYESIndexNULLThe ID of the book (foreign key to <translation>_books).
chapterintYESNULLThe chapter number.
verseintYESNULLThe verse number.
texttextYESNULLThe text of the verse.

Table: translations

This table contains information about the available Bible translations.

Column NameTypeNullableKeyDefaultExtraDescription
translationvarchar(255)NOPrimary KeyNULLThe abbreviation of the translation.
titlevarchar(255)YESNULLThe full title of the translation.
licensetextYESNULLThe license information for the translation.

Table: cross_references

This table contains cross-reference data between different verses.

Column NameTypeNullableKeyDefaultExtraDescription
idintNOPrimary KeyNULLauto_incrementUnique identifier for each cross-reference entry.
from_bookvarchar(255)YESIndexNULLThe book from which the cross-reference starts.
from_chapterintYESNULLThe chapter number in the from_book.
from_verseintYESNULLThe verse number in the from_book.
to_bookvarchar(255)YESIndexNULLThe book to which the cross-reference points.
to_chapterintYESNULLThe chapter number in the to_book.
to_verse_startintYESNULLThe starting verse number in the to_book.
to_verse_endintYESNULLThe ending verse number in the to_book.
votesintYESNULLThe number of votes indicating the relevance of the cross-reference.