Converted from JSON usage to SQLite