currently I'm doing a project and planning on creating a REST API but the problem I'm facing is designing the database primarily a many to many table (marked in red on the image).
In college I was thought that I need to use composite keys when creating many to many tables but since I'm doing a REST API I feel it will get to complicated especially since the many to many table can have one to many relationships and reason for this is the following: many plant species can have the same useful part but the image of the part can be different and so can the bioactive substance.
I was thinking about creating a normal Auto increment key for the many to many table and just add an unique index on the plantspecies_id and usefulpart_id but I'm not sure if that is the correct way.
Is there a optimal way of doing this but keep the database design as correct as possible in terms of rules?