Posted by Jim Guerber on October 24, 2005 at 20:18:44:
In Reply to: Good point, Grant...> posted by Tom Fulton on October 24, 2005 at 18:34:07:
There you go!
I was almost convinced that we had to do something about this issue. But, the more I think about it, the better this scheme seems to me. You may want different sub keys to list in DIFFERENT order than primary key order.
Let's say I had a list of names and when listing by last name, I want each last name section to be sorted by first name. I also want to list by first name, but then each first name section should be ordered by last name.
I could define the file format (the record) like this...
someformat: format ...;lname$;fname$;lname$;...
The LastName key could be composed of lname$ AND fname$. The FirstNname key could be composed of fname$ and lname$.
You see... Steve was right. You don't even really need a primary key except to guarantee unique records. These sub keys are Just A Bunch Of Records (JABOR).
Keep thinking about this. We are willing to make changes if they are really needed.