What are the differences among database locks?
In database management, locks are mechanisms that prevent concurrent access to data to ensure data integrity and consistency.
Here are the common types of locks used in databases:
1. Shared Lock (S Lock)
It allows multiple transactions to read a resource simultaneously but not modify it. Other transactions can also acquire a shared lock on the same resource.
2. Exclusive Lock (X Lock)
It allows a transaction to both read and modify a resource. No other transaction can acquire any type of lock on the same resource while an exclusive lock is held.
3. Update Lock (U Lock)
It is used to prevent a deadlock scenario when a transaction intends to update a resource.
4. Schema Lock
It is used to protect the structure of database objects.
5. Bulk Update Lock (BU Lock)
It is used during bulk insert operations to improve performance by reducing the number of locks required.
6. Key-Range Lock
It is used in indexed data to prevent phantom reads (inserting new rows into a range that a transaction has already read).
7. Row-Level Lock
It locks a specific row in a table, allowing other rows to be accessed concurrently.
8. Page-Level Lock
It locks a specific page (a fixed-size block of data) in the database.
9. Table-Level Lock
It locks an entire table. This is simple to implement but can reduce concurrency significantly.
–
Subscribe to our weekly newsletter to get a Free System Design PDF (158 pages): https://t.co/uc5M7CdXXC
@borderadius Sur Ubuntu il n'y a pas d'option "nouveau fichier". Malgré qu'il soit grand public. Il me semble que ça y était avant pourtant. Du coup tu as l'option "ouvrir dans un terminal".
You can achieve this very easily with Symfony Messenger: it has native support for @PostgreSQL. As a bonus, queued messages are delivered in real-time to the workers thanks to LISTEN/NOTIFY.
https://t.co/zk1I4Crt5E
@smlpth Ca dépend du contexte. Si tu viens d arriver et que tu ne connais ni les façons de faire de la boîte, ni le fonctionnel. Autant pas perdre de temps et demander. Sinon effectivement il vaut mieux chercher pour approfondir.
🍃 I made a little CLI tool for generating @springboot applications!
- creates new repository on @github
- automatically opens project in @intellijidea / @gitpod
👉 https://t.co/H54fp02l4Z
@c_chaudier@ojacques2@ansible@gitlab Et pourtant on voit ça dans des très grandes boîtes française. Que la plupart des gens ont déjà utilisé... bref...
@ojacques2@c_chaudier@ansible@gitlab Oui je confirme. Je vois régulièrement des flows de l'enfer en entreprise. Pas de master ou de main, un fork par développeur, 0 tags et j'en passe...
🤨 Que vérifie ce test ?
Combien de fois par jour te poses-tu cette question ? 😔
Change de disque, voici un nouvel article qui partage des techniques pour avoir des tests super lisibles ! 🤩
https://t.co/ixvDLOz3kh