In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
It's a hot topic these days, why learn Python?
A lot of people say it's hot! Of course, there are many people who like to learn as well as artificial intelligence and big data, and high-paid positions are more likely to lead the trend. First of all, I have no objection to this point of view. I have only studied two shell and java courses in college. The real study is self-study, not development. I study in order to exercise my programming ideas and take fewer detours in order to learn programming in the future.
I also choose Python, why, after the internship development direction is database, later may be DBA, may also take data analysis and other business routes, it does not matter is to combine work in the future to improve their ability, personal competitiveness in advance of the route, whether to do DBA database server operation and maintenance SHELL script and Pyhton and perl is undoubtedly the best choice, then if you take data analysis and other Python can also play their role For their own career development planning is of great help, very practical significance, in order to be better used for work in a few years, I feel that this is a starting point for technicians who are not keen on programming and are not crazy about programming! Do not take these two years of fire, development prospects, high basic salary as the basic point of learning, such empty unplanned learning, the mentality is not correct, and secondly, you will fall behind with the changes of the times!
Yesterday I talked about the integrity of the data, then it is the accuracy and reliability of the data. We want to ensure the integrity of entities, references, domains and user definitions. It is really important to look back at the constraints at this time!
What does consistency mean?
We start from reality, the literal meaning of consistency, we all know that the data are consistent, in the location of a query bank card balance is 100 yuan, another place query does not lose 100 yuan, this is unacceptable. Then the data will always be accompanied by data read and write operations in the database, which has a particularly high demand on the state of the database. That is to say, every time the database operation changes, it can be accepted, and the reading is normal. It is the consistency of the database, and sometimes it is not the true and reliable state of the database, so it is considered inconsistent.
The "bodyguard" appears.
When it comes to the integrity and consistency of Oracle, ah, they can also be regarded as the built-in "big bosses" of Oracle, all equipped with bodyguards to protect them, so let's talk about the bodyguard management of integrity.
Transaction management is not simple to ensure data consistency in the database. As we mentioned earlier, when commit and rollback operations are the commit or rollback of a transaction, our SQL statements are included in the transaction language. The transaction keyword is indicated by transaction, and there is life cycle, the transaction starts, executes, and ends, while the beginning of the transaction is implicit and the end is completed with an instruction action.
Commands commonly used to control transactions in Oracle:
1 、 commit
English literal translation means commit, which is a sign of the end of the transaction. What does it mean when using this command? it means that the data of this transaction will be stored on our disk. The most safe and effective way for developers to change the state of the database is to display the data submission. In fact, the database has been updated but has not been approved by the database before committing. The operation is recognized through the transaction end command, the commit takes up very little resources, and the commit database resources spent on 1000 items are the same.
2 、 rollback
Rollback is literally translated in English. We undo the name before the transaction commits. At this time, the database update is not recognized. When the transaction ends rollback, the data currently contained will be rolled back to the last commit status. This process will first read back the rollback segment information and use this information to restore the changes that have occurred in the database. If the delete command is used to delete the data, Then the data will be insert into during rollback. For the database, each rollback is very resource-consuming and suitable for exception handling operations, so you should carefully check the operation instead of rollback before committing the transaction!
3. Savepoint and rollback savepoint
In the context of rollback, the current transaction of rollback rollback has an operation, so we only allow users to roll back the action after the rollback by ordering savepoint to establish a starting point in the transaction, while rollback savepoint rolls back the data after punctuation. Both are a way to make up for the extreme commands of rollback, and transaction rollback is more flexible and controllable.
Attributes and isolation level of the transaction
1. Read only-- data cannot be modified within a transaction, and this can be used at the beginning of the transaction, the database state will be frozen and the database state will be consistent with the transaction start state
2. Read write-- readable and writable state, which is the default for the database
3. Serializable-isolation level, specify serialization transaction, can achieve the same function as read-only, isolate the influence of other database state, but allow DML operation, do not recognize the changes made by other transactions to the database, even if committed, it does not mean ignoring the modification of the original table data, the table data has actually been modified, but this transaction does not recognize
4. Read commited-the default level of the isolation level, you can only read the data that has been committed and modified by other transactions, and only the modified transaction itself can read the uncommitted data.
Transaction processing principle
1. Atomicity (Atomicity)
2. Consistency (Consistency)
3. Isolation (Lsolation)
This post will be updated continuously.
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.