Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Allowing users to add more fields

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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: 25682
69
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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: 40035
809
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • 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.
 
Dinner will be steamed monkey heads with a side of tiny ads.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic