The document discusses locking for concurrency control in databases. It begins by outlining the key topics to be covered, including why locking is used, when to lock, what to lock, how to lock, exotic locking techniques, deadlocks, and performance. It then discusses why locking is needed to provide transaction isolation and ensure equivalent execution to some serial schedule. The document introduces formal definitions of transactions, histories, equivalence, and dependency graphs. It describes the three bad transaction dependencies that locking aims to prevent. Finally, it discusses how locks can be used to define legal histories and proves the serializability theorem.