database schema improvements