I think you misunderstood the repeating of the tablename.  Much like
components in Delphi we assign a prefix to the fields of the table ie
for Institution we use the prefix "in_" for Institution Type (a lookup
table) we use "inty_".

I have been doing this for quite some time and have found it very
flexible, and when you design views with the fields from different
tables it makes the view quite clear.  Its personal preference, but I
have found this really easy to find the table of origin of the field I
am looking at without having to trawl through tables or SQL to figure it
out.  This is one of those things like the layout of an if begin end
else begin end statement that has vehement supporters and detractors.

-----Original Message-----
From: Neven MacEwan [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 2 October 2002 11:31 a.m.
To: Multiple recipients of list delphi
Subject: Re: Re: [DUG]: Column Names

MessagePeter

Prob a bad example (using the keys) but other common names would
duplicate
(ie Name, Description Qty .....)

>> Also most of the people I know who design SQL DBs usually prefix a
tablename code in front of the field

You must be joking :-) I cringe at repeating the TableName in the
Surrogate
key  (ie Table.TableID) but
at that self documents the natural joins between tables, (though I
haven't
decided on a system for duplicate
ForeignKeys in a single table) but Table.TableShortName_ColumnName thats
almost as ugly as VB
not to mention redundant

>>  Perhaps you should write your own TField that supports this
functionality.

I have now used TField.Origin for this purpose and though I ensure
Fieldname
uniqueness
it is of no meaning

Neven

------------------------------------------------------------------------
---
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to