Row Data Gateway encapsulates access to a row in the database, while Table Data Gateway encapsulates access at the table level, and it does not seem to me that it is a degenerative form of another.
While the Table Data Gateway finds methods that return RecordSets with the Row Data Gateway, you need a separate Finder class that returns one gateway class for each row.
Do you use and are you using complex decisions related to your choices, what other templates you use.
From his discussions in the "When to Use This" sections of all templates, if you use the Domain Model template, he would prefer to use Active Record . Both of these gateway patterns are reasonable for use in conjunction with Transaction Script .
A table data gateway is simpler, so if it does what you need, it might be the right choice.
You probably would not use both of these patterns in the same application.
Don roby
source share