Data processing: database and file management or data structures – Database design – Data structure types
Reexamination Certificate
1999-05-28
2002-04-02
Breene, John (Department: 2177)
Data processing: database and file management or data structures
Database design
Data structure types
C707S793000
Reexamination Certificate
active
06366902
ABSTRACT:
BACKGROUND OF THE INVENTION
1. Field of the Invention
This invention relates in general to computer-implemented database systems, and, in particular, to accessing rows in a database.
2. Description of Related Art
Databases are computerized information storage and retrieval systems. A Relational Database Management System (RDBMS) is a database management system (DBMS) which uses relational techniques for storing and retrieving data. Relational databases are organized into tables which consist of rows and columns of data. The rows are formally called tuples or records. A database will typically have many tables and each table will typically have multiple tuples and multiple columns. Tables are assigned to table spaces. A table space is associated with direct access storage devices (DASD), and, thus, tables, are stored on DASD, such as magnetic or optical disk drives for semi-permanent storage.
A table space can be a system managed space (e.g., an operating system file system) or a database managed space. Each table space is physically divided into equal units called pages. Each page, which may contain, for example, 4K bytes, holds one or more rows of a table and is the unit of input/output (I/O). The rows of a table are physically stored as records on a page. A record is always fully contained within a page and is limited by page size. As users move towards working with image data and other large data objects, storing data in conventional records becomes difficult.
An index is an ordered set of references to the records or rows in a database file or table. The index is used to access each record in the file using a key and a RID or row location. The RID provides the physical location of a row (i.e., the page number and location within the page of a particular row). A key is one of the fields of the record or one of the attributes of a row. The key ensures that a row is unique. Building an index for a large file can take a considerable amount of elapsed time. The process involves scanning all records in the file, extracting a key value and RID value from each of the records, sorting all of the key/RID values, and then building the index from the sorted key/RID values.
A row identifier (“ROWID”) provides a unique identifier for each row in a table. When a DBMS reads a row identifier from a table, the row location (RID) is appended to the row identifier (ROWID), and thus, the row identifier contains information about the physical location of the row.
This RID enables users to write applications that directly access and operate on a row in a database. For example, if an application uses a RID in a data operation (e.g., SELECT, DELETE, or UPDATE), a DBMS can attempt to locate the row directly by using the RID appended to the row identifier (ROWID). To illustrate, assume that an application uses the row identifier (ROWID) in the following SELECT operation: SELECT FROM TABLE WHERE ROWID=:rowidval. The DBMS may locate the row directly by using the RID appended to the ROWID.
However, direct row access is not always feasible. In some instances, rows may move within a table space (e.g., after a reorganization). If a row has moved, the data operation (e.g., SELECT, UPDATE, and DELETE) must still return the qualifying row. In this case, the DBMS will perform a direct row access, determine that the row is not at the location indicated by the RID, and then, the DBMS will fall back to an alternative access path for finding the qualifying row.
Examples of alternative access paths include table space scans, index scans, and index look-ups. A table space scan involves reading a table space sequentially, which means that every row in the database table is read. An index scan involves scanning the entries of an index. An index look-up involves traversing an index tree to find an entry in an index. Typically, an index scan scans all of the entries of an index, while an index look-up uses the ordering of the index to find a desired entry. For example, if an index has a month column and a data column, and is ordered by the month column, then, to find data associated with a particular month, an index look-up is used to traverse the rows associated only with that month. To find data of a particular day, an index scan is used to scan each row of the index to identify desired days.
Performing the two steps (i.e., direct row access and an alternative access) can take a considerable amount of elapsed time, and hence, the expense of not finding rows is great. Therefore, there is a need in the art for an improved technique of accessing rows in a database.
SUMMARY OF THE INVENTION
To overcome the limitations in the prior art described above, and to overcome other limitations that will become apparent upon reading and understanding the present specification, the present invention discloses a method, apparatus, and article of manufacture for accessing a row in a database.
In accordance with the present invention, the database is stored on a data storage device connected to a computer. An identification number is generated for a region, wherein the identification number associated with the region reflects row movement in the region. The identification number is updated when there is row movement in the region. When accessing a row in the region, whether to perform a direct row access is determined based on the identification number.
REFERENCES:
patent: 4509119 (1985-04-01), Gumaer et al.
patent: 4949388 (1990-08-01), Bhaskaran
patent: 4961134 (1990-10-01), Crus et al.
patent: 5043866 (1991-08-01), Myre, Jr. et al.
patent: 5222235 (1993-06-01), Hintz et al.
patent: 5247672 (1993-09-01), Mohan
patent: 5261088 (1993-11-01), Baird et al.
patent: 5291583 (1994-03-01), Bapat
patent: 5295188 (1994-03-01), Wilson et al.
patent: 5388255 (1995-02-01), Pytlik et al.
patent: 5396623 (1995-03-01), McCall et al.
patent: 5408654 (1995-04-01), Barry
patent: 5416915 (1995-05-01), Mattson et al.
patent: 5418921 (1995-05-01), Cortney et al.
patent: 5418940 (1995-05-01), Mohan
patent: 5435004 (1995-07-01), Cox et al.
patent: 5445944 (1995-08-01), Haderle et al.
patent: 5452299 (1995-09-01), Thessin et al.
patent: 5517641 (1996-05-01), Barry et al.
patent: 5566329 (1996-10-01), Gainer et al.
patent: 5579499 (1996-11-01), Fecteau et al.
patent: 5579515 (1996-11-01), Hintz et al.
patent: 5630093 (1997-05-01), Holzhammer et al.
patent: 5666560 (1997-09-01), Moertl et al.
patent: 5684986 (1997-11-01), Moertl et al.
patent: 5687343 (1997-11-01), Fecteau et al.
patent: 5721915 (1998-02-01), Sockut et al.
patent: 5727197 (1998-03-01), Burgess et al.
patent: 5732402 (1998-03-01), Lehman
patent: 5737601 (1998-04-01), Jain et al.
patent: 5742806 (1998-04-01), Reiner et al.
patent: 5742810 (1998-04-01), Ng et al.
patent: 5758357 (1998-05-01), Barry et al.
patent: 5761667 (1998-06-01), Koeppen
patent: 6003024 (1999-12-01), Bair et al.
patent: 6058391 (2000-05-01), Gardner
patent: 8-167852 (1996-06-01), None
IBM Technical Disclosure Bulletin, “Method For Storing Large Objects in a Relational Database,” vol. 35, No. 4A, pp. 72-75, Sep. 1992.
IBM Technical Disclosure Bulletin, “Reorganization Flags For Table Indexes,” vol. 35, No. 5, pp. 156-157, Oct. 1992.
IBM Technical Disclosure Bulletin, “Technique to Allow DB2 Utilities and Commands to Run While SQL Applications Have a Table Space Locked,” vol. 36, No. 09A, pp. 499-501, Sep. 1993.
IBM Technical Disclosure Bulletin, “Spanning Temporary Reorg Files,” vol. 36, N. 06A, p. 159, Jun. 1993.
IBM Technical Disclosure Bulletin, “Segmented Relational Database Tables,” vol. 38, No. 07, pp. 219-220, Jul. 1995.
IBM Technical Disclosure Bulletin, “Mapping a Relational Database to a Hierarchical File System,” vol. 38, No. 10, pp. 309-311, Oct. 1995.
IBM Technical Disclosure Bulletin, “Fine Granularity Locking to Support High Data Availability in a Client/Server Database Management System,” vol. 38, No. 02, pp. 143-145, Feb. 1995.
Joon Seek Kim, et al., “Mapping Parameter Estimation Using Integral Projections And Segmented Moving Objects in Object-Oriented Analysis-Synthesis Coding,” Optical Engineeri
Lyle Robert William
Yothers Jay A.
Breene John
International Business Machines Corp.
Rayyan Susan
Sughrue & Mion, PLLC
LandOfFree
Using an epoch number to optimize access with rowid columns... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with Using an epoch number to optimize access with rowid columns..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Using an epoch number to optimize access with rowid columns... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-2919244