Bad Microsoft DB Schema Example

  • K. Brian Kelley (8/1/2008)


    Alvin Ramard (8/1/2008)


    One thing to think about ....

    If you have separate tables for each product, what happens if they add a product? Someone needs to add at least one a new tables and whatever else goes with it.

    By having one table with all products then there is no need to add new tables for new products.

    But if you follow the model given out logically, adding a 3rd product type would add a 3rd set of columns to the table. Let's say our bookstore now sells pets. That means you have columns for:

    - Animals

    - Books

    - Coffee

    in that one table. Since those should be mutually exclusive sets, that means 2 sets of columns will always be nulls, etc. You get the idea. It would probably be better to go to separate tables, if that's the case.

    I admit that I did not pay attention to the columns in the table. I still think that a single table would be a better idea, but it has to be a well designed table.

    Looks like this is indeed a poorly designed database.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • After navigating to your link, it's shown as a how to for an order management database. That being the case, that Product table is a reprehensible thing to be showing someone new to database design.

    --SJT--

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply