Refactoring Obix's Sqlite database schema