session4 (2)

session4 (2) - example CursorEg1 Simple Cursor Locking...

Info iconThis preview shows pages 1–28. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
example CursorEg1 Simple Cursor
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 14
Background image of page 15

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 16
Background image of page 17

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 18
Background image of page 19

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 20
Background image of page 21

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 22
Background image of page 23

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 24
Background image of page 25

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Locking Records with the FOR UPDATE When a record is marked for UPDATE or DELETE, Oracles places a lock on the record, which means that another user cannot modify the record before the record is permanently saved (and the lock removed). This is an important database feature controlling concurrency. The database manager should make the second user wait until the first user has performed the change. This is what a lock performs. Another user cannot modify the locked record until the original user releases the lock with a COMMIT or ROLLBACK command.
Background image of page 26
Locking Records with the FOR UPDATE - 2 Cursors are often used to update a set of records. The main component in a cursor is a SELECT statement used to identify the records. Unfortunately, SELECT statements do not lock the identified records, which means that another user can modify the cursor-retrieved records before the procedure using the cursor can. If another user modifies a cursor-retrieved record, the
Background image of page 27

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 28
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/15/2011 for the course ECO 2023 taught by Professor Mr.raza during the Summer '10 term at FAU.

Page1 / 38

session4 (2) - example CursorEg1 Simple Cursor Locking...

This preview shows document pages 1 - 28. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online