"Changing a username 'should' be expensive as it is such a rare event" is a proprietary, domain decision and not for the database to decide. To state that such an event is "expensive" and "rare" imposes an artificial constraint.
NoSQL data modeling is typically driven by application-specific access patterns
I wrote "Should" based on my experience modeling in NoSQL.
With great power comes great responsibility.. with NoSQL you can have a post document containing the post, all comments and all the usernames.
If usernames are changed "too often" you should have references to users instead.
My guess is that the extra speed when loading a post from not reading all commenters user profiles is well worth the rare and expensive username change event
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"Changing a username 'should' be expensive as it is such a rare event" is a proprietary, domain decision and not for the database to decide. To state that such an event is "expensive" and "rare" imposes an artificial constraint.
NoSQL data modeling is typically driven by application-specific access patterns
I wrote "Should" based on my experience modeling in NoSQL.
With great power comes great responsibility.. with NoSQL you can have a post document containing the post, all comments and all the usernames.
If usernames are changed "too often" you should have references to users instead.
My guess is that the extra speed when loading a post from not reading all commenters user profiles is well worth the rare and expensive username change event