1-bob. Ma`lumotlar bazasining asosiy tushunchalari


SET TRANSACTION transaction mode>


Download 1.69 Mb.
bet59/80
Sana17.06.2023
Hajmi1.69 Mb.
#1542331
1   ...   55   56   57   58   59   60   61   62   ...   80
Bog'liq
ec613b75a51decaf6d60405d564c5683 MySQL po max

::=


SET TRANSACTION transaction mode> [ { transaction mode> }... ] transaction mode> ::=


| access mode>

| «diagnostics size>


«isolation level> ::=

ISOLATION LEVEL «level of isolation>


of isolation> ::=

READ UNCOMMITTED | READ COMMITTED i REPEATABLE


READ | SERIALIZAB1 1

transaction access mode>


READ ONLY | READ WRITE

diagnostics size> ::=


DIAGNOSTICS SIZE of conditions>

::=


Bu yerda:

  1. Agar himoya darajalari ko‘rsatilmasa, himoya darajasi SERIALIZABLE deb tushuniladi.

  2. Agar ruxsat tartibi READWRITE kalit so‘zi bilan belgilansa, unda himoyalanish darajasi READUNCOMMITTED bo‘lmasligi kerak.

3 Agar ruxsat tartibi va himoyalanish darajasi READUNCOMMITTED deb ko‘rsatilsa, unda beriladigan ruxsat tartibi READONLY deb tushuniladi, aks hollarda ruxsat tartibi READWRITE bo‘ladi. Ko‘pchilik hollarda tranzaksiyalaming bajarilish jarayonida MB jadvallari strkturasi buzilishining oldini olish uchun tranzaksiyalarga faqat o‘qish tartibini o‘natish mumkin. Buning uchun quyidagi operator ishlatiladi:

SET TRANSACTION READ ONLY;


Bu operator tranzaksiya jarayoni boshlanishidan oldin ko‘rsatiladi.
Masalan,

EXEC SQL SET TRANSACTION READ ONLY;


buyurtmalami qabul qilgan sotuvchini aniqlamoqchisiz. Bu ikki so‘rovni bir- biridan farq qilishi uchun matn kiritish yo‘li bilan tashkillashtirishimiz mumkin:

SELECT a.snum, sname, onum, ‘Highest on’, odate FROM Salespeople a.


Orders b

Download 1.69 Mb.

Do'stlaringiz bilan baham:
1   ...   55   56   57   58   59   60   61   62   ...   80




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling