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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:31:15+00:00 2026-05-28T13:31:15+00:00

I have a web application that uses a relational database (MySQL). We’re adding a

  • 0

I have a web application that uses a relational database (MySQL). We’re adding a new feature that will allow certain users to dynamically construct ‘forms’ from a pool of optional form elements and distribute these forms for completion/submission to other users.

The problem lies in storing the completed form submissions. Each form can and will vary in the number and combination of form elements, and with a relational database my options are somewhat limited to dynamically creating a new table to hold the submissions of each form (seems like a bad path to go down) or storing each of the submitted forms as JSON in a TEXT column (losing all useful querying abilities of RDBMSs)

I’ve never actually used MongoDB in a production project before, but I’m thinking it might be a good idea to use my MySQL relational database to store all the forms created by certain users of my application, and then store all the submissions in MongoDB with each document referencing the UUID of the form in MySQL.

The first disadvantage I can think of with this approach is there’s no referential integrity between form submissions and the forms located in MySQL. If I delete a form in MySQL, all of the form submissions will have to be manually deleted (if I want to replicate the ‘Cascade’ effect)

Would I store all of my form submissions for all of my forms in a single MongoDB collection as individual documents? Any advice is greatly appreciated. 🙂


EDIT 1
Based on the documentation here: http://www.mongodb.org/display/DOCS/Using+a+Large+Number+of+Collections

I’m now considering creating a new collection to hold all the submissions from each unique form type.


EDIT 2

After some careful consideration and the advice of others I’ve decided to abandon my dual-database approach to solving this problem in favor of a relational-database schema that I think solves the problem of creating dynamic forms and saving the form submissions in such a way that they’re easily query-able for complex reporting.

enter image description here

Essentially every record in ‘forms’ represents a unique form that was built by a user. ‘forms_fields’ has a foreign key that references the form and an enum-type with the options:
1. checkbox
2. textfield
3. textarea
4. select
5. multi-select
6. date

‘forms_fields_options’ contains all of the ‘options’ a select field would have.
With these three tables, users can create customized forms.

When another user fills out & submits the form, a record is created in forms_submissions. For each field, a corresponding record will be created in ‘forms_submissions_fields’ that references the form submission and the forms_fields_id. The final table, ‘forms_submissions_options_multiselect’ is essentially a join-table to indicate which options from a multi-select form field the user selected.

  • 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-28T13:31:15+00:00Added an answer on May 28, 2026 at 1:31 pm

    A colleague of mine recently lead a webinar on just this subject, titled “Hybrid Applications with MongoDB and RDBMS”. You can view it here:
    http://www.10gen.com/events/hybrid-applications

    From the comments, it looks as though you have already decided to go the RDBMS route, but hopefully this can give you some ideas for a future project, or be beneficial to someone else reading this thread.

    Good luck with your application!

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

Sidebar

Related Questions

I have an older web application that uses a MySQL Database (MYISAM). I noticed
I have a web application that uses Ext-JS 2.2. In a certain component, we
We have a web application that uses SQL Server 2008 as the database. Our
I have developed a web application that uses a web server and database hosted
I'm developing an web application that uses a non-relational database as a backend (django-nonrel
I have a web application that uses the current version of JQuery that needs
I have a web application that uses a number of WCF Services. I deploy
I have a web application that uses TONS of javascript, and as usual, there
I have a web application that uses AzMan authorization to grant different functionality to
I have a web application that uses two databases. DB1 Users perform their CRUD

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.