The error mesage is telling you are trying to create a one to many relationship but can not because you have values in timeslotID of appointments table (the many side of the relationship) that do not appear in the times table (the one side of the relationship)