I have a picture of my database design attached. Basically what I'm wondering is if there is a way that I can use the foreign keys I have set up. For instance, shirtColorsLink contains two columns, shirtId, and colorId. Both are foreign keys from the shirts table and the colors table. It's how I can specify all the different colors that get assigned to each shirt. So I would like to just query the shirtColorsLink table with the shirtId and get back the color that's in the colors table. Is there any way to do this or would I have to take the colorId then query the colors table?


I guess a better way to ask the question is, what is the best way to retrieve data from a many to many relationship?

I figured it out. I have to use JOIN.