Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Design help: OO Perl and db tables

by EdwardG (Vicar)
on Jan 02, 2007 at 09:30 UTC ( #592514=note: print w/ replies, xml ) Need Help??


in reply to Design help: OO Perl and db tables

Is there a general rule you might recommend for how to estimate how much to abstract, and how much db duplication to allow?

I recommend avoiding duplication. If you allow duplication, then you also allow the possibility that two or more pieces of information will be in conflict with each other, also known as data corruption. There are ways to mitigate this risk, but none are as effective as disallowing duplication altogether.

There's no absolute correct answer to the right level of abstraction. It depends on how the system will be used, considering performance, scalability, maintenance, and quality requirements. Compare for example OLTP and OLAP. It might help to think of your object model as a representation of your data suited to the functional requirements of your application or interface, whereas your database model should be designed to suit non-functional requirements such as data integrity and maximising query flexibility.

 


Comment on Re: Design help: OO Perl and db tables
Re^2: Design help: OO Perl and db tables
by j3 (Friar) on Jan 02, 2007 at 18:18 UTC
    It might help to think of your object model as a representation of your data suited to the functional requirements of your application or interface, whereas your database model should be designed to suit non-functional requirements such as data integrity and maximising query flexibility.

    Thanks Edward. That sounds like it makes a lot of sense. I think that angle is what I was missing. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://592514]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-10-22 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls