prefix search using sqlite, and trie serialization