Обсуждение: Re: [GENERAL] Database Best Practices ???

Поиск
Список
Период
Сортировка

Re: [GENERAL] Database Best Practices ???

От
"amy cheng"
Дата:
Oliver, or/and, Gary, and all other experts,

I studied this design:
1) inheritance and trigger: since "person" and "person-address" relationship
already has triggers, why "organization" and "individual" still need
triggers with "person-address"?
2) "person-address" is the relationship between "address" and
  "person", why "person" still need to DIRECTLY relate with "address"?
  and, again (similar to question 1) why "organization" and "individual"
still need?

Perhaps those codes are just jokes? ????????????????????

amy



>From: Matthew Hixson <hixson@frozenwave.com>
>Reply-To: hixson@frozenwave.com
>To: pgsql-general@postgresql.org
>Subject: [GENERAL] stored procedures
>Date: Mon, 30 Aug 1999 12:58:45 -0700
>
>Could someone point me to a tutorial or HOWTO regarding stored procedures?
>I
>know very little about them and need to learn everything I possibly can
>about
>them as soon as possible.  I looked throught the Postgres docs and couldn't
>find anything that goes into them in depth.
>    Thank you,
>    -M@
>
>--
>Matthew Hixson - CIO
>FroZenWave Communications
>http://www.frozenwave.com
>
>************

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

Re: [GENERAL] Database Best Practices ???

От
"Oliver Elphick"
Дата:
"amy cheng" wrote:
  >Oliver, or/and, Gary, and all other experts,
  >
  >I studied this design:
  >1) inheritance and trigger: since "person" and "person-address" relationship
      >
  >already has triggers, why "organization" and "individual" still need
  >triggers with "person-address"?

I don't think that triggers can be inherited automatically. That is why I
did it that way.  The implementation of inheritance still needs a lot of
work in PostgreSQL.

  >2) "person-address" is the relationship between "address" and
  >  "person", why "person" still need to DIRECTLY relate with "address"?
  >  and, again (similar to question 1) why "organization" and "individual"
  >still need?

The refint trigger is to make sure that the address record exists before
the person record is updated; if the relation is new there will not be
anything in person_address yet.

The duplication in organisation and individual is again because
inheritance is not fully and consistently implemented.

  >Perhaps those codes are just jokes? ????????????????????

The project is not yet complete, so there may be bugs in it!

--
      Vote against SPAM: http://www.politik-digital.de/spam/
                 ========================================
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     " ...Take heed, and beware of covetousness; for a man's
      life consisteth not in the abundance of the things
      which he possesseth."       Luke 12:15