Re: Having difficulty writing a "best-fit" query.. - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: Having difficulty writing a "best-fit" query..
Date
Msg-id 354400.92381.qm@web31810.mail.mud.yahoo.com
Whole thread Raw
In response to Having difficulty writing a "best-fit" query..  ("Jamie Tufnell" <diesql@googlemail.com>)
Responses Re: Having difficulty writing a "best-fit" query..
List pgsql-sql
--- Jamie Tufnell <diesql@googlemail.com> wrote:
> movie_id, genre_id, relevance (i've used movie/genre titles for clarity
> here, but in reality they're id's)
> --------------------------------------------
> beverly hills cop, action, 2
> beverly hills cop, comedy, 1
> the heartbreak kid, comedy, 2
> the heartbreak kid, romance, 1
> First of all, if there's a better way to model this kind of ranking/ordering
> of many-to-many relationships, please let me know.

Joe Celko had an example like this in his book:

17: EMPLOYMENT AGENCY PUZZLE 
http://www.elsevier.com/wps/find/bookdescription.cws_home/710075/description#description

the only difference was that he was modeling employees and skillsets.  IIRC, the terminology for
the improved model was the "full disjuctive" model.
Regards,
Richard Broersma Jr.



pgsql-sql by date:

Previous
From: "Rodrigo De León"
Date:
Subject: Re: Having difficulty writing a "best-fit" query..
Next
From: Michael Glaesemann
Date:
Subject: Re: Having difficulty writing a "best-fit" query..