ah oui
Erik Rossen
rossen at freesurf.ch
Thu Apr 12 20:35:42 CEST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 5 Apr 2001, Marc SCHAEFER wrote:
> On Thu, 5 Apr 2001, Erik Rossen wrote:
>
> > UNIQUE(initiales)???
> > PRIMARY KEY(initiales)???
> >
> > You're kidding, right?
>
> I know a context where it's fully appropriate :)
Me too - when there will only ever be one person in the enterprise.
> Now, some enterprises may prefer the AHV/AVS number instead.
This practice is (rightly) illegal in some countries and impractical in
many situations. For example, what if you have an employee (or
subcontractor) that does not have an AVS numbert (or the national
equivalent)?
> Or a plain SERIAL, for internal use only. I personnally like
> meaningful ID's, although their scope is sometime somewhat
> limited.
I like meaningful ID's too, but not as the unique identifiers of a record.
Stick with SERIALs - being unique is their purpose. Remember: when
designing a schema for a database, thinking ahead for an hour will save
you from weeks of pain later on.
This is not the first time that I have ranted on this subject. Go to
Amazon.com and look at the book review for "The Practical SQL Handbook",
by Bowman, Emerson, and Damovsky.
Cheers,
Erik Rossen ^
rossen at freesurf.ch /e\
http://www.multimania.com/rossen --- GPG key ID: 2935D0B9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Made with pgp4pine
iD8DBQE61fWKY88aPik10LkRAkl3AJ9HqMws77B0kQzomAcnUp6lMq6RMQCfbYCj
+XI14wG0FGDXMv9uq8EEJv8=
=/FiZ
-----END PGP SIGNATURE-----
More information about the compta
mailing list