-1

I am working on a project which has several similar forms in terms of values they are supposed to pass to database. In each form 4 out of 5 inputs and the values they hold are just same but 5th one are always different. Therefore I do not think creating several different tables for each different column is the most optimized way and I'd to know the best way of building tables for this kind of situation.

I demonstrate forms and inputs down below.

  • register(name,surname,email,phone number,training_name)
  • we can contact you(name,surname,email,phone number,training you are interested)
  • ask us(name,surname,email,phone number,your question)
  • become a teacher(name,surname,email,phone number,CV)

As you see 5th inputs are always different for each form.

Akberov
  • 154
  • 3
  • 12

2 Answers2

1

Add a fifth table 'users' and reference this from your other tables:

  • register(user_id,training_name)
  • we_can_contact_you(user_id,training you are interested)
  • ask_us(user_id,your question)
  • become_a_teacher(user_id,CV)
  • users(id,name,surname,email,phone)
0

REQUEST A FREE DEMO(name, mobile, email, city, pincode, interested product)

phpforcoders
  • 326
  • 1
  • 9