Handling multi-tenant application with the database/data warehouse info in a database