Thanks Jorge! Really good explanation. On Aug 19, 10:36 pm, Jorge Godoy <[EMAIL PROTECTED]> wrote: > 5. I use lots of automation INSIDE the database, as stored procedures > / > functions. > > 5a. This is specially true for audit information such as > modification > timestamps, logging the user who did the change, copying old information to > log tables, etc. > > 6. I have several "read only" classes in my model, referencing VIEWs > on my > DB. Those make my code simpler and make me benefit from DB cache, improving > performance (a JOIN there is much better than SELECT + loop on code) >
This stuff is really interesting to me. I've got some triggers to update a "modified date" column and I've got a fair amount of check constraints, but I always want to see more. Care to share any of this code? Maybe I can learn something. I'm using postgresqlfor everything too, and I'd like to see what kind of fancy tricks are out there. > Summarizing: I'm from the team that believes that the DB should have code > inside it to guarantee good performance and business rules; I defend that the > DB should receive information with the correct information, but it should > validate them again so if the application can't detect invalid data without > going to the DB, then the DB should take care of that alone. Yeah, I agree with that. The data model is my "last defense" against insanity. I let the outer layers get fairly sloppy because I know the database will stop everything. Matt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

