| | |
Problem with Database Design
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 3
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Oct 2009
Posts: 3
Reputation:
Solved Threads: 0
Whole Database right now:
http://img190.imageshack.us/img190/8...ledatabase.jpg
http://img190.imageshack.us/img190/8...ledatabase.jpg
-1
#4 Oct 6th, 2009
You can do it your self 
Just click on "Mark as Solved" under last post...

Just click on "Mark as Solved" under last post...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Similar Threads
- Database Design Help of a Portal (MySQL)
- Query regarding Database design (Database Design)
- Help database design (Database Design)
- DataBase Design Help (Database Design)
- Database Design for Dating Site (Database Design)
- newbie question about database design (Computer Science)
- Help with contact/mailing list database design... (Database Design)
- Database design - subtypes and instances of an entity (Database Design)
- Database Design Advice (MySQL)
Other Threads in the Database Design Forum
- Previous Thread: ERD for social networking website
- Next Thread: Database Design Help and Suggestions
Views: 907 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Database Design






