Working with Databases
Working with Databases Yii 2
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
- Sphinx
- Redis
- MongoDB
- ElasticSearch
Articles section «Working with Databases»:
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: 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.
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: Working with Databases
MongoDB Extension for Yii 2
This extension provides the MongoDB integration for the Yii2 framework.
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: Working with Databases
Redis Cache, Session and ActiveRecord for Yii 2
This extension provides the redis key-value store support for the Yii2 framework. It includes a Cache
and Session
storage handler and implements the ActiveRecord
pattern that allows you to store active records in redis.
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: Working with Databases
Sphinx Extension for Yii 2
This extension adds Sphinx full text search engine extension for the Yii 2 framework. It supports all Sphinx features including Real-time Indexes.
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: Working with Databases
Database Migration
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.
- Details
- Parent Category: The Definitive Guide to Yii 2.0
- Category: Working with Databases
Active Record
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