dbms_fga策略表_DBMS中时间表的分类

dbms_fga策略表

Serial schedules will always be consistent in nature but a non-serial schedule may or may not be therefore the idea is to transform a non-serial schedule into a serial schedule by swapping of non-conflicting instructions. We do not have any method to prove a schedule is consistent but from the above discussion understand that Serial schedule will always be consistent so somehow we prove that non serial schedules will also have same effects as of a serial schedule that we get a proof that this particular non-serial schedule will also be consistent. Find those schedules that are logically equal to serial schedules.

串行时间表本质上始终是一致的,但非串行时间表可能会也可能不是,因此,其想法是通过交换不冲突的指令将非串行时间表转换为串行时间表。 我们没有任何方法可以证明时间表是一致的,但是从上面的讨论中我们了解到串行时间表将始终是一致的,因此以某种方式我们证明了非串行时间表也将与串行时间表具有相同的效果,我们得到了证明特定的非串行时间表也将保持一致。 查找在逻辑上等于串行日程表的那些日程表。

时间表分类 (Classification of schedules)

The schedules can be classified as on the basis of two types,

时间表可以分为两种类型,

  1. On the basis of serializability

    基于可序列化

  2. On the basis of recoverability

    基于可恢复性

可序列化 (Serializability)

To Ensure consistency of database we make are that concurrent schedules should be in some sense equivalent to a serial schedule. The concept of schedules is used to identify which solutions are correct when transactions have interleaving of their operations in schedules. A schedule is said to be serializable if either it is conflict serializable, view serializable or both. On the basis of serializability, the schedules can be of two types:

为了确保数据库的一致性,我们认为并发调度在某种意义上应该等效于串行调度。 计划的概念用于识别事务在计划中具有交错操作时正确的解决方案。 如果计划是冲突可序列化的,视图可序列化的,或者两者都是冲突的,则称该计划是可序列化的。 根据可序列化性,日程表可以分为两种类型:

1) Conflict serializable

1)冲突可序列化

If a non-serial schedule can be transformed into a serial schedule by swapping of non-conflicting instructions than it is called serializable. If two schedules are conflict equivalent and one of them is serial than other is conflict serializability. The problem of finding whether a schedule is a conflict reliable or not is actually the problem of finding whether the graph contains the cycles or not, therefore, the cost is: o(n2) where n is the number of participating a schedule.

如果可以通过交换不冲突的指令将非串行计划转换为串行计划,则将其称为可序列化。 如果两个调度是冲突等效的,并且其中一个调度比另一个调度是串行的,则冲突可串行化。 查找时间表是否可靠的冲突问题实际上是查找图表是否包含循环的问题,因此,成本为:o(n2)其中,n是参与时间表的数量。

Example:

例:

Let I and J be two consecutive instructions belonging to two different transactions Ti and Tj in a schedules s, the possible I and J instruction can be as:

IJ为属于时间表s中两个不同事务TiTj的两个连续指令,可能的IJ指令可以为:

    I = READ(Q),    J = READ(Q)  → Non conflicting
    I = READ(Q),    J = WRITE(Q) →  Conflicting
    I = WRITE(Q),  J = READ(Q)   →  Conflicting
    I = WRITE(Q),  J = WRITE(Q)  → Conflicting

2) View serializable

2)查看可序列化

A schedules S is viewed serializable if it is view equivalent to a serial schedule.

如果时间表S与序列时间表等效,则将其视为可序列化的。

View equivalent - Consider two schedules S and S' where the same set of transactions participating. Two schedules S and S’ are view equivalent if they satisfy following conditions

等效视图 -考虑两个计划SS' ,同一组交易参与其中。 如果满足以下条件,则两个计划S和S'是视图等效的

  • For any data item of q if the transactions Tj read initial values of q in schedules s then the transactions Tj must in schedules S’ also read the initial value of q.

    对于q的任何数据项,如果事务Tj在日程表s中读取q的初始值,则事务Tj必须在日程表S'中也读取q的初始值。

  • If a transactions Ti in schedules S reads any data item q which is updated by transaction Tj then a transactions Ti must in schedules S' also read data item q updated by transactions Tj in schedules S'.

    如果日程表S中的事务Ti读取了由事务Tj更新的任何数据项q ,则事务Ti必须在日程表S'中也读取由日程表T'中的事务Tj更新的数据项q

可恢复性 (Recoverability)

On the basis of recoverability the schedules are of three types:

根据可恢复性,时间表分为三种类型:

1) Recoverable schedules

1)可恢复的时间表

A schedule is recoverable if in case of failure dependent schedules have a chance of roll back.

如果依赖于故障的日程表有回滚的机会,则日程表是可恢复的。

Example:

例:

T1		T2		T3
R(x)
W(x)
C		R(x)
		W(x)
		C		R(x)
				C

This schedule is recoverable but if a failure occurs just before transition T1 commit T1 will rollback and based on which T2 and T3 will also rollback.

该计划是可恢复的,但是如果在转换T1提交之前发生故障,提交T1将回滚,并且T2T3也将基于回滚。

2) Non recoverable schedules

2)不可恢复的时间表

The non recoverable schedules is one in which for each pair of transaction Ti and Tj such that if Ti read a data item previously written by ti then commit or abort operations of Ti appears before Tj.

非调度可收回是其中对于每对交易TiTJ的,使得如果读取的Ti的数据项然后通过TI提交或中止操作先前写入的 TJ之前出现。

Cascading Rollback

级联回滚

It is the phenomenon in which a single transactions failure leads to a series of transaction rollbacks is called cascading rollback. Even if the schedules are recoverable the commit of transactions may lead to a lot of transactions to rollback. Cascading rollback is undesirable since it leads to undoing of a significant amount of work. Uncommitted reads are not allowed in cascadeless schedules.

单个事务失败会导致一系列事务回滚的现象称为级联回滚。 即使时间表是可恢复的,事务的提交也可能导致许多事务回滚。 级联回滚是不希望的,因为它会导致大量工作的取消。 无级联计划中不允许进行未提交的读取。

Cascadeless schedules

无级联时间表

To avoiding cascading rollback cascadeless schedules are used. A transaction in which each pair of transactions Ti and Tj such that if Tj reads a data item previously written by Ti then the commit or abort of Ti must appear before operations of Tj such a schedule is called cascadeless schedules.

为了避免级联回滚,使用了无级联计划。 事务,其中每个事务对TiTJ的,使得如果读取TJ先前的Ti写入的数据项,则提交或中止的Ti必须出现TJ的操作之前这样的时间表被称为cascadeless时间表。

翻译自: https://www.includehelp.com/dbms/classification-of-schedules-in-dbms.aspx

dbms_fga策略表

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值