使用锁定方法来序列化事务

时间:2021-11-16 06:47:46

I am a newer in database ,i read an article about transaction .

我是数据库的新手,我读了一篇关于交易的文章。

We have two kind of Schedule:Serial and Concurrency.

我们有两种Schedule:Serial和Concurrency。

My question is : Suppose i have a schedule that is non-serializable .

我的问题是:假设我有一个不可序列化的计划。

Does sql use a kind of locking method for that to serialize that?Like 2pl and etc?

sql是否使用一种锁定方法来序列化?像2pl等?

1 个解决方案

#1


0  

Without stating which database system you're using this question is not answerable (even if I understand it correctly). Each database system - Oracle, Sql server, MySql, etc - is a separate implementation with their own internal ways of doing things.

如果没有说明你正在使用哪个数据库系统,这个问题就无法回答(即使我理解正确)。每个数据库系统 - Oracle,Sql server,MySql等 - 都是一个单独的实现,具有自己的内部工作方式。

Look up optimistic and pessimistic locking in articles about the database of your choice as a way to get started if you're a developer, or get a book on DBMS design if you're a computer science student.

如果您是开发人员,请查看关于您选择的数据库的文章中的乐观和悲观锁定,或者如果您是计算机科学专业的学生,​​请阅读有关DBMS设计的书籍。

#1


0  

Without stating which database system you're using this question is not answerable (even if I understand it correctly). Each database system - Oracle, Sql server, MySql, etc - is a separate implementation with their own internal ways of doing things.

如果没有说明你正在使用哪个数据库系统,这个问题就无法回答(即使我理解正确)。每个数据库系统 - Oracle,Sql server,MySql等 - 都是一个单独的实现,具有自己的内部工作方式。

Look up optimistic and pessimistic locking in articles about the database of your choice as a way to get started if you're a developer, or get a book on DBMS design if you're a computer science student.

如果您是开发人员,请查看关于您选择的数据库的文章中的乐观和悲观锁定,或者如果您是计算机科学专业的学生,​​请阅读有关DBMS设计的书籍。