OK I'm so confused about composite primary keys. I know exactly what they are and what they do in *theory*, but I'm having trouble implementing them.
I know that multiple columns in a table make up a composite primary key. Problem is, how do I retrieve a composite primary key if it's made up of so many columns? Or do I need an EXTRA column that combines the results of all the columns into a single string?
Please help >.<
Help very much appreciated!
P.S What's the difference between "unique" and "primary" keys? I thought they were the same thing, and then someone says to me that I need to make my primary keys unique??? I thought by declaring a column a primary key in mySQL (I use auto-increment btw) puts a primary key constraint on the column ... which ensures that no 2 PKs are the same!
PPS I know some people hate compound keys and other swear by them, but I really need to understand this 
__________________
www.j7labs.com
web apps, video tutorials, resources
|