| From: | Joshua Daniel Franklin <joshua(at)iocc(dot)com> |
|---|---|
| To: | Devinder K Rajput <Devinder(dot)Rajput(at)ipaper(dot)com> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: hiding normalization with views |
| Date: | 2002-10-08 18:48:40 |
| Message-ID: | Pine.LNX.4.44.0210081346040.26783-100000@iocc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Thanks, doing a SELECT to see if the city (etc.) was there is
exactly what I am trying to avoid.
Gurus, any comments?
On Tue, 8 Oct 2002, Devinder K Rajput wrote:
>
> Josh,
>
> I am assuming that data gets entered into the customers table and then
> should automagically update the cities, states, and zip_codes tables. For
> example, if a new record or update contains the city "Chicago" and Chicago
> doesn't exist in cities, it should be added/inserted. There might be a way
> to do this by setting up integrity constraints ( i don't know how), but you
> could also do it in code. When a record is inserted/updated in the
> customers table, do a select with the city value in the cities table to see
> if the city exists. if the city doesn't exist, insert it. Do the same
> with states and zip codes. This is some work and like I said, you might
> able to do it integrity constraints, but we need some help from the
> postgres gurus to see if that's possible.
>
> regards,
>
> Devinder Rajput
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2002-10-08 18:55:31 | Re: hiding normalization with views |
| Previous Message | Devinder K Rajput | 2002-10-08 18:44:08 | Re: hiding normalization with views |