RELATIONAL DATA BASE LOCK AVOIDANCE SYSTEM

Abstract: The present invention is directed to a relational data base system which is operating in a virtual machine environment. The invention provides a system that includes a disconnected virtual machine which is running in the same virtual machine environment as is the relational data base. Insert and Update requests to the system are generated by programs running in user controlled virtual machines. Other users issue select and view requests which lock out insert and update requests which relate to the same data domain. With the present invention Insert and Update requests go to the disconnected virtual machine which ques them and applies them against the relational data base in the order that the requests are received. In this way, while a select is being executed on data in a par­ ticular domain of the data base, update and insert request for the same domain will be held by the virtual machine and the operator will not be "locked out" of the system.

Description: The present invention relates to a computerized data base system and more particularly to a relational data base system. There are a wide variety of systems available for storing and retrieving data utilizing computer systems. Relational Data Bases are one type of widely used data base system. A general description of relational data base systems can be found in a publication entitled SQL/DS Systems Concepts and Facilities which is publicly available from the IBM Corporation as publication number GH24-5065. The International Business Machines Corporation markets a Relational Data Base system called SQL/DS as their program product number 5748XXJ-B (release 3.5). The system marketed by IBM is described in a publication commercially available from IBM as publication number GH24-5064. The SQL/DS data base system runs under the operating system marketed by IBM that is called the IBM Virtual Machine/Systems Product. The IBM Virtual Machine/Systems Product is described in a publication entitled "Virtual Machine/Systems Product Introduction" available from IBM as publication number GC19-6200. One problem associated with multi user relational data base systems such as the SQL/DS system is that when one user is selecting data from a particular domain in a particular table in the data base, other users who try to insert data into the same table and the same domain are "locked out" and they must wait until the first user's request has been processed. In such situations, the system processes all requests in the order that they are received and the wait time that an operator experiences is dependent on the length of time that the first user is processing or viewing requests. In some applications of multi user relational base systems, such as for example in an application where a relational data base is being used to keep track of a parts inventory, the users can be divided into two types. First, there are users that select and view data, and second, there are users that update and insert data. In such systems there generally would be a large number of requests for inserting and updating the data and a relatively small number of requests to select and view the data. Although the number of insert and update requests is high, the processing time for each request is short and it only affects one row of data in the table per request. There generally is a smaller number of requests for selecting and viewing data or for report generation. The requests for selecting and viewing data can cover a large domain of data and they can require a relatively long processing time. When a user is selecting or viewing data in a particular area or domain of a data table, other users who may want to insert or update data in the same domain of the same table are "locked out" of the system until the operation by the user who is viewing or selecting data is complete. This can lead to a significant amount of wasted time waiting for the system to respond. An object of the present invention is to improve the performance of a computer system including a relational data base system as defined in the preamble to claim 1. This object is met by a computer system as claimed in claim 1. The claimed invention is directed to a relational data base system which is operating in a virtual machine environment. The invention provides a system that includes a disconnected virtual machine which is running in the same virtual machine environment as is the relational data base. Insert and Update requests to the system are generated by programs running in user controlled virtual machines. Other users issue select and view requests which lock out insert and update requests which relate to the same data domain. With the present invention Insert and Update requests go to the disconnected virtual machine which queues them and applies them against the relational data base in the order that the requests are received. In this way, while a select is being executed on data in a particular domain of the data base, update and insert request for the same domain will be held by the virtual machine and the operator will not be "locked out" of the system. The foregoing and other objects, features and advantages of the invention will be apparent from the following more particular description of a preferred embodiment of the invention as illustrated in the accompanying drawings. Figure 1 is a diagrammatic or schematic drawing which shows a computer system with a relational data base system and the various interconnected virtual machines that constitute the present invention. Figure 2 is a flow diagram that shows the general flow of information through the system. The specific embodiment of the present invention which is shown schematically in the drawing includes an IBM model 4381 computer 10 which is operating under a commercially available operating system 12 known as the IBM VM/SP Operating system. The particular computer utilized is not particularly relevant to the present invention and an IBM model 4381 is shown merely for the purpose of illustration. The IBM model 4381 computer is commercially available and it will not be described further herein. Likewise the VM/SP operating system 12 will not be further described since it is commercially available and it is described among other places in a manual entitled "Virtual Machine/Systems Product Introduction" commercially and publicly available from IBM as publication number GC19-6200 and in the other manuals that are referenced therein. The IBM VM/SP operating system 12 includes a conversational monitor system 13 generally known as CMS. This system is commercially available and it is described in a commercially available publication entitled CMS Command and Macro Reference which is publicly available from IBM as publication number SC19- 6210. A Relational data base program 11 called the IBM SQL/DS program is running in computer 10 under CMS program 13. The IBM SQL/DS program 11 is commercially available from IBM as program product number 5748XXJ-B. This program is described in a manual which is commercially available from IBM as publication number SC19-6200. The system also includes a disconnected virtual machine 14, and a plurality of user virtual machines 15-1, 15-2, 15-3, 17-1 etc. A number of user terminals 16-1, 16-2, 16-3 are used by operators who issue Insert and Update requests to Data Base program 11. A terminal 18-1 is used by an operator who issues Select and View requests to Data Base Program 11. There can be many more terminals than the number shown; however, four terminals are enough to demonstrate the principles of the present invention. The manner of setting up disconnected virtual machine 14 and the manner of setting up the virtual machine 15-1, 15-2, 15-3, and 17-1 is not explained in detail herein, since this is described in the commercially available IBM, publication related to the VM/SP operating system which were previously referenced. The present invention is only concerned with how the various virtual machines interrelate with the relational data base. The interrelation between the programs and hardware is shown in two different ways in Figures 1 and 2. Figure 1 shows that each of the terminals 16-1, 16-2 16-3 and 18-1 has an associated virtual machine. This is common practice in a virtual machine operating environment. Of particular note is that the virtual machines 15-1, 15-2 and 15-3 send Insert and Update requests which originate in terminals 16-1, 16-2 and 16-3 to disconnected Virtual machine 14 via paths L35, L36 and L37. Virtual machine 17-1 sends select and view requests that originate in terminal 18-1 directly to data base program 11 via path L38. Paths L35, L36, L37 and L38 are each conventional Virtual machine interconnections which can accommodate file transfers. Figure 2 shows user programs 20-1, 20-2 and 20-3 that are respectively operating in User virtual machines 15-1, 15-2, and 15-3 and user program 21-1 which is operating in virtual machine 17-1. User programs 20-1, 20-2 and 20-3 issue Insert and Update requests that go to disconnected virtual machine 14 over paths L41, L42 and L43. Disconnected virtual machine 14 has an EXEC program 24 which creates a request queue 23. Insert and Update requests are sent to data base program 11 from virtual machine 14 over path L45. User program 21-1 issues conventional Select and View requests and these are sent directly to data base program 11 in a conventional manner. In the operation of data base program 11, when user program 21-1 issues a conventional Select or a View request to data base program 11, the data base 11 "locks out" Insert and Update requests that are issued relative to the same data table and the same data domain. This "lock out" condition exists during the entire time that the data base is operating upon the Select or the View request. With the present system, Insert and Update requests issued by User programs 20-1, 20-2 and 20-3 go to disconnected virtual machine 14 and they are held and queued. Hence, the operators at terminals 16-1, 16-2 and 16-3 can continue to operate even though the data base 11 is locking out certain requests. This results in a significant increase in productivity for the operators of terminals 16-1, 16-2 and 16-3. It is noted that in the prior art system, when an Insert or Update requests is issued against a data domain that is "locked out" by the data base, the terminal is effectively rendered useless during the lock out period since the terminal is "locked" until the data base responds that the locked condition has been released. The following is a pseudo code description for an EXEC program 24 in disconnected Virtual Machine 14. As will be explained, files are sent to virtual machine 14 from the user machines 15-1, 15-2, 15-3 etc. The files coming to virtual machine 14 from the user machines 15- 1, 15-2, 15-3, etc. are either INSERT or UPDATE requests. The INSERT requests have: a file type of INSERT and a file name indicating the origin of the file, for example a file might be named USER1 INSERT The UPDATE requests have: a file type of UPDATE and a file name indicating the origin of the file, for example a file might be named USER1 UPDATE The EXEC in virtual machine 14 is named CHECK: The pseudo code for the EXEC is: The following is a specific example of an inventory program 20- 1, 20-2, 20-3 etc. in the user machines 15-1, 15-2, 15-3 etc. This program sends INSERT requests to disconnected virtual machine 14. Note: CONTROL is the user ID of disconnected Virtual Machine 14 Inventory Program Pseudo Code: When terminal 18-1 issues a select request on data in a particular data domain in a table in relational data base 11, virtual machine 17-1 branches to an EXEC that sends the select request to data base program 11 in a conventional manner. Although, the above program have been defined in pseudo code, the programs would be coded in an actual system in an EXEC language such as REXX or in any one of a variety of other known languages such as PL I. The manner of doing this is defined in the previously referenced commercially available publications and it is well with the skill of the art to transform pseudo code such as that given above into an executable EXEC program for a virtual machine.

Claims: A computer system comprising an operating system (12,13)program which provides a virtual machine environment, a relational data base program (11) operating in said virtual machine environment, said relational data base having means for responding to insert, update, view and select requests which operate on a particular domain of data, insert and update requests being locked out from a particular data domain when a select request is being executed in said particular data domain, a number of user controlled virtual machines (15), each connected to a respective user terminal (16), that issue update and insert requests, a user terminal (18) that issues select and view requests from a connected user controlled virtual machine (17) directly to said relational data base, whereby areas of said data base are locked out while said select requests are being executed, a disconnected virtual machine (14) not connected to a user terminal, running in said virtual machine environment, characterized by: means (L35, L36, L37) for sending requests from a said user controlled virtual machine (18) go to said disconnected virtual machine (14); and, means in the disconnected virtual machine for queuing insert and update requests and for applying them to the relational data base in the order that the requests are received whereby when a select or view request is being executed on data in a particular domain of the data base, other update and insert request for the same domain will be held by the virtual machine and the user will not be locked out of the system. The system recited in claim 1 wherein said relational data base (11) is an SQL/DS data base. The system recited in claim 1 wherein said means in the disconnected virtual machine for queuing requests is an EXEC program. The system recited in claim 1 wherein said means for sending sends files to said disconnected virtual machine, said files having identifying names. The system recited in claim 1 wherein said operating system (12, 13) is a VM/SP system. The system recited in claim 1 wherein said view requests lock out insert and update requests from direct execution in said data base.

Inventors: CLAYTON, NEIL HARRISON, RIVERO, JOSE LUIS, SUN, KUO-CHANG
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1988
Main classification: G06F15
IPC codes: G06F7, G06F17, G06F15, G06F12