Re: Table design question
Posted in 1999
Tino Cremidis wrote: > > Don: > > Once I worked with a pharmacy system that created a key based on > three caracters from the last name, three characters from > the first name, a number based on a very simple hashing algoritm > based on the full name and for duplicates a sequence number. Bit complex when we have SERIAL. > This approach has multiple benefits. It is likely to be a > little bit slow to insert the information, > but, for a pharmacy, where inserts are more frequent than on staff > (hopefully you get a lot more new clients than new employees) it was > reasonable fast. SERIAL makes the design simpler and faster. > With this approach queries, are simpler and the user does not have > to remember a key, you build it at query time. If more than one > client matched First and Last name you simply show a pick list and > let the user pick the right one. I thought this approach went out with the mainframes. With QBE the user doesn't have to remember a key. Also the code is simpler. 2c. Cheers, -- Mark. +----------------------------------------------------------+-----------+ |Mark D. Stock - Informix SA http://www.informix.com |//////// /| |mailto:mdstock@informix.com http://www.informix.com/idn |///// / //| |http://www.iiug.org +-----------------------------------+//// / ///| | Tel: +27 11 807 0313 |If it's slow, the users complain. |/// / ////| | Fax: +27 838250 2325 |If it's fast, the users keep quiet.|// / /////| |Cell: +27 83 250 2325 |Therefore, "No news: travels fast"!|/ ////////| +----------------------+-----------------------------------+-----------+