On Sun, 6 Oct 2002, Simon Wistow wrote:

> Genres:
> id
> name

I think this is the redundant one.

> Ratings:
> user  id
> film  id
> genre id <-- for speed of look ups?

Because an enumerated type also maps a name to number, and uses the
number for searching, only it then does the conversion on input/output.
I'm not a db expert, but this is certainly my understanding.

> And then loop throough the films looking for the most popular film of
> the genre that the user likes most.

I suspect you can ask the db to do that bit too, using a bit more sql, and
a liberal sprkinkling of comparisions and max()s


the hatter



Reply via email to