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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:59:37+00:00 2026-05-15T00:59:37+00:00

I’m creating a data-entry application where users are allowed to create the entry schema.

  • 0

I’m creating a data-entry application where users are allowed to create the entry schema.

My first version of this just created a single table per entry schema with each entry spanning a single or multiple columns (for complex types) with the appropriate data type. This allowed for “fast” querying (on small datasets as I didn’t index all columns) and simple synchronization where the data-entry was distributed on several databases.

I’m not quite happy with this solution though; the only positive thing is the simplicity…
I can only store a fixed number of columns. I need to create indexes on all columns. I need to recreate the table on schema changes.

Some of my key design criterias are:

  • Very fast querying (Using a simple domain specific query language)
  • Writes doesn’t have to be fast
  • Many concurrent users
  • Schemas will change often
  • Schemas might contain many thousand columns
  • The data-entries might be distributed and needs syncronization.
  • Preferable MySQL and SQLite – Databases like DB2 and Oracle is out of the question.
  • Using .Net/Mono

I’ve been thinking of a couple of possible designs, but none of them seems like a good choice.

Solution 1: Union like table containing a Type column and one nullable column per type.

This avoids joins, but will definitly use a lot of space.

Solution 2: Key/value store. All values are stored as string and converted when needed.

Also use a lot of space, and of course, I hate having to convert everything to string.

Solution 3: Use an xml database or store values as xml.

Without any experience I would think this is quite slow (at least for the relational model unless there is some very good xpath support).
I also would like to avoid an xml database as other parts of the application fits better as a relational model, and being able to join the data is helpful.

I cannot help to think that someone has solved (some of) this already, but I’m unable to find anything. Not quite sure what to search for either…

I know market research is doing something like this for their questionnaires, but there are few open source implementations, and the ones I’ve found doesn’t quite fit the bill.

PSPP has much of the logic I’m thinking of; primitive column types, many columns, many rows, fast querying and merging. Too bad it doesn’t work against a database.. And of course… I don’t need 99% of the provided functionality, but a lot of stuff not included.

I’m not sure this is the right place to ask such a design related question, but I hope someone here has some tips, know of any existing work, or can point me to a better place to ask such a question.

Thanks in advance!

  • 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-15T00:59:38+00:00Added an answer on May 15, 2026 at 12:59 am

    Have you already considered the most trivial solution: having one table for each of your datatypes and storing the schema of your dataset in the database as well. Most simple solution:

    DATASET Table (Virtual "table")
    ID - primary key
    Name - Name for the dataset/table
    
    COLUMNSCHEMA Table (specifies the columns for one "dataset")
    DATASETID - int (reference to Dataset-table)
    COLID - smallint (unique # of the column)
    Name - varchar
    DataType - ("varchar", "int", whatever)
    
    Row Table 
    DATASETID
    ID - Unique id for the "row"
    
    ColumnData Table (one for each datatype)
    ROWID - int (reference to Row-table)
    COLID - smallint
    DATA - (varchar/int/whatever)
    

    To query a dataset (a virtual table), you must then dynamically construct a SQL statement using the schema information in COLUMNSCHEMA table.

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

Sidebar

Ask A Question

Stats

  • Questions 416k
  • Answers 416k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unfortunately the regular commands for commenting and uncommenting (Ctrl+K+C and… May 15, 2026 at 9:24 am
  • Editorial Team
    Editorial Team added an answer I found the solution myself: RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule… May 15, 2026 at 9:24 am
  • Editorial Team
    Editorial Team added an answer @Jason has a good point here with regards to Javascript… May 15, 2026 at 9:24 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.