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

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -