• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Allowing users to add more fields

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am new to forms and relational database so sorry if i don't make sense here. When applying for a job online there is usually a button that always a user to add more employment history or add additional skills and so on. I want to know how this is done. Because i have a finite set of columns in the database and i have created a form for them on webpage. How can a user create more fields on the fly.
I am making sense here?
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess is that in most of those systems, adding a Skill or an EmploymentHistory for an Applicant doesn't require adding a column to the Applicant table. Instead it just requires adding a row to the Skill or EmploymentHistory table.

If your design requires columns in the Applicant table for various Skills, then your Applicant table isn't properly normalized. Have a look at the Wikipedia entry for Database normalization, where you can learn about database design techniques which avoid your problem. (I was going to call them "modern" database design techniques but the principles were all documented back in the 1970's so "modern" is a really bad word to describe them.)

It's also possible that those systems you refer to are using a NoSQL type of database, but similar principles apply in that case too.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:My guess is that in most of those systems, adding a Skill or an EmploymentHistory for an Applicant doesn't require adding a column to the Applicant table. Instead it just requires adding a row to the Skill or EmploymentHistory table.


Same here. Even if the fields are 100% custom, you could create a mapping table with "field name" as they key and then another columns the value.
reply
    Bookmark Topic Watch Topic
  • New Topic