Solved

How to build specifications templates for products table

Posted on 2014-07-31
3
471 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now