User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 427,196 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,159 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 586 | Replies: 7
Reply
Join Date: Mar 2008
Posts: 4
Reputation: John_Blaze is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
John_Blaze John_Blaze is offline Offline
Newbie Poster

Help Product DB

  #1  
Mar 17th, 2008
I have a DB to setup using products:

This is what I have and am seeking input and design for Inventory. I want to separate inventory by product properties (i.e. Sizes [Small - Medium - Large - X-large ] Color [White - Black - Green] )

So, count by color, by color & size (etc.)

Products
- ProductID
- Name
- Description
- CategoryID

ProductPrice
-PriceID
-ProductID
-Price

ProductProperty
-ID
-Name
-Desc
-Order


PropertyVariation
-ID
-PropertyID
-Name
-Value

I am thinking about breaking out inventory into 2 tables:
Inventory
-ID
-ProductID
-Quantity
-Current Quantity
-Order

PropertyInventory
-ID
-InventoryID
-PropertyID
-Quantity
-CurrentQuantity

Does this sound about right or should it be simplified?

Thanks for any input.
J
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: Product DB

  #2  
Mar 18th, 2008
Your tables suggest you may need to do some more work on RDBM design. You have features and attributes of Products spread throughout several tables, when I believe they could all be in one table, with the appropriate fields. You want to try and collect all information about a thing or event in one table. In your case, so far I've only seen mention of 'Products'. What else are you going to put in your database, if anything?

Try and get a good book on relational database design. Some good ones that I use are 'Database Design for Mere Mortals' by Michael Hernandez, 'SQL Queries for Mere Mortals' by same author, and 'MySQL' by Paul Dubois.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Mar 2008
Posts: 4
Reputation: John_Blaze is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
John_Blaze John_Blaze is offline Offline
Newbie Poster

Re: Product DB

  #3  
Mar 19th, 2008
I think that the tables are spread to thin. I need pair them down abit, I just want product inventory system that tells you how many red t-shirts in xlarge without have a column (red shirt - xl).

Something for quick look ups - shirts then more tables (I'm thinking) once a user drives down the search.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: Product DB

  #4  
Mar 19th, 2008
Originally Posted by John_Blaze View Post
I think that the tables are spread to thin. I need pair them down abit, I just want product inventory system that tells you how many red t-shirts in xlarge without have a column (red shirt - xl).

Something for quick look ups - shirts then more tables (I'm thinking) once a user drives down the search.


If all you want to know is how many of X you have, then why not just use a spreadsheet? Or is this supposed to be a web-based application?
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Mar 2008
Posts: 4
Reputation: John_Blaze is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
John_Blaze John_Blaze is offline Offline
Newbie Poster

Re: Product DB

  #5  
Mar 19th, 2008
Yeah it's web application in which this is a small part. I'm just trying to think for a good DB design that is generic enough to be used in the future for many products.

For example:
Shirt red XL
1000 shirts
200 red
100 XL

I want to break it out for max flexibility.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: Product DB

  #6  
Mar 19th, 2008
You already have the basic information you need to start the database: item name, color, size, cost, price, etc. So make those fields in a Products table and start populating them. Include an ID field to tie in with future tables (suppliers, customers, invoices, etc.)
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Mar 2008
Posts: 4
Reputation: John_Blaze is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
John_Blaze John_Blaze is offline Offline
Newbie Poster

Re: Product DB

  #7  
Mar 19th, 2008
yeah - its working, but thinking on simplifying a bit. As building a inventory system from these tables is becoming difficult.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 176
Reputation: trudge is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: Product DB

  #8  
Mar 19th, 2008
What tables? Do a 'describe' for each table and post it, along with what exactly you are having trouble with.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 10:28 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC