Object-relational mapping for tables without primary keys

Data processing: database and file management or data structures – Database design – Data structure types

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C707S793000

Reexamination Certificate

active

06591275

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates generally to data processing systems and, more particularly, to an object-relational mapping tool for accessing data stored in relational database tables that do not utilize primary keys.
BACKGROUND OF THE INVENTION
Object-relational mapping tools have been created to facilitate development of application programs that utilize a relational database. A relational database stores data in tables having rows (records) and columns (fields). The tables are usually interrelated, and thus, there is a logical structure imposed on the database. This logical structure is known as a schema. Each table may have a primary key, comprising one or more columns that uniquely identify a row. For example, in a table with rows of customers, a column storing each customer's social security number may be used as the primary key because it uniquely identifies each customer in the table. However, one may have relational database tables that do not have primary keys.
Object-relational mapping tools read database schema information and automatically generate source code from the database. This source code contains a number of classes whose interrelationships reflect the logical structure, or schema, of the database. A class, such as a Java™ class, is a data structure containing both data members that store data and function members (or methods) that act upon the data. The source code may contain one class for each table in the database, and each class may have a data member for each column in the corresponding table. Additionally, the classes contain function members that are used to both get and set the values for the data members and, eventually, update the database.
By using an object-relational mapping tool, a programmer can automatically generate source code to facilitate database application development. After the source code is generated, the programmer writes code to interact with only the classes in the source code and not the database, thus hiding the complexities of interacting with the database from the programmer. This allows a programmer who is familiar with object-oriented programming to code against familiar classes and not unfamiliar, sometimes cumbersome to use, database query languages.
When a database schema is mapped to classes, most tables map directly to classes. Each row within a table maps to an instance of the class, and is identified with a unique object identifier—the primary key for tables with primary keys. The object-relational mapping tool relies on the unique object identifiers corresponding to the primary keys to maintain information in the corresponding relational database table. For example, conventional object-relational mapping tools use the unique object identifiers to update and delete information contained in the corresponding relational database table. The conventional object-relational mapping tools, however, cannot maintain information in relational database tables without primary keys. Thus, there is a need for systems and methods that permit object-relational mapping tools to maintain database tables without primary keys.
SUMMARY OF THE INVENTION
In accordance with methods and systems consistent with the present invention, an object-relational mapping tool is provided that can be used to maintain information in relational database tables that do not use primary keys. The object-relational mapping tool uses a cursor update operation associated with relational database tables to maintain information contained in the relational database table, including performing operations such as, updating rows, and deleting rows from the table.
In accordance with methods consistent with the present invention, a method is provided in a computer system having a non-primary key table. The method, upon receiving a selection instruction with a set of values, identifies all columns from the table with all of the specified values to select a set of rows from the table, and then for each selected row the method creates an object with a unique identifier and populates attributes of the object with values from all of the columns that form the selected row.
In accordance with methods consistent with the present invention, another method is provided in a computer system having a non-primary key table, where each row in the table is being represented by a corresponding object. The method, upon receiving an update instruction to update values of attributes of an object, selects rows with all of the same values as stored in the object using cursor update, and updates one of the selected row with values from the instruction.
In accordance with methods consistent with the present invention, yet another method is provided in a computer system having a non-primary key table, where each row in the table is being represented by a corresponding object. The method, upon receiving a delete instruction to delete an object, selects rows with all of the same values as stored in the object using cursor update, and deletes one of the selected rows.
In accordance with systems consistent with the present invention, a data processing system is provided comprising a secondary storage device, a memory, and a processor. The memory contains a non-primary key table with rows and columns and an object-relational mapping tool configured to, upon receiving a selection instruction with a set of values, identify all columns with all of the values specified in the set to select a set of rows from the table, and for each selected row, create an object with a unique identifier and populate attributes of the object with values from the columns that form the selected row. The processor is configured to run the object-relational mapping tool.
In accordance with systems consistent with the present invention, a data processing system is provided comprising a secondary storage device, a memory, and a processor. The memory contains a non-primary key table with rows and columns, and an object-relational mapping tool configured to, upon receiving an update instruction, select a row with all of the same values as stored in the object using cursor update, and update one of the selected row with values from the instruction. The processor is configured to run the object-relational mapping tool.
In accordance with systems consistent with the present invention, a data processing system is provided comprising a secondary storage device, a memory, and a processor. The memory contains a non-primary key table with rows and columns and an object-relational mapping tool configured to, upon receiving a delete instruction, select rows with all of the same values as stored in the object using cursor update, and delete one of the selected rows. The processor is configured to run the object-relational mapping tool.


REFERENCES:
patent: 4589092 (1986-05-01), Matick
patent: 4930071 (1990-05-01), Tou et al.
patent: 5043876 (1991-08-01), Terry
patent: 5261069 (1993-11-01), Wilkinson et al.
patent: 5263155 (1993-11-01), Wang
patent: 5280612 (1994-01-01), Lorie et al.
patent: 5291583 (1994-03-01), Bapat
patent: 5301297 (1994-04-01), Menon et al.
patent: 5504885 (1996-04-01), Alashqur
patent: 5542078 (1996-07-01), Martel et al.
patent: 5548749 (1996-08-01), Kroenke et al.
patent: 5574882 (1996-11-01), Menon et al.
patent: 5583983 (1996-12-01), Schmitter
patent: 5596746 (1997-01-01), Shen et al.
patent: 5627979 (1997-05-01), Chang et al.
patent: 5640555 (1997-06-01), Kleewein et al.
patent: 5659738 (1997-08-01), Letkeman et al.
patent: 5701453 (1997-12-01), Maloney et al.
patent: 5732257 (1998-03-01), Atkinson et al.
patent: 5742813 (1998-04-01), Kavanagh et al.
patent: 5765159 (1998-06-01), Srinivasan
patent: 5774731 (1998-06-01), Higuchi et al.
patent: 5829006 (1998-10-01), Parvathaneny et al.
patent: 5832484 (1998-11-01), Sankaran et al.
patent: 5832498 (1998-11-01), Exertier
patent: 5835906 (1998-11-01), Hagersten et al.
patent: 5835910 (1998-11-01), Kavanagh et al.
patent: 5850544 (1998-12-01), Parvathaneny et al.
patent: 5857197 (1999-01-01), Mullins
patent: 5860070 (1999-01-01), Tow et

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Object-relational mapping for tables without primary keys does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Object-relational mapping for tables without primary keys, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Object-relational mapping for tables without primary keys will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3087713

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.