Re: Multiple Product Description and Quantities?



On 28 Dec 2006 08:13:53 -0800, "tedzbug" <tedzillich@xxxxxxxxx> wrote:

I am working on normalizing my DB and wondering if this is the proper
approach.

I have Quotes with multiple items on them and each item can have
multiple quantities with a price.

Do i need a separate table for the items and then a sub table with the
quantities?

http://i118.photobucket.com/albums/o117/tedntss/dialogue.jpg

An example of my current work in progress...............

Don't confuse data PRESENTATION with data STORAGE.

It looks from your graphic that you're making a couple of mistakes.
Each line item actually has four lines for different categories of
that tool. In a properly normalized database you'll have a Table for
each class of Entity; it sounds like you have a one-to-many
relationship between Tools and special cases of tools (Solid Carbide
vs. blank...? what's the blank mean?). The entity with a price is the
second table.

I'd see the following tables:

GenericTools
ToolNumber <primary key>
Description
<other fields about the tool as an object>

SpecificTools
ToolNumber <link to GenericTools>
ToolType <e.g. "Solid Carbide">
Price

Quotes
QuoteID <Primary Key>
QuoteDate
CustomerID
<other fields about the quote as a whole>

QuoteDetails
QuoteID
ToolNumber
ToolType
Quantity


John W. Vinson[MVP]
.



Relevant Pages


Quantcast