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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:48:16+00:00 2026-05-16T17:48:16+00:00

I have been thinking and learning a lot about forms lately trying to add

  • 0

I have been thinking and learning a lot about forms lately trying to add advanced extensions to the Spree ECommerce Platform: Subscriptions, Events, Donations, and all kinds of Surveys.

Every example I have ever encountered (in blogs, in the docs, in screencasts, in source code, etc.) make forms out of Models, but they never go to anything semi-structured or unstructured (or just really dynamic). So you have forms like:

  1. Contact Form (User Model, maybe divided into an Address Model too)
  2. Registration Form (User Model, Account Model, Address Model, etc.)
  3. Blog Post Form (Post Model, Tag Model, etc.)
  4. Checkout Form (Shipping Model, Order Model, LineItem Model, etc.)

All of those make perfect sense: They are the culmination of 10’s of thousands, millions even, of man hours. Tons of people have slowly abstracted those things down into nearly universal “models” that could be saved into a database table. So now we all create models for them and make database tables for them.

But there are so many other things that can’t be boiled down to those specific models. Things like a survey for a specific event, with form fields such as:

  1. Are you Pregnant?
  2. How many kids do you have?
  3. Have you ever been sick?
  4. What’s your fastest mile?

If we started to save those things to the database in tables, we would have 100s and 1000s of database tables, one for each set of questions, or “survey”.

So my thinking is, there’s got to be some point at which you stop creating specific models like the “Post” and the “Order” and start just making a “Form” or “Survey” model (Form ~ Survey ~ Questionnaire to some degree).

Everything would be boiled down to these few models:

  1. Survey
  2. Question
  3. Answer
  4. ResponseSet (answers to questions in survey)
  5. Response (specific response in response set)

And from those you could create any type of “Form” you wanted.

So my question is basically: When do you, in the most practical, day-to-day client projects, stop making forms with a bunch of models in them (a “Checkout” form is a form for the “Order” basically in Spree, but that easily requires 10 database models), and just start using Question/Answer or Field/Input or Key/Value? Practically?

I’m just looking for something like “when we built our online tutoring system, we didn’t end up creating a bunch of SomeTutorialModel objects which extend TutorialModel, because that would’ve added too many tables to our database. Instead, we just used the Surveyor gem“. Something along those lines :).

There’s not much out there on this semi-structured type of data, but lots when you can boil it down to something super concrete.

It seems that if you used a Document Database, like CouchDB, you’d end up being able to create all kinds of Model objects in ruby for example, and could get them out with some clever view tricks. But with MySQL and the-like, it seems insane.

  • 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-16T17:48:16+00:00Added an answer on May 16, 2026 at 5:48 pm

    Your question is quite broad, so I will instead of giving direct answers mention these points:

    1.) models often reflect the target (core) domain of the application, so the boundary between key/value and model is about the domain

    2.) AFAIK e.g. Google uses relational databases even to store key/value data, so they can store everything as using document database

    3.) all your questions are basically about modeling and abstraction, which is hard to explain shortly or in general

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

Sidebar

Related Questions

I have been thinking quite a bit here lately about screen scraping and what
I've been thinking about software estimation lately, and I have a bunch of questions
I've been thinking a lot lately about a music-oriented project I'd like to work
I am after so advice really. I have been thinking about a client server
Ok, have a bunch of questions that I have been thinking about the past
I have recently been thinking about the difference between the two ways of defining
I've been thinking about the number of projects we have in-house that are still
I've been thinking about this problem for a while and have yet to come
I have been thinking of maybe writing a little tool that logs into SO
I've been thinking of ways of providing syntactic sugar for a framework I have

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.