Chapter 3. Migrations, DAO, and Query Building
One of the most fundamental aspects of writing modern web application is working with databases. Through PHP's PDO driver, Yii2, can work with many different kinds of relational databases. In this chapter, we'll cover how to connect to different databases, write database migrations to instantiate our databases, use database access objects (DAO), and use Yii2's built-in Query Builder. We'll also cover the basics of powerful tools such as data providers and data widgets as well as how to use Yii2 to replicate and load balance access to our databases.