
June 26th, 2012, 12:05 PM
|
|
Registered User
|
|
Join Date: Jun 2012
Location: Central Valley California
Posts: 2
Time spent in forums: 1 h 15 m 59 sec
Reputation Power: 0
|
|
Using Foreign Keys
For years I used a version of SQL called KBSQL developed for use on Unix systems running Mumps databases. One thing I really miss was the ability to use index tables that basically had necessary columns and Foreign Keys to other tables.
So, instead of a Join, I could search against these indexes and link to other tables using the Foreign keys.
For example:
MED_LINK@DSCHRG_DT
MED_LINK@PAT_NAME
MED_LINK@DEMOG_LINK@PAT_SSN
The columns with the _LINK were the Foreign keys. The third example shows linking to another index to use it's Foreign Keys to link to a table.
Using this made the queries run much faster than using the linked to table only or even using Joins instead.
I have been looking for this same capability in MS SQL with no luck. Is there such a capability in MS SQL?
Thanx in advance for any help on this.
|