Re: Assign vendor number
Posted in 2009
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
loc wrote: > I'm working on a 4GL program to enter AP vendors into a database and > I'm wondering how the vendor numbers should be assigned. Should they > be assigned sequentially or should they be assigned so that when > selecting the data and ordering by vendor number the vendor name would > be in alphabetical order? An old 4GL program we have does it this > way, but I don't see any reason to do that. Does anyone have any > reason why I wouldn't want to just assign the vendor number > sequentially? Nope. In fact, there is a school of thought that says that it's preferable to make your keys "meaning-free". -- Cheers, Obnoxio The Clown http://obotheclown.blogspot.com -- This message has been scanned for viruses and dangerous content by OpenProtect(http://www.openprotect.com), and is believed to be clean.
On Jul 23, 3:59 pm, Obnoxio The Clown <obno...@serendipita.com> wrote: > loc wrote: > > I'm working on a 4GL program to enter AP vendors into a database and > > I'm wondering how the vendor numbers should be assigned. Should they > > be assigned sequentially or should they be assigned so that when > > selecting the data and ordering by vendor number the vendor name would > > be in alphabetical order? An old 4GL program we have does it this > > way, but I don't see any reason to do that. Does anyone have any > > reason why I wouldn't want to just assign the vendor number > > sequentially? > > Nope. In fact, there is a school of thought that says that it's > preferable to make your keys "meaning-free". > > -- > Cheers, > Obnoxio The Clown > > http://obotheclown.blogspot.com > > -- > This message has been scanned for viruses and > dangerous content by OpenProtect(http://www.openprotect.com), and is > believed to be clean. I would concur with OTC that "meaning-free" is the way to go, as long as you use that key as a foreign key in tables you join with. As for the sorting by alphabet, make sure there is an index with up to date statistics. :)