Mysql – How to structure different types of a model in MySQL

database-designMySQL

I am building an application where users can apply for small business loans. There are 4 types of loans (A,B,C,D). There are 10 commons questions no matter which type they choose, but then based on which type of loan they want, there are 3-4 more questions specific for that type.

What is the best way to represent this in the database?

Thanks in advanced!

Best Answer

Consider having all questions in a single table. Have a column that is datatype SET with (currently) 4 "bits": 'A','B','C','D'. 10 questions would have all 4 bits set; the others would have one bit each.

(There are certainly other ways to solve this.)