Re: Having difficulty writing a "best-fit" query..

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Jamie Tufnell <diesql(at)googlemail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Having difficulty writing a "best-fit" query..
Date: 2007-10-16 17:14:59
Message-ID: 354400.92381.qm@web31810.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

--- Jamie Tufnell <diesql(at)googlemail(dot)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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Harald Fuchs 2007-10-16 17:32:10 Re: Having difficulty writing a "best-fit" query..
Previous Message Rodrigo De León 2007-10-16 17:11:16 Re: Having difficulty writing a "best-fit" query..