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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:21:15+00:00 2026-06-12T06:21:15+00:00

My project has a requirement to support configurable forms format. What I mean by

  • 0

My project has a requirement to support configurable forms format. What I mean by that is the user can add ‘n’ number of columns to a form(to design it) and then the column data has to be saved in the db. Later on I also want to query on those columns for where clause..

But since the number and type of columns is not fixed, how do I design my database to support such a functionality?? I am using Java as my programming language and PostgreSQL db.

  • 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-12T06:21:16+00:00Added an answer on June 12, 2026 at 6:21 am

    This is not as hard as it sounds. You just need a separate table for the columns in the form and for the value in each entity (one instance of the filled in form). This is sometimes call and Entity Attribute Value model.

    form

    • ID
    • Name
    • etc

    form_column

    • Form ID
    • column
    • attribute

    entity

    • ID
    • form ID

    entity_attribute

    • entity ID
    • form column
    • attribute
    • value (you can just use string, or have a value_string, value_int, and value_float)

    To search for entities, your query screen can build up the SELECT statement by adding “OR (entity_attribute.entity_id=entity.entity_id and entity_attribute.attribute=FOO and entity_attribute.value=BAR)” subclauses to the WHERE clause.

    An alternate approach would be to store the form design and the entities (filled in forms) as XML. From there you can use XMLBeans or a DOM parser to work with the entities.

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

Sidebar

Related Questions

I am working on a project that has a requirement such that login details
My project has a C++ library that I want to allow the user to
My project has a requirement to gather data from a number of sources, then
I have a project that has a requirement of displaying map data in offline
My project has a file foo that I've been using and checking in with
I'm working at the moment on a new project which has following requirement: Several
I'm inheriting a project that has, until now, had all its artifacts maintained in
I've an existing MVC3 project that implements a certain functionality, this project has it's
For business reasons the project I'm working on has the requirement to determine which
My next project has a requirement to display Japanese text which is displayed top-to-bottom

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.