Re: hiding normalization with views
От | Joshua Daniel Franklin |
---|---|
Тема | Re: hiding normalization with views |
Дата | |
Msg-id | Pine.LNX.4.44.0210081346040.26783-100000@iocc.com обсуждение исходный текст |
Ответ на | Re: hiding normalization with views ("Devinder K Rajput" <Devinder.Rajput@ipaper.com>) |
Ответы |
Re: hiding normalization with views
|
Список | 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
В списке pgsql-novice по дате отправления: