jargon

Design patterns·Objects and the database between them

one object holds every query for one table, and it returns rows rather than domain objects.

Table data gateway

Also calledtable gateway, gateway per table

A single object acting as the gateway to one database table, with a method per query and no domain behaviour. It keeps SQL out of business logic without pretending to map anything to a model. It is the simplest useful persistence pattern and the direct ancestor of what most teams call a DAO.

Commonly confused with