Re: Best database model for canvassing (and analysing) opinion

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Best database model for canvassing (and analysing) opinion
Дата
Msg-id 20090818124911.GR5407@samason.me.uk
обсуждение исходный текст
Ответ на Re: Best database model for canvassing (and analysing) opinion  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Tue, Aug 18, 2009 at 05:24:52AM -0700, John R Pierce wrote:
> Sam Mason wrote:
> >  SELECT course, date, COUNT(*)
> >  FROM application_preferred_date
> >  GROUP BY course, date;
>
> the problem as stated is more complex than that.  A student could, in
> theory, pick several different courses on the same dates on the
> assumption that he doesn't care what course on which date.

Yup

> so if the
> optimizer/solver has counted this student for course1 on date1, he can't
> be counted for course2 on that same date, only on an alternate date he
> may have also specified.

Huh, fun optimisation problem.  There must be standard solutions to it
though and I'm pretty sure it's something I'd like to solve outside the
database.  Or am I missing something else?

I was just answering call for "advice/tips/pointers/suggestions for a
database design newbie".

--
  Sam  http://samason.me.uk/

В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: There are procedures in Postgres 8.3?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: design, plpgsql and sql injection in dynamically generated sql