Peter

>> I think you misunderstood the repeating of the tablename.

No thats pretty much what I expected. Haven;t seen this ever done
on an SQL database though

>> 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.

Exactly my point if TField support origin this hack wouldn't be necesary
I can see if you used a lot of views and stored procs returning result sets
that
weren't well documented then it would be a short cut to the original table.
But why shorten it? could just name everthing
TableName.[TableName.ColumnName] ie Institution.[Institution.InstitutionID]

Neven




Pretty much my point exactly, if TField implemented origin or colu
----- Original Message -----
From: "Peter Speden" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Wednesday, October 02, 2002 11:43 AM
Subject: RE: Re: Re: [DUG]: Column Names


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/

---------------------------------------------------------------------------
    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