views:

32

answers:

1

I started an app that was initially a testing platform--user management, and managers that can view their employees tests.

Recently, functionality has been extended (not built yet) to allow users to complete a test in place of an employee--basically adding a record, but no user.

I have three tables in use for this: users(contains user info for login/security), profiles (all personal info: address, height, etc.), and survey (contains survey answers for user).

How do I extend my application to encompass this functionality with minimal change to the structure?

I assume that the best way to do this would be to insert records to the tables profiles and survey, and have no username/password/email? There MUST be a user_id associated b/c the tables are linked through the user_ids...

A: 

Seems to me you should still have a user - otherwise how will you know who completed the profile and survey?

If it's a manager creating the profile and survey, simply have them sign in with their own user account and create a test profile. That is, a single user will be able to have more than one profile and survey - which seems trivial with your current DB setup.

Then when a manager signs in, show them all of their own test profiles and surveys, and all of their employees' profiles and surveys.

Summer
So essentially they'll be CREATING users? Only those users won't have a username/email/password?
Kevin Brown
Well, a manager is a user, right? With a username/email/password? I think if the manager creates a test survey, that test survey should be associated with the manager's user account.
Summer