Generate database schema