Browse Prior Art Database

Continuous Query Function to Monitor Changes to a Database

IP.com Disclosure Number: IPCOM000039607D
Original Publication Date: 1987-Jul-01
Included in the Prior Art Database: 2005-Feb-01
Document File: 3 page(s) / 56K

Publishing Venue

IBM

Related People

Bui, TQ: AUTHOR [+7]

Abstract

A continuous query is used to monitor future activities which affect target records. Processes need not continually query the record for changes because the system query function will detect and inform the processes of the changes. Bit maps are used to identify the target records and specify the returned fields. A bit map is a sequence of bits where each bit is associated with a field in the database entry. A bit setting of '1'b is used to show the presence of the associated field in a data string. Therefore, the order of the data in the data string must be the same as the order of the selected bits ('1'b) in the bit map. A "continuous" query request is sent to a database manager. This request includes two "bit map" fields and a data string.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 3

Continuous Query Function to Monitor Changes to a Database

A continuous query is used to monitor future activities which affect target records. Processes need not continually query the record for changes because the system query function will detect and inform the processes of the changes. Bit maps are used to identify the target records and specify the returned fields. A bit map is a sequence of bits where each bit is associated with a field in the database entry. A bit setting of '1'b is used to show the presence of the associated field in a data string. Therefore, the order of the data in the data string must be the same as the order of the selected bits ('1'b) in the bit map. A "continuous" query request is sent to a database manager. This request includes two "bit map" fields and a data string. The first "bit map" field and the data string uniquely identify the search criteria (the entry or entries for which data is to be returned). The second "bit map" identifies the fields which will be returned. The keeper task will index through the entries in the database for those which satisfy the search criteria of the request. For each record in the database which satisfies the search criteria, the keeper task will return the data requested from the record (as for a normal query request).

(Image Omitted)

In addition, the keeper task assigns a unique token identifying that query request and returns that token to the requestor. The request, the identifier of the requestor (which will help the keeper task later in sending a notification), and the assigned token are stored in a continuous query table. As entries are inserted, updated, or deleted, the keeper task will compare the entries being inserted, updated, or deleted to each query request in the continuous query table. If the query criteria match the entry being processed, the requested information of that entry (along with a flag/message indicating the operation type and the token for the query request) will be sent to the requestor of that continuous query. The included token will help the requestor to recognize its continuous query request (because a user may have more than one continuous query). To discontinue notification of records or events which satisfy the criteria requested, the requestor must send a cancel query request. This request must include the token, previously returned from the keeper task, to identify the request to be cancelled. Upon receipt of this request, the keeper task deletes the query request from the continuous query table. All available matching entries are returned immediately to the requestor. Each future notification of the target record entry is sent to the requestor in a separate message/command. The "bit map" concept is also applied to the insertion, deletion, and update of a database entry. To insert an entry, a bit map and a data string need to be provided. The bit map shows the presence of the appropriate fields in the data string. The...