0

i'm making a custom form builder app similar to google forms or wufoo and i've completed the basic database design. However there is one thing i can't figure out. I'd like to keep track of version of each built form. Like if there is a change in an existing form i don't want to just update it to lose old form design, i want to keep the old design and save the new one with a new version number. How can achive the versioning?

Here is what i have so far: enter image description here

Each Application is a form design, Page is a page in the form, Form is a section of the page and FormComponent is the component (textbox, radio, select, ...)

1
  • 1
    A simple solution is to handle the new version of an older form simply like as if it was a new form. If your forms currently have a name as unique identifier, change this to name + version number being the unique id.
    – Doc Brown
    Jun 13, 2022 at 19:17

1 Answer 1

1

There are a variety of options with associated trade offs:

  • Create a new explicit version of the form for each change - and snapshot each element of the form for each change. Lots of records, but easy to implement and recall.
  • Create a new explicit version of the form, but only associate changed records with the new version. Fewer records, easy to implement, complex queries to recall. I'm not a fan of this, because it makes the foreign keys implicit which makes for confusing architecture.
  • Make all tables date effective (implicit versioning). Fewer records, but complex queries. You need all the joins to take into account the date. Most databases can handle this efficiently. See Version controlling a database's contents for an example of this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.