It’s a common requirement to upsert (update if present, insert if not) a row in applications that have a database. This is not a big deal in NoSQL