Solved

How to build specifications templates for products table

Posted on 2014-07-31
3
473 Views
Last Modified: 2014-08-04
Hi,
I would like to have some tips regarding tables normalization.
I have a table with 20 k products in electronics, informatics etc etc
Id_product
Description
Price
Etc etc
We are building a web site, and i need to enter spécifications for each product.
In one family of products, we can retrieve almost same specifications but some times one or more spec are different.
For exemple :
A led bulb
Power : 3 watts
Lumen : 250 lumens
Socket : E14
Led technology : SMD
Type of bulb : candle
80 % of the bulbs are the same but we can imagine that one bulb is built with a PIR detector.
So that product will have a spec more.
Now i have mother motherboards, i need another template :
Cpu : xx
Chipset : xx
Slots : xx
ETc etc…
Here also , we can have some different specs some times.
Do you have some tips to build templates and to link them to my products table ?
Tanks
Best regards
0
Comment
Question by:Ok123
  • 2
3 Comments
 
LVL 84
ID: 40231328
I'd think you need an Attributes table:

tAttributes
==============
AttributeID
ProductID
AttributeName
AttributeValue

So for the LED bulb, you'd have 5 records in that table. If that "LED Bulb" has a ProductID of "101", then your table would look something like this:

AttID   ProdID  AttName                 AttValue
==========================================================
1	101	Power			3 Watts
2	101	Lumsn			250 Lumens
3	101	Socket			E14
4	101	LED Technology	        SMD
5	101	Type of Bulb	        Candle

Open in new window

0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 40231335
Note too that you could create "Templates" for commonly used Attributes. For example, all Motherboards would have attributes like CPU Type, Amount of Ram, etc etc, so you could also create a Template table that could be used when adding a new Product:

tTemplate
==============
TemplateID
ProductType
ProductDesc
etc etc

tTemplate_Attributes
---------------------------
TemplAttId
TemplateID
AttributeName
AttributeDefaultValue

So you'd add a new record to the Template table, then add one or more Attributes to the Template_Attributes table for each. When a new Product is added that would meet the criteria for use of that Template, you could add the related records from the Template_Attributes table to the Attributes table, and allow the user to enter the values.
0
 

Author Closing Comment

by:Ok123
ID: 40239390
Hi Scott,
It's exactly what i need :-)

Thank you .
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question