SQL Database Schema Design For Large 3 Billion Relationship Database.

Posted by K-Bell on Stack Overflow See other posts from Stack Overflow or by K-Bell
Published on 2010-12-28T19:18:53Z Indexed on 2010/12/28 22:54 UTC
Read the original article Hit count: 208

Filed under:
|

Get your geek on. Can you solve this?

I am designing a products database for SQL Server 2008 R2 Ed. (not Enterprise Ed.) that will be used to store custom product configurations for over 30,000 distinct products. The database will have up to 500 users at a time.

Here is the design problem…

Each Product has a collection of Parts (up to 50 parts per product).
So if I have 30,000 Products and each of them can have up to 50 Parts, that’s 1.5 million distinct Product-to-Part relationships

                                  …or as an equation…

30,000 (Products) X 50 (Parts) = 1.5 million Product-to-Parts records.

…and If…

Each Part can have up to 2000 finish options (A finish is a paint color).

NOTE: Only one finish will be selected by a user at run-time. The 2000 finish options I need to store are the allowed options for a specific part on a specific product.

So if I have 1.5 million distinct product-to-part relationships/records and each of those parts can have up to 2,000 finishes that is 3 billion allowable product-to-part-to finish relationships/records

                                  …or as an equation…

1.5 million (Parts) x 2,000 (Finishes) = 3 Billion Product-to-Part-to-Finishes records.

How can I design this database so that I can execute fast and efficient queries for a specific product and return its list of Parts and all the allowable Finishes for each part without 3 Billion Product-to-Part-to-Finish records? Read time is more important then write time.

Please post your thoughts/suggestions if you have experience with large databases.

Thanks!

© Stack Overflow or respective owner

Related posts about sql

Related posts about Performance