DEV Community

Discussion on: Database 101: How social media “likes” are stored in a database

Collapse
 
tracker1 profile image
Michael J. Ryan

If you're using a classic rdbms like postgres/MySQL/mssql then yes. There should be an atomic update to increment/decrement. Of course index on the likes table should work for count(postid) as well ..

Cassandra and ScyllaDB have differing behaviors for the benefit of horizontal scaling.