Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Design help: OO Perl and db tables

by EdwardG (Vicar)
on Jan 02, 2007 at 09:30 UTC ( [id://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.

 

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://592514]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-04-18 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found