What are the benefits of creating table with only foreign keys in MySQL? -
for example, have table of users , table of blogs , separate table called user_to_blogs contain user , blog ids.
what benefits of such table opposed having user id column in blog table?
these sorts of tables useful many-to-many relationships, user can have many blogs, , blog can have many authors, example.
perhaps better example person -> employer relationships, person can have worked many employers, , employer can have many employees
Comments
Post a Comment