x

database design help

Hello Guys,

These are my requirements:

  1. Each Category has Multiple Groups
  2. Each group has multiple Attributes
  3. Each attribute has multiple values

So far i have come up with this DB Design

CategoryGroups Table

GroupID | CatID[References Category(CatID)] | GroupName

CategoryAttributes Table

AttributeID | AttributeName | GroupID[References CategoryGroups(GroupID)] | AttributeValue

So do you guys think this is a neat design?? Any suggestions??
more ▼

asked Sep 28, 2012 at 06:43 AM in Default

monodeep12 gravatar image

monodeep12
0 1 1 1

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

You've defined 3 relationships, so that to me would suggest 4 tables (at least)

From a completely normalised design, I could then refine if neccessary:

Category
CategoryID
CategoryDescription

Group
GroupID
GroupDescription
CategoryID --FK to Category

Attribute
AttributeID
AttributeDescription
GroupID --FK to Group

AttributeValue
AttributeValueID
AttributeValueDescription
AttributeID --FK to Attribute
more ▼

answered Sep 28, 2012 at 09:08 AM

Kev Riley gravatar image

Kev Riley ♦♦
52.8k 47 49 76

My main concern now is the how am i going to upload the data in batches?? What i am thinking is that the user has to select the category 1st then the group and then he uploads the attributes with values...am i right?
Sep 28, 2012 at 10:53 AM monodeep12
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x238
x107

asked: Sep 28, 2012 at 06:43 AM

Seen: 506 times

Last Updated: Sep 28, 2012 at 12:16 PM