If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Design bundle/product DB schema

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-18-11, 21:13
beam36 beam36 is offline
Registered User
 
Join Date: Jan 2011
Posts: 1
Design bundle/product DB schema

I am designing a DB for storing which user has which bundles/products.
Simple enough, I first created 3 tables, USER, BUNDLE and PRODUCT. Then create another 2 tables USER_BUNDLE and BUNDLE_PRODUCT to map many-to-many relationship. But the twist is users can also enable/disable each product. So I remove USER_BUNDLE and create USER_BUNDLE_PRODUCT instead which consists for USER_ID, BUNDLE_ID, PRODUCT_ID and PRODUCT_STATUS.

The problem with this is the data in USER_BUNDLE_PRODUCT can be incomplete. Suppose bundle A is defined as having product 1,2,3 in BUNDLE_PRODUCT, someone can still add only product 1,2 and miss 3 in USER_BUNDLE_PRODUCT.

Is there anyway to design the schema to enforce that there couldn't be any miss product from the user?

Thanks for every replies in advance
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On