I have a radio button option for the user to select if they are entering personal or business details.
If it is a business, they will enter company name, number of employees and industry. If they are a personal user, they do not need to enter this.
My question is, if they are a personal user, what data should I enter into the company, number of employees and industry columns by default as these columns will surely exist in my table from business users.
Should I just set the default entry to be “n/a” or something similar?
Not the actual word as a string, but a null value.
There is the option to allow any column of any data type to accept null and you may set it as a default if you wish.
I guess when I return the results from a row, I will output the null as something like n/a? For example if I returned results that included data in this column and without data, it would use something descriptive?
you might also consider using a supertable/subtable structure
people and companies as separate subtype tables, with attributes in each that pertain only to that subtype, with an overall supertype entities table, containing common attributes
however, if it’s just three columns, i might just stick with one table, and use NULLs
you can use the COALESCE sql function to generate the ‘N/A’ values