IP Library Granted Patent US 7,734,604
Granted Patent B1
US 7,734,604 · App. 09/713,887 · Granted Jun 8, 2010

Locking data in a database after an operation has begun

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,734,604
App. No.
09/713,887
Granted
Jun 8, 2010
Kind
B1
Abstract

A database management system receives a request to perform an operation on a set of target data and, at some point after it begins executing that operation, places a lock on the target data to prevent concurrent execution of other operations on the target data. In some embodiments, the system receives an instruction from a user to perform a data-definition operation on a set of target data; places an initial lock on the target data at a level that allows at least one concurrent operation on the target data; begins executing the operation; and then places a final lock on the target data at a level that excludes all other concurrent operations on the target data.

Claims (49)

1. A method for use in managing data in a database system, comprising:

receiving a request to perform an operation on a set of target data residing in the database;

executing the operation in the database on the set of target data;

during the execution of the operation, placing an initial lock on the target data to prevent concurrent execution of at least one operation on the target data; and

during the executing of the operation, placing a final lock on the target data at a level that prevents concurrent execution of a larger set of operations.

2. The method of claim 1 , comprising placing an initial lock on the target data at a level that prevents concurrent execution of at least one operation and, at some point after execution has begun, placing a final lock on the target data at a level that prevents concurrent execution of a larger set of operations.

3. The method of claim 1 , where the initial lock allows concurrent execution of operations that involve reading the target data.

4. The method of claim 1 , where the final lock prevents concurrent execution of all operations on the target data.

5. The method of claim 1 , further comprising allowing a user to specify the type of lock initially placed on the data.

6. The method of claim 1 , where the operation is one of the following types: a COLLECT STATISTICS operation, a CREATE INDEX operation, and an ALTER TABLE operation.

7. A database system comprising:

at least one storage device;

at least one computing node configured to deliver data to and retrieve data from the storage device; and

a database-management component configured to:

receive a request to perform an operation on a set of target data residing in the database;

execute the operation in the database on the set of target data;

during the execution of the operation, place an initial lock on the target data to prevent concurrent execution of at least one but not all operations on the target data; and

during the executing of the operation, place a final lock on the target data at a level that prevents concurrent execution of a larger set of operations.

8. The system of claim 7 , where the initial lock allows concurrent execution of at least one other operation on the target data.

9. The system of claim 7 , where the subsequent lock prevents concurrent execution of all other operations on the target data.

10. The system of claim 7 , where the database-management system is configured to allow a user to specify the type of lock initially placed on the data.

11. The system of claim 7 , comprising multiple computing nodes and multiple storage devices, where each storage node is configured to manage storage of data on at least a subset of the storage devices.

12. The system of claim 11 , where the database-management system is configured to place locks on a block of data that is spread across more than one of the storage devices.

13. The system of claim 7 , where the operation is one of the following types: a COLLECT STATISTICS operation, a CREATE INDEX operation, and an ALTER TABLE operation.

14. A computer program, stored on at least one computer-readable storage medium, for use in managing data in a database system, comprising executable instructions that, when executed by a computer, cause the computer to:

receive a request to perform an operation on a set of target data residing in the database;

execute the operation in the database on the set of target data;

during the executing of the operation, place an initial lock on the target data to prevent concurrent execution of at least one but not all operations on the target data; and

during the executing of the operation, place a final lock on the target data at a level that prevents concurrent execution of a larger set of operations.

15. The program of claim 14 , where the initial lock allows concurrent execution of at least one other operation on the target data.

16. The program of claim 14 , where the subsequent lock prevents concurrent execution of all other operations on the target data.

17. The program of claim 14 , where the program causes the computer to allow a user to specify the type of lock initially placed on the data.

18. The program of claim 14 , where the operation is one of the following types: a COLLECT STATISTICS operation, a CREATE INDEX operation, and an ALTER TABLE operation.

19. A method for use in managing data in a database system, comprising:

receiving an instruction from a user to perform a data-definition operation on a set of target data residing in the database;

placing an initial lock on the target data at a level that allows at least one concurrent operation on the target data;

executing the operation in the database on the set of target data;

during the execution of the operation, placing an initial lock on the target data to prevent concurrent execution of at least one but not all operations on the target data; and

during the execution of the operation, placing a final lock on the target data at a level that excludes all other concurrent operations on the target data.

20. The method of claim 19 , further comprising allowing a user to select the level of the initial lock.

21. The method of claim 19 , where placing an initial lock on the target data includes placing one of the following types of locks on the target data: an ACCESS lock; a READ lock; and a WRITE lock.

22. The method of claim 19 , where placing a final lock on the target data includes placing an EXCLUSIVE lock on the target data.

23. The method of claim 19 , where placing an initial lock on the target data includes locking an entire table.

24. The method of claim 19 , where receiving the instruction from the user includes receiving an instruction to perform one of the following operations: a CREATE INDEX operation, a COLLECT STASTICS operation, and an ALTER TABLE operation.

25. A method for use in managing data in a database system, comprising:

receiving an instruction from a user to perform a data-definition operation on a set of target data;

placing an initial lock on the target data at a level that prevents at least one but not all types of concurrent operation on the target data;

initiating execution of the operation on the target data; and

during the execution of the operation, placing a final lock on the target data at a level that excludes all types of concurrent operations on the target data.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2008
From: NCR CORPORATION
To: TERADATA US, INC.
Reel/Frame 020666/0438 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 16, 2000
From: SINCLAIR, PAUL L.; MAGHBOUIEH, ALBERT
To: NCR CORPORATION
Reel/Frame 011339/0581 →