c.Table Data Gateway Pattern
Motivation
To decouple SQL statement from business objects.
Summary
It is an object that acts as a Gateway to a database table. One instance handles all the rows in the table.
When to Use
This pattern is obsolete for direct implementation because ORM tools like Entity Frameworks work do this job more effectively.
Generally used with Domain Model or Table Module to connect with data base.
I prefer Table Data Gateway when the result set representation is convenient for the Transaction Script (110) to work with.
Overview Tutorials
Related Patterns
ORM : is preferred method for DB-Domain mapping.
Transaction Scripts : Table Data Gateway is very suitable for Transaction Scripts.
Related Technologies
None
References
None