Re: Refining query statement

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Refining query statement
Date: 2019-01-17 17:07:06
Message-ID: alpine.LNX.2.20.1901170857310.18965@salmo.appl-ecosys.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 17 Jan 2019, David G. Johnston wrote:

> Yes...though now it just sounds like a flawed data model.

David,

This is what I thought.

> How stuck are you in that regard? Those "future" contacts should have their
> own records and not be derived via an optional field on an existing
> record.

My goal is to make a functioning business tracking application for my
consulting services. Almost all my prior postgres databases hold
environmental data for statistical and spatio-temporal analyses so writing a
business application is a new experience for me and I want to get it
correct.

> Put differently, how do you know which activities are completed and
> which are not?

The direct answer is that a completed activity has a row with either a
future next-activity date or a null (which is the case when the status of
that organization or contact is 'no further contact'.)

I should rename the Contacts table as People and the Activities table as
Contacts. The original names came from a sales management system I used as a
design guide, but they're probably confusing to others as well as to me. :-)

I can provide my current schema (eight tables) to the list (perhaps as an
attachment), an individual, or put in on a cloud site and pass the URL.

Thanks,

Rich

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-01-17 17:21:48 Re: Refining query statement
Previous Message David G. Johnston 2019-01-17 16:56:47 Re: Refining query statement