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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:27:18+00:00 2026-06-03T06:27:18+00:00

I want to structure a table to mimic column level filters as row level

  • 0

I want to structure a table to mimic column level filters as row level filter just to avoid adding new columns.

Let’s say i have following table to store cars’ details

-------------------------------------
Type        Color       Year
-------------------------------------
Mini        Silver      2010
Standard    Silver      2011
Fullsize    White       2011
Luxury      Black       2010
Sports      Red     2011
Convertible Red     2009

If i want to store Make of these cars as well and for this i have to add an additional column and another column if i have automobiles other than cars.

So the question is how can i structure this table to avoid adding new columns? The structure should require only to add rows to define properties of my records.

[Hint] The structure may have multiple tables, one to store rows/records and other to store columns/properties and then some kind of mapping between them OR entirely new structure.

EDIT

Some of the properties of my data are fixed and some are dynamic. Fixed properties can be mapped to the given sample Car model as Availability, Condition and the dynamic could be anything which a person may ask about an automobile. Now i don’t need all columns to be mapped as rows but few and these are dynamic and i don’t even know all of them. My apologies that i didn’t mention this earlier.

  • 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-03T06:27:19+00:00Added an answer on June 3, 2026 at 6:27 am

    You could use the entity-attribute-value design (EAV).

    entity  attribute   value
    1       Type        Mini
    1       Color       Silver
    1       Year        2010
    1       Make        Foobar
    2       Type        Standard
    2       Color       Silver    
    etc...
    

    You may also wish to store the attribute names in a separate table.

    However you should consider carefully if you really need this, as there are a few disadvantages. The value column must have a type that can store all the different types of values (e.g. string). It is much more cumbersome to write queries as you will need many joins, and these queries will run more slowly as compared to a traditional database design.

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

Sidebar

Related Questions

I want to create a table structure with checkbox for each row and each
I want to store a data structure thats a table with one column Strings
I have a structure called table, I just want to create a table, like
I have the following table structure. I just want to update SubId to all
I want to implement a table structure which can have multiple rows and columns
Assume a table structure of MyTable(KEY, datafield1, datafield2...) . Often I want to either
Data table structure is: id1,id2,id3,id4,... (some other fields). I want to create summary query
i have table structure with 3 colums (column1, column2, column3) and i want to
I have a table Sample and another SampleLog With these structure I want to
I execute a select to get the structure of a table. I want to

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.