What is Lock?
A technique to prevent simultaneous access to data in a database to prevent inconsistent results. Modern databases all implement the granular row-level locking for performance reason. But some operations like altering the schema would still require table-level locking, which would block the normal online processing. That's the reason such operations are performed during non-business hours to reduce impact.External reference