Subject Re: [ib-support] General questions
Author Ann W. Harrison
At 09:52 PM 11/5/2002 +0000, Nico Callewaert wrote:

>A few days ago, I had a visit from mr. consultant again :-)
>He analyzed the database and made a report of it, here are the
>remarks that I would like to have a second opinion of.
>
>1) Don't use triggers and stored procedures, all the DB logic should
>exist in your application ?

I can find a dozen experts who encourage putting DB logic
into the database, and will if you need that backing.


>2) A primary key should not have any meaning related to the data in
>the table. So, that means all primary keys of all tables should be
>build up out of generators.
>
>The primary key of my customers table is the customer no. Is that
>wrong ??

Generally a non-semantic primary key is a good thing because
the semantics of data tend to change. For example, using the
company name as a primary key will get you in trouble if the
company decided that Borland International is a dumb name so
it should be Inprise then changes CEO's and becomes Borland
Software... However, your internal customer number is probably
safe enough. When your accounting department decides that
customer numbers should be 34 characters long and start with
two alphabetic characters, then you can change.


Regards,

Ann
www.ibphoenix.com
We have answers.