Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to understand all relationship types that can be created in SQL.

So far I only get the "belongs-to" one - Example: a table with "Blog post" records, which contains an author_id column that references the id column of another table called Authors.

But what about the other relationship types, like many-to-many, one-to-one, one-to-many.. ? How do they work exactly? Can anyone post some examples? Thanks

share|improve this question
    
There are lots of tutorials around on this topic. I don't know them personally, but this one may be a good starting point. –  dezso Oct 20 '12 at 17:04
    
Thanks for posting your question but I'm afraid I have to close it as it is both too basic and too broad to be on topic here –  Jack Douglas Oct 22 '12 at 8:51
add comment

closed as off topic by RolandoMySQLDBA, Jack Douglas Oct 22 '12 at 8:51

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.