• Lynn Pettis (6/12/2008)


    Not knowing the full details of the example it is difficult to make a judgement. One thing to remember is that while designing a database for a production application (as opposed to one for database class) you will make decisions to denormalize a design for performance reasons. Although it may make sense to split off those aspects of the data that relate only to books or coffee into their own table, you may experience performance issues as you increase the number of tables you have to join in a query.

    😎

    As in? Like when you'd want to see all data of all products that were ordered on a certain date? If it's just one Products table this is fast as opposed to each product in a separate table? Wouldn't that query look a mess and all columns irrelevant to a product (book_author for coffee) would be null?

    What if you have 50 products?