A database is a collection of data that can be stored and retrieved, while a data warehouse is a collection of integrated information that can be analyzed quickly and efficiently. A data warehouse is a special type of database.
A database stores and retrieves related data, such as the student details in a school. A data warehouse integrates the information from one or more databases, so that analysis can be done to get results, such as the best performing school in a district.
A database does online transactional processing, and has frequent updates. A data warehouse does online analytical processing; it stores much larger amounts of historical data that is very rarely updated. The analytics applied to a data warehouse in any industry or business is used to improve quality and reduce costs.