I have an Object table which is populated from an Integrated service (which I can change if needed) from another database. At certain points we need to manually add posts in another table ObjectObjectGroup (ObjectId, ObjectGroupId) which is needed if Object.ObjectType have a certain integer value. Since the integration service doesn't handle that kind of update, I'm thinking of adding a trigger to the Object table which in pseudo-code would be the following:
if Object.ObjectType = 10
begin
if Object.ObjectNumber like '<string pattern>'
begin
insert into ObjectObjectGroup values...
end
end
Is this setup wise, or is there a better way in terms of performance?