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

oracle中dbms_并发和由于DBMS中的并发导致的问题相关推荐

  1. mysql并发获取唯一数值_高并发分布式环境中获取全局唯一ID[分布式数据库全局唯一主键生成]...

    需求说明 在过去单机系统中,生成唯一ID比较简单,可以使用MySQL的自增主键或者Oracle中的sequence, 在现在的大型高并发分布式系统中,以上策略就会有问题了,因为不同的数据库会部署到不同 ...

  2. sql server 并发_并发问题– SQL Server中的理论和实验

    sql server 并发 介绍 (Introduction) Intended audience 目标听众 This document is intended for application dev ...

  3. Oracle与SQL Server在企业应用中的比较(转)

    Oracle与SQL Server在企业应用中的比较(转)[@more@] 在我供职的公司不仅仅拥有Oracle数据库,同时还拥有SQL Server数据库,所以我经常遇见人们向我提两种问题. 第一种 ...

  4. Oracle数据库联邦,使用联邦数据库将oracle表迁移到DB2(9.7)中的脚本说明

    由于兄弟项目组要测试,需要将oracle中的表迁移到db2中,操作步骤如下: #1 在windows数据库中建联邦数据库服务器\用户映射 connect to sample CREATE WRAPPE ...

  5. oracle外部表ora29913,从外部表中选择sqlplus错误:ORA-29913:执行ODCIEXTTABLEOPEN标注时出错...

    我已经建立了一个简单的Oracle外部表测试,我(与DBA和Unix管理员一起)无法工作. 以下内容基于Oracle的External Tables Concepts.我们使用的数据库是11g. 这是 ...

  6. Active Object 并发模式在 Java 中的应用--转载

    原文地址:http://www.ibm.com/developerworks/cn/java/j-lo-activeobject/ 本文主要从以下两个方面进行阐述: 使用 C++ 语言,来描述 Act ...

  7. python grpc 并发_在Python中使用gRPC的方法示例【h】

    本文介绍了在Python中使用gRPC的方法示例,分享给大家,具体如下: 使用Protocol Buffers的跨平台RPC系统. 安装 使用 pip gRPC由两个部分构成,grpcio 和 gRP ...

  8. oracle 数据 导出 excel 自动分多个文件,从oracle数据库中导出大量数据到excel中为什么自动分成了好几个excel文件《excel表格新手入门》...

    EXCEL中一个单元格中多行文本如何导入或复制到SQL SERVER 数据库表中? 保留换行符保存进数据表啊,读取出来显示的时候根据需要进行转换就行了,比如要在网页上显示,可以把换行符转换成HTML的 ...

  9. sql oracle 自增长字段,在Oracle、MySQL、MS SQL Server中创设自动增长字段

    在Oracle.MySQL.MS SQL Server中创建自动增长字段 好吧,今天面试有道题,要各个数据库怎么建立自增长字段,顺便复习一下吧,最近面试很多数据库问题... 一:Oracle Orac ...

最新文章

  1. Linux下 apache 配置 wsgi 以使用 python-flask (2016年2月)
  2. Windows 各种计时函数总结
  3. python读取excel表格-Python读取Excel单元格的内容
  4. virtualbox vboxmanage命令
  5. SAP科目的行项目显示未勾选补救步骤
  6. 160 - 48 DueList.3
  7. JAVA 查找某个目录是否存在,如果存在,打印出来
  8. Mongo db 与mysql 语法比较
  9. mysql备份恢复出错_MySQL:MySQL备份失败,原因和解决方式
  10. C++ 变量在内存中的分布
  11. PHP trim()的使用
  12. 淘宝店铺基础版全屏店招和背景解决方法
  13. java obj_java中的 compareTo(Object obj)的obj怎么理解
  14. 最简单最快速csv超大文件入库并统计Top5
  15. Sue Shallow
  16. Android大举进入智能电视领域
  17. 如何用PPT制作一份数据图表?
  18. excel表格打印每页都有表头_如何在Excel打印时每页都有表头?你知道么
  19. 选购新风机的关键知识点
  20. RBAC角色访问控制

热门文章

  1. empinfo Oracle数据库,Oracle数据库---包
  2. c语言 socket 报文解析,C语言实现Socket简单通信
  3. 希望得到学术会议的及时回复该怎么说_张烨:在“选矿”博士的世界里,脚踏实地从来都不是说说而已!| 中南达人NO.188...
  4. HTML5链接tcpUDP,UDP/TCP协议 网络调试工具源码(C#)
  5. java 导出bcp文件格式_使用BCP导出导入数据
  6. jz指令是什么意思_S7-200 SMART 运动控制指令详解-电气阿伟带小白启程
  7. weblogic启动慢
  8. 判断浏览器是否为IE和版本
  9. Android 常用的数据加密方式
  10. eclipse快捷键、智能提示