Yii provides powerful database programming support. Yii Data Access Object (DAO) is built on the PHP Data Object (PDO) extension, allowing access to different database management systems (DBMS) through a single unified interface. Applications developed using Yii's DAO can easily switch to use different database management systems without modifying the data access code. Yii's Active Record (AR) implements the widely used object-relational mapping (ORM) method to further simplify database programming. By convention, a class represents a table and an instance represents a row of data. Yii AR eliminates most of the repetitive tasks of sql statements used to handle CRUD (create, read, update, and delete) data operations.
Although Yii's DAO and AR can handle almost all database-related tasks, you can still use your own database library in your Yii application. In fact, the Yii framework is carefully designed to be used simultaneously with other third-party libraries.
Yii Framework Database Usage Series Tutorials:
Yii Framework Official Guide Series 23——Using Database: Data Access Object (DAO)
Yii Framework Official Guide Series 24—— Using the database: Query Builder
Yii Framework Official Guide Series 25 - Using the database: Active Record
Yii Framework Official Guide Series 26 - Using the database: Relational Active Record
Yii Framework Official Guide Series 27 - Using the Database: Database Migration
The above is the content of the Yii Framework Official Guide Series 22 - Using the Database: Overview. For more related content, please pay attention to the PHP Chinese website (www.php .cn)!