Re: Can object oriented table design help to solve this problem? - Mailing list pgsql-general

From Jeffrey Melloy
Subject Re: Can object oriented table design help to solve this problem?
Date
Msg-id 6B812B4A-3107-11D7-8CB3-000A95765962@visualdistortion.org
Whole thread Raw
In response to Can object oriented table design help to solve this problem?  ("Alan T. Miller" <amiller@hollywood101.com>)
List 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


pgsql-general by date:

Previous
From: "Alan T. Miller"
Date:
Subject: Can object oriented table design help to solve this problem?
Next
From: Darko Prenosil
Date:
Subject: Re: ??? Multiple selects in procedure