Transpose index table
Move Database class to Database::Base class