Active Record
Application StructureMake each class a mirror of one table, with fields named like its columns and find and save methods of its own, so simple applications get persistence with almost no ceremony.
When · When objects map one-to-one to tables and the logic is light; as rules grow, mixing them with persistence makes both harder to test, which is the point to move to a data mapper.
Reference ↗related DP-570DP-540