I have a table called members and a number of foreign keys in this table for the purpose of joining from other tables.

Examples of the foreign ids are ageid,genderid. In the age and gender tables there are accompanying values for the ids (ie. agevalue = 24, gendervalue=female)

When I'm doing a sql insert query can I allow for someone to complete a form by adding the values rather than ids and then populate the member table with the respective id.

Would I have to use a subquery within the insert select using a where clause to specify inserting id where value is returned.