Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Database Design Issues - OT

by Abigail (Deacon)
on Jul 13, 2001 at 16:11 UTC ( #96359=note: print w/ replies, xml ) Need Help??


in reply to Re: Database Design Issues - OT
in thread Database Design Issues - OT

If you have 270 products (rows?) and 10 categories, performance is not an issue, so a seperate table should be ok.

It's not just the amount of data that determines performance, it's also the number and kind of transactions. If all do is 10 simple selects a day, I agree, performance is not an issue. If you need to do 10,000 queries an hour, performance is an issue, even if you have only 270 products. Then not doing the join can certainly be noticeble.

I've been a DBA in a previous job. My response to the original question is "the article contains not enough information to say whether the DBA is right or not". What (s)he says certainly does have merit. But it depends on a lot of things whether the performance gain is noticeble or not. How many selects? How many updates? How many concurrent users accessing the tables? How much cache? What else is going on? It requires an awful lot of knowledge, not only from the strategies of your database server but also from which transactions are going to be performed to say which will give the best performance. Perhaps only realistic testing can tell the difference. And then you still need to make the trade-off between performance and clean design. Note that the drawback (I could make a typo when inserting something) can be overcome in several ways. One could make an insert trigger that rolls back the transaction if an illegal category is inserted. Or one uses a list of constants in the code, or one makes a layer between application(s) and the database that does the actual creation of SQL - and never have applications touch the database directly. The layer could exists of some libraries (modules), but it could also exists of stored procedures. Or some combination.

-- Abigail


Comment on Re: Database Design Issues - OT
Re: Re: Database Design Issues - OT
by adamsj (Hermit) on Jul 13, 2001 at 18:53 UTC
    Perhaps only realistic testing can tell the difference.

    What she said.

    Speaking as a DBA who doesn't spend all his time being a DBA, I love normalized data. I also understand why sometimes denormalizing is the right strategy, and that there are ways to maintain integrity while denormalizing.

    adamsj

    They laughed at Joan of Arc, but she went right ahead and built it. --Gracie Allen

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (18)
As of 2014-07-22 16:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (119 votes), past polls