Working with Databases
Content of the «Working with Databases» section:
- Database Access Objects: Connecting to a database, basic queries, transactions, and schema manipulation
- Query Builder: Querying the database using a simple abstraction layer
- Active Record: The Active Record ORM, retrieving and manipulating records, and defining relations
- Migrations: Apply version control to your databases in a team development environment
Articles section «Working with Databases»:
Elasticsearch Extension for Yii 2
This extension provides the elasticsearch integration for the Yii2 framework. It includes basic querying/search support and also implements the
ActiveRecord pattern that allows you to store active records in elasticsearch.
Redis Cache, Session and ActiveRecord for Yii 2
This extension provides the redis key-value store support for the Yii2 framework. It includes a
Session storage handler and implements the
ActiveRecord pattern that allows you to store active records in redis.
Sphinx Extension for Yii 2
During the course of developing and maintaining a database-driven application, the structure of the database being used evolves just like the source code does. For example, during the development of an application, a new table may be found necessary; after the application is deployed to production, it may be discovered that an index should be created to improve the query performance; and so on. Because a database structure change often requires some source code changes, Yii supports the so-called database migration feature that allows you to keep track of database changes in terms of database migrations which are version-controlled together with the source code.
Active Record provides an object-oriented interface for accessing and manipulating data stored in databases. An Active Record class is associated with a database table, an Active Record instance corresponds to a row of that table, and an attribute of an Active Record instance represents the value of a particular column in that row. Instead of writing raw SQL statements, you would access Active Record attributes and call Active Record methods to access and manipulate the data stored in database tables.
Page 1 of 2