In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1.2PL
2PL definition: 1. All read and write operations must be locked before; 2. Locking operation is not allowed after unlocking operation
S lock: after adding S lock, other transactions are readable and unwritable until the end of the locked transaction
X lock: after adding an X lock, no other transaction can be read or written until the transaction ends.
The process of transaction execution is divided into two stages, one is to obtain the lock, the other is to release the lock; 2PL may produce deadlock
2PL can prevent reading dirty data, losing modification, etc., and it is a necessary condition but not a sufficient condition for serialization of transactions.
Serializability: when multiple operations are executed concurrently, incorrect results may occur without concurrency control. However, if all concurrent operations are executed serially, the advantage of concurrent operations will be lost. So the concept of serializability is put forward. Serializability: a set of transactions is serializable if and only if the result of the cross execution of a set of transactions is consistent with that of a serial execution.
two。 First-level lock, second-level lock, third-level lock
Level 1 lock: X lock is added before all write operations, and the transaction is released at the end of the transaction, which can prevent the loss of modifications.
Second-level lock; X lock before all write operations and release at the end of the transaction; S lock before all read operations and release at the end of the operation, which can prevent the loss of modification and dirty data
Three-level lock: X lock before all write operations and release at the end of the transaction; S lock before all read operations and release at the end of the transaction, which can prevent the loss of modification, read data and non-repeatable reading
II. Paradigm
The first normal form: attributes are inseparable
The second normal form: all non-primary attributes are completely dependent on the code.
The third paradigm: conforms to 2NF and has no transitive dependency
BC normal form: conforms to 3NF, and the primary attribute does not depend on the primary attribute; that is, if R belongs to 1NF and all attributes do not pass on the dependency code; the left side of each non-trivial dependency contains the key code; each key determinant must contain the key code
4NF: it is required to delete the relationship of NRAMs in the same table.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.