Are the following 2 scenarios considered anti-patterns in Cassandra?
- Create a user with unique email. Since Cassandra does UPSERT and INSERT on an already existing record does not throw error, I will have to first fetch a user by email (aka READ) to validate that no other user exists. And only then INSERT.
- In my ReST Application the POST endpoint lets me CREATE a resource (aka entity). Once written, some columns should never be changed by the application. For ex: createdBy, createdDt, etc. And a PUT endpoint only allows me to update certain columns (depending on business logic). For this purpose, I will have to fetch the resource first (aka READ), so that I know if I'm working on a new record / existing record.
Are these considered read-before-write Anti-pattern? DS220 course talks about "Queries that require reads before writes excessively are expensive". What does the word "excessive" signify here?