I would like to create algorithm for using only unique rows in some table, for avoiding repeating some rows. To do it, I’m enumerating existing table and looking for existing row, then create new or using reference for existing. But in case when database can be used with more then one user in the same time, both clients may have a different enumerated table (if one of them inserting some values already).
I’m thinking to make each field except index in non-repeatable tables UNIQUE
, Is this should to throw exception when some row will be already inserted in table, and transaction will be declined?