Re: Index design question.
Posted in 1996
Billy Wheeler (billy.wheeler@pixie.co.za) wrote: : Hi. : I've seen this before, and what I do (and this is open to debate! :) is to : put down a serial field which I use as the key. I don't know if you have a : foreign key onto this table - that might have an influence... No debate about it. If you need a foreign key into this table or perform joins between this table and a dependent table, a serial column is the way to go. You still need a unique index on the six-column composite, however, to accommodate searches on the key and to preserve the unique constraint. But if there are tables that are referentially dependent on this one, by all means use a serial column to enforce the referential integrity and to accommodate joins between the tables. - David : At 06:30 AM 5/13/96 -0400, Spetc@aol.com wrote: : >Suppose you have a table for which the unique key is necessarily a composite : >of 6 fields. : > : >Given that this may generate a "long" key, I can see that this would be : >undesirable. : > : >Has anyone dealt with this issue before and was there a way around it? : Hasta la vista! : -- : billy.wheeler@pixie.co.za -- ___ ___ Principal Consultant / ) __ . __/ /_ ) _ _ __ Informix Software Inc. (303) 850-0210 _/__/ (_(_ (/ / (_(_ _/__) (-' ~/ '(_- 5299 DTC Blvd #740 Englewood CO 80111 dberg@informix.com Opinions expressed herein are my own. Eventually all things merge into one...and a river runs through it. -N.Maclean