944,020 Members | Top Members by Rank

Ad:
Oct 3rd, 2009
0

Problem with Database Design

Expand Post »
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 (http://img251.imageshack.us/img251/8871/products.jpg)
Next I created relation between Orders and Products as many-to-many (http://img406.imageshack.us/img406/8...derdetails.jpg). 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(http://img18.imageshack.us/img18/350...derdetails.jpg), 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 (http://img251.imageshack.us/img251/8871/products.jpg) 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 (http://img18.imageshack.us/img18/8130/wholedatabase.jpg)
If there is anything else that in Your opinion is bad please let me know.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kkris1983 is offline Offline
3 posts
since Oct 2009
Oct 3rd, 2009
0

Re: Problem with Database Design

Reputation Points: 10
Solved Threads: 0
Newbie Poster
kkris1983 is offline Offline
3 posts
since Oct 2009
Oct 4th, 2009
0

Re: Problem with Database Design

My problems are solved. You can close that post
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kkris1983 is offline Offline
3 posts
since Oct 2009
Oct 6th, 2009
-1
Re: Problem with Database Design
You can do it your self

Just click on "Mark as Solved" under last post...
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,658 posts
since Dec 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: ERD for social networking website
Next Thread in Database Design Forum Timeline: Database Design Help and Suggestions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC