I am currently developing an application that allows students to manage their courses, and I really do not know how to create a database for a specific function. The client wants, like Facebook, that when a student displays a list of people who are currently on a particular course, people with the most common courses with a registered user are displayed first. Almost the same as the Facebook function "Suggestions of friends" with an additional filter.
As an additional feature, I would like to add a search function to allow students to search for another and display first in the search results people with most reciprocal courses with a registered user.
I am currently using MySQL, I plan to use Cassandra for some other functions, and I am also using Memcached to cache results and Sphinx for searching.
Thanks.
-
Application developed in Python, BTW
And I forgot to mention that the standard approach (using a good MySQL query to compute all of this with an ORDER BY clause) is too slow. Since reading is much more common than reading, I would like most of the logic to be executed once when the people β course relation is added.
I thought about updating the counter of reciprocal courses specific to one tuple (user, course), which will be increased for all users of the course when a registered user joins a new course (or decreases when he leaves it).
database facebook database-design
Pierre
source share