OOP what is the difference between the pattern activerecord and ORM?

    1 answer 1

    The question is incorrectly formulated.

    AR is ORM, one of the options for implementation.
    That is, the question sounds like "how does a Mercedes differ from a car".

    If we talk about any differences, we usually mean two variants of the implementation of ORM - Active Record and Data Mapper. They differ only in that in AR methods of working with the database are stored in the object itself, and in the DM - separately. As a result, the latter is considered more academically correct (sharing of responsibility) and provides more advantages in complex projects. Examples of AR implementations are Yii AR and Eloquent, DM - Doctrine and Atlas.Orm.