My question is, what is the best way to model this in the MySQL database? Do I use just one table like this:
| UserId | Name | Email | Address | Time | Employer | Position |
Or should I use two tables like this:
| UserId | Name | Email | Address |
| UserId | Time | Employer | Position |
My guts are telling me that the second solution might be what I need, since I don't know how to add dynamic arrays into a database. But how do I associate the same UserIds of the second table to the first table? If I stick to the first solution using only one table, is it possible to save arrays of Time, Employer and Position under one UserId? Keep in mind that I have no way of knowing in advance how many rows of work experience users will be creating.
Option 2 is the correct since it would create much less redundancy.
Table 1 | UserId | Name | Email | Address |
Table 2 | UserId | Time | Employer | Position |