Enforcing uniqueness of Course objects on database level