oracle中dbms_并發和由于DBMS中的并發導致的問題

oracle中dbms

并發 (Concurrency)

The ability of a database system which handles simultaneously or a number of transactions by interleaving parts of the actions or the overlapping this is called concurrency of the system.

數據庫系統通過交織部分操作或重疊操作來同時處理或處理大量事務的能力稱為系統并發性。

并發優勢 (Advantages of concurrency)

The good is to serve many users and provides better throughput by sharing resources.

這樣做的好處是可以為許多用戶提供服務,并通過共享資源提供更好的吞吐量。

  • Reduced waiting time response time or turn around time.

    減少等待時間的響應時間或周轉時間。

  • Increased throughput or resource utilization

    吞吐量或資源利用率提高

  • If we run only one transaction at a time than the acid property is sufficient but it is possible that when multiple transactions are executed concurrently than database may become inconsistent.

    如果我們一次只運行一個事務,那么酸屬性就足夠了,但是當同時執行多個事務時,數據庫可能會變得不一致。

  • Overlapping with the input-output activity with CPU also makes the response time better.

    與CPU的輸入輸出活動重疊也可以提高響應時間。

  • But interleaving of instruction between transaction may also lead to many problems due to which concurrency control is required.

    但是事務之間的指令交織也可能導致許多問題,由于這些問題需要并發控制。

并發問題 (Problems due to concurrency)

There are many which may occur due to concurrency,

由于并發,可能發生許多情況,

1) Dirty read problem

1)臟讀問題

If a transaction reads an uncommitted temporary value written by some other transaction than it is called dirty read problem. In this one transaction read a data item updated by another uncommitted transaction that may be future be aborted or failed. In such cases, the read value disappears from the database upon abort this is turned on dirty read the reading transaction end with incorrect results.

如果一個事務讀取了由其他事務寫入的未提交的臨時值,則稱為臟讀取問題。 在此事務中,讀取由另一個未提交的事務更新的數據項,該數據項將來可能會中止或失敗。 在這種情況下,讀取值在中止時會從數據庫中消失,這將導致臟讀取中的讀取事務結束,并且結果不正確。

Example

    T1      T2
R(A)
W(A)
R(A)

The values of item x which is read by T2 is called dirty read data because this data can be created by a transactions that has not been committed yet.

T2讀取的項x的值稱為臟讀取數據,因為該數據可以由尚未提交的事務創建。

2) Loss update problem/ write - write problem

2)丟失更新問題/寫-寫問題

This problem occur when two transactions access the same data item and have their operations interleaved in a way that makes the value of some database items incorrect.

當兩個事務訪問相同的數據項并以某種使某些數據庫項的值不正確的方式交錯操作時,會發生此問題。

If there are two write operations of the different transaction on some data values and in between them there are no read operations then the second write over the first .consider the schedule below,

如果不同事務在某些數據值上有兩次寫操作,并且在它們之間沒有讀操作,則在第一個上進行第二次寫操作。請考慮以下時間表,

Example

    T1      T2
R(A)
W(A)
W(A)

Here is a blind write that means write without a read. Here the changes made by transaction T1 are lost which is updated by a transaction T2.

這是盲寫,表示寫而沒有讀。 此處,事務T1所做的更改會丟失,而事務T2會對其進行更新。

3) Unrepeatable and phantom read problem

3)不可重復的幻像讀取問題

When a transaction cannot repeat the read instructions because the variable is deleted by some other transaction then this problem is called phantom read problem. In this problem at different instances of time a transaction read gives different values it is because data item might have been updated by another transaction.

當某個事務由于該變量被其他事務刪除而無法重復讀取指令時,此問題稱為幻像讀取問題。 在此問題中,在不同的時間實例下,事務讀取給出不同的值是因為數據項可能已被另一個事務更新。

This causes a problem while execution of some aggregate by a transaction and due to changes in the values of the data item by another transaction it leads to incorrect results. When a transaction read values of data item twice and another transaction's updates data item in between then the results of two read operations will differ.

這在事務執行某些聚合時會引起問題,并且由于另一事務在數據項的值更改中會導致錯誤的結果。 當一個事務兩次讀取數據項的值,而在兩次事務之間更新另一個數據項的更新時,兩次讀取操作的結果將有所不同。

Example

    T1          T2
R(A)                
R(A)
Delete(A)                         
R(A)

4) Incorrect summary problem

4)錯誤的匯總問題

When one of the transactions is checking on aggregate summary function while other transactions are updating then this problem is called incorrect summary problem. The aggregate functions may calculate some values before they updated and others after they are updated.

當其中一個事務正在檢查匯總摘要功能而其他事務正在更新時,此問題稱為不正確的摘要問題。 聚合函數可以在更新之前計算某些值,而在更新之后計算其他值。

時間表 (Schedule)

A schedule contains two or more transaction or one after another. All the instructions of each individual transaction will appear in the schedule contact switching can be done but we cannot change the order of execution.

時間表包含兩個或多個事務或一個接一個。 每個交易的所有指令都將出現在時間表中,可以進行聯系切換,但是我們不能更改執行順序。

時間表類型 (Types of schedule )

Schedule can be classified into mainly two types,

時間表主要可以分為兩種類型,

  1. Serial schedule

    序列時間表

    if the schedule runs only one transaction at a time and can start other transaction after computing the first than it is called serial schedule. If there are n schedules than ! n different schedules are possible.

    如果計劃一次僅運行一個事務,并且可以在計算第一個事務之后啟動另一個事務,則稱為串行計劃。 如果有n個時間表,則比! n可能有不同的時間表。

  2. Non-serial/concurrent schedule

    非連續/并發時間表

    A schedule is said to be non-serial schedule if we start executing other transactions before computing the first one. A schedule in which sequence of instructions of transactions appear in the same order as they appear in individual transactions but the instructions may be interleaved with the instructions of different transactions i.e. concurrent execution of transaction takes place.

    如果我們在計算第一個事務之前開始執行其他事務,則該調度被稱為非串行調度。 一種時間表,在該時間表中,交易的指令序列以與在單個交易中出現的順序相同的順序出現,但是指令可以與不同交易的指令交錯,即發生交易的同時執行。

翻譯自: https://www.includehelp.com/dbms/concurrency-and-problem-due-to-concurrency.aspx

oracle中dbms

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541912.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541912.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541912.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

什么是mvc?

什么是MVCMVC 是一種設計模式,它將應用劃分為3 個部分:數據(模型)、展現層(視圖)和用戶交互層(控制器)。換句話說,一個事件的發生是這樣的過程:1.…

mysql的安裝和基本命令_MySQL安裝以及簡單命令用法

MYSQL:關系型數據庫存儲引擎:負責將邏輯層的概念轉化為物理層機制,在物理層完成物理機制。支持事務:transaction必須滿足的條件:ACID(一致性,持久性,原子性,隔離性)鎖:并發訪問隨機訪問:數據在磁盤上是隨機存儲的安裝&…

將數組轉換為JavaScript中的對象

Lets say you have the following array, 假設您有以下數組, const nums [1, 2, 3, 4, 5];console.log(nums);Output 輸出量 (5) [1, 2, 3, 4, 5]We know that nums is an array and we can see in the output that we get an array. Lets convert it into an ob…

docker集群運行在calico網絡上

2019獨角獸企業重金招聘Python工程師標準>>> ##網絡及版本信息 docker1 centos7 192.168.75.200 docker2 centos7 192.168.75.201 物理網絡 192.168.75.1/24 Docker version 1.10.3, build 3999ccb-unsupported ,安裝過程略 # calicoctl version Version…

python批量雷達圖_python批量制作雷達圖

老板要畫雷達圖,但是數據好多組怎么辦?不能一個一個點excel去畫吧,那么可以利用python進行批量制作,得到樣式如下:首先制作一個演示的excel,評分為excel隨機數生成:1 INT((RAND()4)*10)/10加入標…

JavaScript中帶有示例的Math.log()方法

JavaScript | Math.log()方法 (JavaScript | Math.log() Method) Math.log() is a function in math library of JavaScript that is used to return the value of natural Log i.e. (base e) of the given number. It is also known as ln(x) in mathematical terms. Math.log…

SUI踩坑記錄

SUI踩坑記錄 最近做了個項目選型了SUI和vue做單頁應用。下面記錄一下踩坑經歷SUI 介紹 sui文檔:http://m.sui.taobao.org/SUI Mobile 是一套基于 Framework7 開發的UI庫。它非常輕量、精美,只需要引入我們的CDN文件就可以使用,并且能兼容到 i…

java 寫入xml文件_java讀寫xml文件

要讀的xml文件李華姓名>14年齡>學生>張三姓名>16年齡>學生>學生花名冊>package xml;import java.io.FileOutputStream;import java.io.OutputStreamWriter;import java.io.Writer;import java.util.Iterator;import java.util.Vector;import javax.xml.pa…

JavaScript中帶有示例的Math.max()方法

JavaScript | Math.max()方法 (JavaScript | Math.max() Method) Math.max() is a function in math library of JavaScript that is used to return the greatest value of all the passed values to the method. Math.max()是JavaScript數學庫中的函數,用于將所有…

java 修飾符默認_Java和C#默認訪問修飾符

C#中:針對下面幾種類型內部成員的訪問修飾符:enum的默認訪問修飾符:public。class的默認為private。interface默認為public。struct默認為private。其中:public可以被任意存取;protected只可以被本類和其繼承子類存取&…

JavaScript中帶有示例的Math.abs()方法

JavaScript | Math.abs()方法 (JavaScript | Math.abs() Method) Math operations in JavaScript are handled using functions of math library in JavaScript. In this tutorial on Math.abs() method, we will learn about the abs() method and its working with examples.…

人臉識別python face_recognize_python2.7使用face_recognition做人臉識別

偶然看到一篇文章,說是可以實時人臉識別,很有興趣就自己按照文章開始動手人臉識別,但是實現過程中遇到了幾個問題這里做個總結,希望可以幫助到大家安裝face_recognition這個之前需要先安裝編譯dlib,如果沒有安裝dlib&a…

c# reverse_清單 .Reverse()方法,以C#為例

c# reverseC&#xff03;List <T> .Reverse()方法 (C# List<T>.Reverse() Method) List<T>.Reverse() method is used to reverse the all list elements. List <T> .Reverse()方法用于反轉所有列表元素。 Syntax: 句法&#xff1a; void List<T&…

cpuinfo詳解

cat /proc/cpuinfo processor: 23&#xff1a;超線程技術的虛擬邏輯核第24個 ###一般看最后一個0...23 表示24線程 vendor_id: GenuineIntel&#xff1a;CPU制造商cpu family: 6&#xff1a;CPU產品系列代號model: 44&#xff1a;CPU屬于其系列中的哪一代號model name: Intel…

jvm延遲偏向_用于偏向硬幣翻轉模擬的Python程序

jvm延遲偏向Here, we will be simulating the occurrence coin face i.e. H - HEAD, T - TAIL. Simply we are going to use an inbuilt library called as random to call a random value from given set and thereby we can stimulate the occurrence value by storing the o…

java項目沒有bin_WebAPI項目似乎沒有將轉換后的web.config發布到bin文件夾?

我很擅長.NET配置轉換 . 我現在將它們放在用于數據使用的類庫和WPF應用程序上 .但是&#xff0c;當我嘗試使用ASP.NET WebAPI項目進行設置時&#xff0c;似乎發生了一些奇怪的事情 .配置文件永遠不會顯示在我的bin目錄中&#xff0c;因此web.config始終顯示為預先形成的配置文件…

opengl es的射線拾取

2019獨角獸企業重金招聘Python工程師標準>>> 在opengl中關于拾取有封裝好的選擇模式&#xff0c;名字棧&#xff0c;命中記錄&#xff0c;實現拾取的功能&#xff0c;相對容易一些。但是到了opengl es里面就比較倒霉了&#xff0c;因為opengl es是opengl的簡化版&am…

java timezone_Java TimeZone useDaylightTime()方法與示例

java timezoneTimeZone類useDaylightTime()方法 (TimeZone Class useDaylightTime() method) useDaylightTime() method is available in java.util package. useDaylightTime()方法在java.util包中可用。 useDaylightTime() method is used to check whether this time zone u…

視覺學習(4) —— 添加地址傳遞數據

Modbus Slave 選擇一個地址右鍵&#xff0c;選擇發送的數據類型 視覺軟件 一、添加地址 當地址為100時&#xff0c;先將首地址改為100&#xff0c;第0個地址為100&#xff0c;第1個地址為101&#xff0c;往后累加 若想使用100—150的地址&#xff0c;即首地址為100&#xff…