Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 525651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:41:39+00:00 2026-05-13T08:41:39+00:00

I cant seem to get my head around how to create this Each Bold

  • 0

I cant seem to get my head around how to create this
Each Bold Letter is a Database Table
I need this to work with Entity Framework

Product

[ Product belongs to one group]
Product Group – [Computer]

[many to many]

[Group has many items]
[Product belongs to one Group Item]
Product Group Item – [Hard Drive]

[many to many]

[Group Items has Many Fields]
[Fields does not change for each product only changes for each Group Item]
Product Group Item Field – [Form Factor]

[Group Item Fields has many values]
[Field Values Change with each product]
Product Group Item Field Values – [ 3.5″ ]

I can pretty much get the first 3 to work
my problem is how to do the last two tables
I hope I explained it clear enough
thanks in advance

alt text http://myimgs.net/images/cjgo.gif

maybe this will help or just hurt who knows

Product = is a harddrive

so:

Group – Computer
GroupItem – Harddrive

GroupItemField – Form Factor : GroupItemFieldValue – 3.5″
GroupItemField – Capacity : GroupItemFieldValue – 600MB
etc…

but the field value changes for each product of type Harddrive but the field does not

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:41:39+00:00Added an answer on May 13, 2026 at 8:41 am

    I think you may be trying to over-generalise your solution.

    It seems to me you want to standardise the information you capture for different kinds of products.

    E.g. Hard Drives

    1  Supplier1   Model 1a   3.5"    600MB
    2  Supplier1   Model 1b   3.5"    200GB
    3  Supplier2   Model X    2.5"    600MB
    

    And you want to represent the attributes in a single table:

    1 FormFactor   3.5"
    1 Capacity     600MB
    2 FormFactor   3.5"
    2 Capacity     200GB
    3 FormFactor   2.5"
    3 Capacity     600MB
    

    The problem is that over-generalising like this you lose all the data integrity controls that your RDBMS provides.

    You may be better off with:

    Product (*Id, Name, GroupId, Supplier, Model, …)
    HardDrive (*Id, FormFactor, Capacity, …)
    Monitor (*Id, Resolution, …)
    Memory (*Id, Capacity, Speed, …)

    Each of the above product specific tables has an optional-to-one reference to Product. With such a design, it becomes impossible to capture Monitor attributes for a hard-drive unless you add a Monitor row for the product.

    That said, if you’re willing to forego integrity controls, or manage them yourself in code, then looking at sample data helps to produce your schema. (I’m going to use the terminology of attributes.)

    AttributeValues (*ProductId, *AttributeId, Value) — Note a problem here: what type should Value be?

    You will need some way of indicating what attributes are allowed for each Group:

    HardDrive FormFactor  Req
    HardDrive Capacity    Req
    Monitor   Resolution  Req
    Monitor   Colour      Opt
    Memory    Capacity    Req
    Memory    Speed       Req
    

    GroupAttributes (*GroupId, *AttributeId, IsOptional)

    Then you need to indicate the group to which a product belongs (so that you can figure out which values need to be filled in)

    1  Supplier1   Model 1a   HardDrive
    2  Supplier1   Model 1b   HardDrive
    3  Supplier2   Model X    HardDrive
    4  Supplier2   Model M1   Monitor
    

    Products (*ProductId, Group, SupplierId, ModelNo)

    I’m not sure where your GroupItems fit in.

    Relationships
    Products.GroupId -> Groups.GroupId
    Products.SupplierId -> Suppliers.SupplierId
    GroupAttribute.GroupId -> Groups.GroupId
    GroupAttribute.AttributeId -> Groups.AttributeId
    AttributeValue.ProductId -> Products.ProductId
    AttributeValue.AttributeId -> Attributes.AttributeId

    NOTE
    I’ve illustrated how you can add columns defining rules for the attribute values. You could do the same for the Attributes table where you’d probably at a minimum need to indicate the data-type of the attribute.

    You may notice that it won’t be long and you’ll soon be replicating the meta-data that your RDBMS provides to define tables and columns. The highly generalised solution does have its benefits such as using a simple template mechanism to capture and view products. But it becomes quite a bit more difficult (in code and processing time) to perform other tasks. So I suggest you consider your requirements holistically against the design.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.