Hi Cave Man,
You still haven't explained where the mistake is in the database design.
The Moodle system has a 1 to many relationship between categories and courses.
The Moodle database has a 1 to many relationship between categories and courses.
This seems to be consistent (unless I've missed somewhere in Moodle that suggests there is a many to many relationship between courses and categories).
Are you saying there should be a many to many relationship between courses and categories? If so, then you are proposing a (fairly fundamental) change to the way courses and categories work in Moodle (with major implications for the handling of permissions), rather than a mistake in the current implementation.