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 864083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:25:03+00:00 2026-05-15T09:25:03+00:00

I’ve googled this and found that it’s almost impossible to create a database with

  • 0

I’ve googled this and found that it’s almost impossible to create a database with dynamic columns. I’ll explain my problem first:

I am making a webshop for a customer. It has multiple computer products for sale. CPU’s HDD’s RAM etc. All these products have different properties, a CPU has an FSB, RAM has a CAS latency. But this is very inconvenient because my orders table needs foreign keys to different tables which is impossible.

An other option is to store all the product specific information in a varchar or blob field and let PHP figure it out. The problem with this solution is that the website needs a PC builder. A step-by-step guide to building your PC. So for instance if a customer decides he wants a new “i7 920” or whatever I want to be able to select all motherboards for socket 1366, which is impossible because all the data is stored in one field. I know it’s possible to select all motherboards from the DB and let PHP figure out which ones are for socket 1366 but I was wondering,

is there a better solution?

  • 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-15T09:25:03+00:00Added an answer on May 15, 2026 at 9:25 am

    You might want to take a look at this question/answer in order to figure out if that’s the way you really want to go… I’m not so sure.

    The real issue is that you have highly related and very different components. However, they do share properties in common…

    So, let’s say you have a ProductProperties table that looks something like

    ProductId 
    PropertyTypeId
    PropertyId
    Value
    

    The products table should be something like:

    ProductId
    ProductCategoryId
    Name
    etc...
    

    Assuming product 1 is a processor with a 1366 pin out, and product 2 is a motherboard with a 1366 socket, then each would have a Property of the “Socket” type with a value of 1366. This would make it extremely easy to query for. By querying the ProductProperties table (joining on Products), just exclude the ProductCategory of the item they are currently looking at to find products in other categories that work… Or, if you know the category ahead of time (like motherboards) you just select that way.

    You could go a little further on the admin side by defining Product Templates which automatically brought in the PropertyTypes at the time you are adding a new product. They would simply select the template, fill in the values and save..

    As a side note, I’m glad to know someone is working on a cart like this. I love newegg, but one thing I’ve felt they’ve always missed on is being able to link things like which processors will work with which motherboards.

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

Sidebar

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.