Ai2th
Posted on Nov 15
Edited on Nov 15
"Offline" is easy to promise and hard to deliver. This part covers how Miktam Bible stores Scripture so that reading and searching never need the network.
🗄️ One translation, one SQLite file
Each translation is a standalone SQLite database with a simple schema:
CREATE TABLE books ( book_number INTEGER PRIMARY KEY , name TEXT NOT NULL , abbreviation TEXT NOT NULL , testament TEXT NOT NULL CHECK ( testament IN ( 'OT' , 'NT' ) ) , total_chapters INTEGER NOT NULL ) ;
CREATE TABLE verses ( id INTEGER PRIMARY KEY AUTOINCREMENT , book_number INTEGER NOT NULL , chapter INTEGER NOT NULL , verse_number INTEGER NOT NULL , text TEXT NOT NULL , UNIQUE ( book_number , chapter , verse_number ) ) ;
CREATE VIRTUAL TABLE verses_fts USING fts5 ( text , content = verses , content_rowid = id ) ;
Enter fullscreen mode
Exit fullscreen mode
The verses_fts table is SQLite's FTS5 full-text index.…