I have this table In postgres database. First 2 rows (highlighted in gray) have the same data in these columns (user_id, criteria_01, criteria_02, criteria_03) but they have different value in date column.
the 3rd, 4th, 5th rows also has the same info in columns(user_id, criteria_01, criteria_02, criteria_03) and they have different date value.
since there are 2 PKs in the table (id and date), table accepts new entry with the same id and different date.
Data imported from an external server to fill this table and date column is filled base on the date of the new import (it also include time that I ignored here). If there is an import for today then date column get the value of today’s date. Data can be imported every 3 minutes
I need to redesign the structure of the tables. Is there any way to prevent the repetition of rows which have the same info all columns except date column? ( if I delete date column then repetition will be gone, but date is needed for visualization tool that they use).
if there is no way that’s fine I just want to know, if I can change it or not? This is what the company asked me to do.
Can I add another column like end date to prevent this repetition? Or is there any way to prevent it?