For ease, rather than assigning serial numbers for compatibility, you'd be better off grouping fish, and then assigning a number to the group. From the example above, instead of listing a 1 for all fish that are compatible with goldfish, you'd establish a group that is compatible, and they'd all get the same group number. So, rather than a table with a record for each individual pairing, you'd have one column in the species information table with either single numbers or pairs*, and then a table defining the groups (ie, group 1: tetras including neons, serpae, harlequins, cories, bristlenose etc, group 2: top minnows including red tail sharks, albino sharks, rainbow sharks, common pleco, group 3: African cichlids including brichardi but excluding Lake Malawi cichlids, common plecos, bristlenose). This gives you a more compact structure, and species can be included into mulitple groups within one record. You get a better return as well--the whole list of compatible fish would be generated automatically, rather than from a grouping query.
*I would establish 10 basic groups, 0-9, and then allow for 027 to indicate that a species is compatible with groups 0, 2, and 7. Easier for the system to handle.