Walter Meester
HoogkarspelNetherlands
General information
Category:
Coding, syntax & commands
Jim,
>If the combination of two fields comprises the primary key of a table, then those two fields should be in an index together so records can be found with a simple seek. Joins are based on the relationship of the primary key of one table and the foreign key in another table.
Well, here you have a point. For readability reason I might do the same thing
>The issue of data types is irrelavent. Data conversions are possible.
>WHERE STR(CustNo,10,0) + STR(InvNo,10,0) = ...
Yes, of course, But here you create a key which could not be as usable as two index keys (when it does not regard a PK or FK) because of rushmore optimization in other parts of the program. I simply try to avoid composite keys as much as posible.
>Using an AND in a JOIN condition is more complicated in my opinion as it conceals the PK and FK values
Well I think its just a matter of taste. Using the AND follows the ANSI SQL92 syntax while this solution might only apply to VFP.
Walter,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only