php - Need advice to change my database design -


I need to change the way information is being collected in DB. Since the query is slow with the old model Works from, which I had developed.
General Problems are following
1) I have a list of courses, and each course has a list of tag describing the general content of the course. For example, in the course " Database Management Systems", the following tags can be {{em> sql, index, key, relationship }.
2) I have professors, who also have tags which they usually read in their courses. For example, Barton {sql, php, apache, mysql}
I need to find all professors in DB which matches better than the specific selected course. Apart from this, I need to sort them according to their weight of matching. I Question
The question is how to store this information in DB and solve this problem. How to process this archived information for.
This question came up when I got many negative reviews about my SQL query.

OK, I start with something like these 5 tables:

< Pre-> course (Course ID, Cronenama, ...) Professor (Profard, ProfanName, ...) Tag (Tag ID, Tagname) CourseTag (Course IDID, TagID) ProfTag (ProfID, TagID)

and asks something like

  Select ProfName, calculate (PT.TagID) as Professor P. INNER from Prof. PT on P. Profid = PT Propied Inner Course tog City on PT TIGID = whistle TIGID WHERE whistle Corseid = @ Selects by Council Group Pro Prof.  

This is MS SQL Server Syntax. You know what you are using (but with php, probably not so :))


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -