CREATE TABLE search_titles ( _id INTEGER NOT NULL PRIMARY KEY, manga_id INTEGER NOT NULL, title TEXT NOT NULL, type INTEGER AS Int NOT NULL, FOREIGN KEY(manga_id) REFERENCES mangas (_id) ON DELETE CASCADE ); CREATE INDEX search_titles_manga_id_index ON search_titles(manga_id); CREATE INDEX search_titles_title_index ON search_titles(title); selectByMangaId: SELECT * FROM search_titles WHERE manga_id = ?; deleteByManga: DELETE FROM search_titles WHERE manga_id = ?; insert: INSERT INTO search_titles (_id, manga_id, title, type) VALUES (?, ?, ?, ?); insertNew: INSERT INTO search_titles (manga_id, title, type) VALUES (?, ?, ?); insertItem: INSERT INTO search_titles (_id, manga_id, title, type) VALUES ?; deleteAll: DELETE FROM search_titles;