Thinking:
First of all, according to the business requirements, the use of constraints is certainly very complex;
You can add and edit the data each time, go to check the time period of a product in the new or modified time period and the database already exists whether there is a time period superimposed on the if there is a prompt can not be saved, if not save it can be saved