Updated database model to many-to-many schema with corresponding tests.