Say I have a relational database and I want to support allowing multiple writers to add create a new row in the same table. How is this implemented?
I've read a lot about locks for dealing with concurrent access to the same row with shared locks and exclusive locks for example (AKA writing locks vs reading locks) but not about how a new row is created.
How does this work for
- A table on a single node with multiple writers
- A distributed table that is sharded
- A distributed table that is replicated