Your DAO should aid your model in accessing the data it needs... what if you want to return one row of data from a set of joined tables? How do you do that when you're restricted to one DAO/table? If you have a standard of one DAO/Table, what do you do with a joined query? A special DAO? That muddies your model.
I've started taking the perspective that I use my controllers/listeners as my oo-to-relational (ORM) mapping handlers and letting my DAOs fall in line with the rest of the model, typically taking on one the form of DAO/entity. Hence... a "user" entity that may be reflected in the OO model with 2 or 3 composition classes (user, address, roles) will also have one DAO that queries for rows from any relevant tables.
Abiding by the one DAO/table rule sort of breaks the back of the whole relational DB concept AND doesn't help your model or application's efficiency in any way.
HTH,
J
On 7/14/05, John Samson <[EMAIL PROTECTED]> wrote:
If a project is to follow a predetermined industry standard database schema (PPDM Lite) then would there be scenarios where we wouldn't simply define an object and a DAO for each database table?I can see that inserts into multiple tables can easily be done from a DAO but it seems more straight-forward and safer to create an autonomous handler (and object) for each table.Experiences? Observations?
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone ( www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
--
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again. ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
