Object-relational mapping toll that processes views

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

06175837

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates generally to data processing systems and, more particularly, to an object-relational mapping tool that processes database views.
2. Description of the Related Art
To facilitate development of application programs that utilize relational databases, object-relational mapping tools have been developed. In general, relational databases store 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. Object-relational mapping tools read a database and automatically generate source code. The source code that is generated contains a number of classes whose interrelationship reflects 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 contains one class for each table in the database, and each class has 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 of the data members and, eventually, update the database.
By using an object-relational mapping tool, a programmer can easily generate source code to facilitate database application development. After the mapping tool generates the source code, the programmer writes code to interact with only the classes in the generated 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.
The tables contained in a database are interrelated to each other by primary and foreign keys. Each table may have a primary key, comprising one or more columns, that uniquely identifies a row in the table. Foreign keys, on the other hand, are used to associate a row in one table with one or more rows in another table.
For example, a business may store customer information in a database. Such a database, depicted above, may contain a Customer table and an Order table. The Customer table comprises a column for storing a customer's name and a column for storing a customer's unique identification number. The primary key for the Customer table is the customer identification column because it uniquely identifies each customer in the table and, most likely, will not change.
The Order table comprises a column for storing the purchase number, a column for storing the store where the order was placed, a column for storing the date when the order was placed, and a column for storing the customer identification number. Each time a customer places an order, a purchase order number identifies the transaction. Since purchase numbers are unique, the primary key for the Order table is defined as the purchase order column. Accordingly, each time a customer places an order, a new row will be generated containing the purchase order number, the store number, the date, and the customer's identification number. Thus a particular customer could have multiple rows in the order table, each representative of a different order transaction.
The rows in the Customer table are related to the rows in the Order table by a foreign key. The foreign key for the Order table is the customer identification column, which refers to the customer identification column in the Customer table. As such, the data contained in the two tables can be interrelated. Therefore, it is possible, via the customer identification column, to discover the customer name associated with a particular purchase order.
Tables can also have views defined on them. Views are created by query expressions and refer to a subset of one or more tables (i.e. a subset of the rows and/or columns). A view may be defined by one or more columns of the table from which the view is defined, referred to as a base table, or a view may be defined by a combination of columns from multiple base tables. In addition, a view can be nested, where the view is based on one or more previously defined views, referred to as base views.
For instance, as shown below, continuing the prior example, a view can be created containing only the purchase orders placed in 1998 or a view can be created containing only the purchase orders made from store XYZ.
Although beneficial to programmers, conventional object-relational mapping tools suffer from a limitation. When a programmer runs a conventional object-relational mapping tool, the mapping tool does not provide a customizable mapping of views in terms of dependency, updatability, and object mapping of views. Because of this limitation, programmers must develop additional logic in query language and low level database application programming interfaces (API's) to process the views. This makes the code development more difficult and error prone. This is both time consuming and cumbersome. In addition, because updatability and dependencies of views are not captured by conventional mapping tools, any attempt to update a subsequently created view can lead to inconsistent database state. It is therefore desirable to improve object-relational mapping tools.
SUMMARY OF THE INVENTION
In accordance with methods and systems consistent with the present invention, an improved object-relational mapping tool is provided that is able to handle views in its processing so that source code can be automatically generated that uses the views, thus facilitating code development. As part of its ability to handle views, the improved object-relational mapping tool identifies the dependency relationship between relational database base tables, and views and displays this dependency relationship to the programmer so that the programmer can customize the mapping that occurs. That is, the programmer may decide what components of the database should be “mapped” into source code.
This customized mapping includes the ability to automatically 1) map all base tables and all views, regardless of the dependencies among them; 2) map base tables only; and 3) map only top level views and base tables with no views derived from them. In this latter case, the mapping tool maps the highest level view or table, or the table itself if there are no views defined on that table. After this automatic mapping has occurred, a programmer can also manually override this mapping and choose to either map or unmap tables and views.
In addition, the object-relational mapping tool can determine whether or not a view is read-only or whether it can be updated. Furthermore, in the event that the view can be updated, the programmer may specify, during the mapping process, whether the data in the source code corresponding to the view should be read-only or updatable. In this manner, the programmer is able to decide whether or not the ability to update a view should be passed on to the source code, thus providing the programmer with flexibility to enforce an update policy of their choosing.


REFERENCES:
patent: 4589092 (1986-05-01), Matick
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: 5499371 (1996-03-01), Henninger et al.
patent: 5504885 (1996-04-01), Alashqur
patent: 5542078 (1996-07-01), Martel et al.
patent: 5574882 (1996-11-01), Menon et al.
patent: 5596746 (1997-01-01), Shen 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: 5835910 (1998-11-

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 toll that processes views 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 toll that processes views, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Object-relational mapping toll that processes views will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2451768

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