How to properly create composite primary keys – MYSQL

Here is a gross oversimplification of an intense setup I am working with. table_1 and table_2 both have auto-increment surrogate primary keys as the ID. info is a table that contains information about both table_1 and table_2. table_1 (id, field) table_2 (id, field, field) info ( ???, field) I am trying to decided if I … Read more

ALTER TABLE to add a composite primary key

I have a table called provider. I have three columns called person, place, thing. There can be duplicate persons, duplicate places, and duplicate things, but there can never be a dupicate person-place-thing combination. How would I ALTER TABLE to add a composite primary key for this table in MySQL with the these three columns? 6 … Read more