To upsert a row in a DB that doesn't use primary keys or unique constraints, the process can be broken down into two parts.First, update any existing rows with a matching slug using an UPDATE statement.Then, create a new row if no rows with matching slugs exist using an INSERT statement with a WHERE NOT EXISTS clause.This approach allows for updating or inserting a row without the need for stored procedures or application logic.