in reply to Leashing DBI
Problems with SQL in code:
e.g. select * from rate where id = ? and rate.date_effective = (select max(date_effective) from rate down_the_way where down_the_way.id = ?)
My preference is that, for a large application, there should be a single module dealing with each data entity in your database (e.g. invoice.pm for invoices) and this module should provide interfaces to SQL to access data from that table. The perl and SQL are combined in the same module.
No outside module should access the data structures other than through this module. This is database centric however and can be tricky to map onto OO.
"The future will be better tomorrow."
|
|---|