Trying to improve the structure of the sqlite database.