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

  • SEARCH
  • Home
  • 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 8593591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:01:32+00:00 2026-06-12T00:01:32+00:00

I have a Products Table as NodeID | ParentNodeID | NodeName where node can

  • 0

I have a Products Table as NodeID | ParentNodeID | NodeName where “node” can be a “Product” or a “Category”. Say for example:

NodeID | ParentNodeID | NodeName

0|| ||Root

1|| 0 || Electronics

2 || 1 || Mobiles

3 || 2 || Samsung

4 || 2 || Apple

5 || 2 ||Nokia

6 || 5 || Nokia 1100

7 || 5 || Nokia Lumia 800

and so on..

Now, Root > Electronics > Nokia are the Categories and Nokia 1100 is the Product.
For each of the product, I want a particular set of Attributes(Specifications) related to the product.
I am maintaining that relation in a table ProductAttributes with columns : AttributeId || AttributeName || Value || NodeID where i will be keeping all the Attributes and their corresponding values for a particular NodeID (E.g. Nokia 1100).

So when the user is posting “Nokia 1100”, he will have all the Attributes with pre-filled values in the UI.

Suppose now what the user is posting, is not there in the database, Eg. say he is posting “Samsung Focus”. He will now have an option to select the “category” under which he will be posting this request, “Mobiles” in this case.

So what i want is somehow, the user should be shown Attributes related to Mobiles only (with/without default values) which the user can then select whichever is applicable and then post the request.

For this, i am thinking of putting some default Attributes to the “Categories”, which will be available whenever he selects that category.

But i am unable to come up with a proper table structure for this approach and the relations. I mean, there might be multiple attributes for a single category and there may be multiple values for each of the attribute.

I hope i am able to portray what i am trying to do here,
any help is appreciated.

  • 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-06-12T00:01:33+00:00Added an answer on June 12, 2026 at 12:01 am

    It sounds like you are looking for an EAV (Entity Attribute Value) pattern

    http://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model

    Be aware though that this approach (some say anti-pattern) is strewn with pitfalls.

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

Sidebar

Related Questions

I have a products table, with the fields product, category and cost, of type
I have a PRODUCTS table, and each product can have multiple attributes so I
I have a products table and each product have a category field (this is
Let's say I have a Products table, ProductsCategory table and a Category table. The
I have a products table containing products. Each product can have multiple images. The
I have a products table which contains information about products. Each products can have
Hello i have a products table that contains normal products and configurable product It
I have a products table, with the fields productname, category and cost, of type
ok here is it. i have two tables: products and warehouse product table consist
Here is my problem. For example I have a table Products that contains a

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.