Re: Can object oriented table design help to solve this problem?

From: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
To: "Alan T(dot) Miller" <amiller(at)hollywood101(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Can object oriented table design help to solve this problem?
Date: 2003-01-26 08:23:16
Message-ID: 6B812B4A-3107-11D7-8CB3-000A95765962@visualdistortion.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would suggest a combination of both. Have a table with a structure
similar to the following:
TABLENAME: Weekly Hits
Cols: ID_Property, week_start, hits

This way, you would have a new row for each property each week. It's
also easy to expand you search. If you want to see how many hits a
property got between March and June, say, that's an easy query to make
(select sum(hits) from weekly_hits where week_start > '01-mar-03' and
week_start < '30-jun-03' and prop_id = 42).

Hope this helps,
Jeffrey Melloy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Darko Prenosil 2003-01-26 12:11:35 Re: ??? Multiple selects in procedure
Previous Message Iker 2003-01-26 07:15:58 Re: [RFC] libpq extensions - followup