I'm trying to add a full text search to a system. The query I want to write needs to involve multiple lookups followed by the search (if that's even possible).
I've got a table of teachers and a table of subjects.
teacherProfile
teacherId [int] - primary key
subjectOneId [int]
subjectTwoId [int]
subjectThreeId [int]
teacherBiography [text]
subjects
subjectId [int]
subjectName [text]
So ultimately I want a resultset along the lines of..
teacherId [int]
teacherBiography [text]
( subjectOneName [text] )
( subjectTwoName [text] )
( subjectThreeName [text] )
So these last three fields in brackets are non existant but I do want to perform a text search upon them, do I need to setup a foriegn key constraint (which I'd rather not to do in case of further impacts on the existing system) or is there something more eloquent I can do?