Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kkris1983
Starting Member
3 Posts |
Posted - 2009-10-03 : 13:36:34
|
Hi!I am a student and I am working on database that concerns customer-order-product relationship. When designing it I encountered an issue that I do not really know how to solve it in the way it seems reasonable and obeys Normalization process. I would appreciate for any assistance.Description of my problem:We have product for instance T-shirt that can have different sizes and colors and each of this specific combination has quantity ([url]http://img251.imageshack.us/img251/8871/products.jpg[/url])Next I created relation between Orders and Products as many-to-many ([url]http://img406.imageshack.us/img406/8471/orderdetails.jpg[/url]). And here problems starts… In Order_Details table if someone order 5x of T-shirt with size S and color blue, and then 3x of the same T-shirt but with M size I will have repeated some values. Another thing is that Size and Color attributes rely only only on ProductFK Key and not the whole Key (OrderFK-ProductFK) so I moved these details to another table like here([url]http://img18.imageshack.us/img18/3507/productorderdetails.jpg[/url]), but now arise another problem Quantity attribute… in my it should be placed in Order_Details, right ? The thing is now I ended up with basically the same table like Product_Size_Color ([url]http://img251.imageshack.us/img251/8871/products.jpg[/url]) but without Quantity attribute which we do not need here since I assume it should be in Order_Details table. How I can combine it altogether to get consistent database ?Whole database until now looks like this ( [url]http://img190.imageshack.us/img190/8130/wholedatabase.jpg[/url] )If there is anything else that in Your opinion is bad please let me know. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-10-03 : 14:35:13
|
where's order quantity included? |
|
|
kkris1983
Starting Member
3 Posts |
Posted - 2009-10-03 : 15:43:50
|
As I mentioned in my post Quantity is in Order_Details table |
|
|
kkris1983
Starting Member
3 Posts |
Posted - 2009-10-04 : 11:55:57
|
My problems are solved. You can close that post |
|
|
wgsing
Starting Member
11 Posts |
Posted - 2009-11-09 : 04:31:40
|
Please share the solution? |
|
|
rihanna
Starting Member
3 Posts |
Posted - 2009-11-15 : 18:29:51
|
Hi,Share the Solution with us.Bulk Sms |
|
|
|
|
|