OK, I know I'm just asking for trouble here, but just for the sake of argument, what if I did want to create a new compound key. How would one do that? (preferably with phpmyadmin) Am I correct in thinking that a compound key would be a sort of "virtual" key based on two columns that together make them unique?
Levi On Wednesday 17 August 2005 1:21 pm, Stewart Stremler wrote: > begin quoting Levi Smith as of Wed, Aug 17, 2005 at 01:17:08PM -0400: > > OK, so I think I'm beginning to understand. So basically in my case I > > have a an item_id that I am using as the PK in the item table. So I > > would substitute that where you are using pk, and I could use the same > > column in the category table to keep them in sync. > > Correct. > > > But I would need a new column > > for the primary key in the category table as the item_id would be > > repeated when one item is in multiple categories. > > Well, you could probably use a compound key instead of creating a > NEW primary key, but that might just be a matter of taste. > > -Stewart "There's the right way, the wrong way, and my way." Stremler -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
