Changed the database layout