Determine database schema