When creating a many-to-many relationship, is it correct to index 2 fields which are already being used as a composite primary key?
PRIMARY KEY (`lineup_id`, `term_id`) ,
INDEX `lineup_id1_idx` (`lineup_id` ASC) ,
INDEX `term_id1_idx` (`term_id` ASC) ,
This reindexing of lineup_id and term_id is added by MySQL Workbench since I marked them as Foreign Keys. Should I still even mark them as Foreign Keys in this case?
The only time you should do this is if you have a query that is using the second column of a composite key as indexes work left to right. Otherwise, you should use a single composite key. Alternatively, you can create a surrogate key.