What's the ORM used by yii?

14,370

Solution 1

Their ORM seems to be called Yii Active Record.

Solution 2

From Yii Site

And Yii Active Record (AR), implemented as a widely adopted Object-Relational Mapping (ORM) approach, further simplifies database programming. Representing a table in terms of a class and a row an instance, Yii AR eliminates the repetitive task of writing those SQL statements that mainly deal with CRUD (create, read, update and delete) operations.

This is the documentation about AR: www.yiiframework.com/doc/guide/database.ar This is the documenation API: http://www.yiiframework.com/doc/api/1.1/CActiveRecord

I really like it. I use Yii since a couple of year and I think that AR is very fast :)

Solution 3

Yii ORM is called "Active Record" is mostly inspired by Ruby on Rails Active Record (even if the "Active Record pattern" is used in many languages: http://en.wikipedia.org/wiki/Active_record_pattern ). It was of course developed by the Yii developers team (mostly by its creator Qiang Xue, I guess). The same concept was improved for Yii 2. Yii guide gives credit to Ruby on Rails AR when talking about Named Scopes: http://www.yiiframework.com/doc/guide/1.1/en/database.ar#named-scopes I am not an expert of Ruby on Rails, but I know relations are defined in a very similar way in the two ORMs: http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship

Active Record in Ruby on Rails: http://guides.rubyonrails.org/

The ActiveRecord class in Ruby on Rails: http://ar.rubyonrails.org/

Active Record in Yii: http://www.yiiframework.com/doc/guide/1.1/en/database.ar

The CActiveRecord class in Yii: http://www.yiiframework.com/doc/api/1.1/CActiveRecord

And last but not least, the Yii developers team in GitHub! https://github.com/yiisoft?tab=members

Share:
14,370

Related videos on Youtube

yii
Author by

yii

Updated on March 16, 2020

Comments

  • yii
    yii about 4 years

    Did they implement it themselves?

    • Jake Wilson
      Jake Wilson about 12 years
      +1 for naming your account after the topic you have a question about.
  • yii
    yii almost 14 years
    So they created the wheel themselves?
  • lunohodov
    lunohodov over 12 years
    @yii Yes, they did. They created the wheel that fits best to their faster-than-others cart.
  • Henry
    Henry about 4 years
    Active Record is an anti-pattern. So it's like they created a square wheel.

Related