I have the following sql tables
Parent(_id,name) Kid(_id,name,parent_id)//where parent_id is foreign key Toy(_id,name,…,kid_id)//where kid_id is foreign key
right now I have queries that get all the Kids of a given Parent and also all the Toys for a given Kid.
There is a new need to include a search feature in the app. For that I need to change to an FTS4 table. How do I define the fts4 table so as not to lose the foreign key lookup capability? I am not experienced in fts by any margin. But I have read about docid vs rowid. Can I use docid for the foreign key values? Will someone please provide an example such as
CREATE TABLE Kid USING fts4(rowid, name, docid); //where docid is actually parent_id