View Full Version : How to create many to many relationships in MySQL Workbench
alex98uk
02-19-2010, 03:22 PM
I'm using MySQL Workbench and engine type InnoDB. But, I can't seem to find how to create a many to many relationship. It only gives me the option to use one to one or one to many.
Am I being stupid or is there a good reason?
Fou-Lu
02-19-2010, 03:36 PM
Many to many relationships don't exist, so you'll need to flatten the data between two tables.
Create a third table with a composite primary key consisting of the primary keys of each other table. This will let you associate many to many relationships between you're other two tables.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.