Mapping relational tables to object oriented classes
First Claim
Patent Images
1. A computer system framework for mapping relational database tables to object oriented classes, the framework comprising:
- an attribute class for mapping data values from a relational table column to values in an object oriented environment, the attribute class comprising data objects representing data types, a data object for data from the relational table, and methods to access the data objects in the attribute class, wherein the attribute class defines the run-time mapping between the relational table column and the entity class attributes;
a generator class for providing methods to permit the generation of SQL statements for relational tables defined by the attribute class data objects, wherein the generator class is an active object for the run-time, dynamic generation of the SQL statements used to access the relational data, such that the SQL statements are not constrained by schema mapping used to generate the data objects;
whereby mapping can be modified during client program execution and the programmer may define a table class corresponding to a relational table, the table class using the attribute class and the generator class of the framework to define the columns of the table in the object oriented environment and to define specific operations on the relational table.
4 Assignments
0 Petitions
Accused Products
Abstract
A computer system providing a framework for mapping relational tables to object oriented classes. The framework includes an attribute class for defining data corresponding to columns in a relational table and including data objects used to map between the relational table and a programmer-defined object oriented class. The attribute class also including flags used to indicate modifications to the data. The framework further includes a generator class providing methods for generating SQL text corresponding to the relational table as defined in the attribute class objects for a given table.
129 Citations
9 Claims
-
1. A computer system framework for mapping relational database tables to object oriented classes, the framework comprising:
-
an attribute class for mapping data values from a relational table column to values in an object oriented environment, the attribute class comprising data objects representing data types, a data object for data from the relational table, and methods to access the data objects in the attribute class, wherein the attribute class defines the run-time mapping between the relational table column and the entity class attributes;
a generator class for providing methods to permit the generation of SQL statements for relational tables defined by the attribute class data objects, wherein the generator class is an active object for the run-time, dynamic generation of the SQL statements used to access the relational data, such that the SQL statements are not constrained by schema mapping used to generate the data objects;
whereby mapping can be modified during client program execution and the programmer may define a table class corresponding to a relational table, the table class using the attribute class and the generator class of the framework to define the columns of the table in the object oriented environment and to define specific operations on the relational table. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computer system framework for mapping relational database tables to object oriented classes, the framework comprising:
-
an attribute class for mapping data values from a relational table column to values in an object oriented environment, the attribute class comprising;
data objects representing data types, the data objects representing data types comprising a column name object, an SQL type object and an object oriented mapping type object;
a data object for data from the relational table;
data object flags comprising an index flag indicating whether the relational table column mapped by the attribute class object is part of a target index for a given SQL statement;
a modified bit flag indicating whether the attribute value in the attribute class object has been modified;
a bindable flag indicating whether the attribute value for the attribute class object is to be bound to a parameter marker for a given SQL statement, and an associated update string data object comprising an SQL fragment to be bound to the parameter marker where the attribute value is not to be bound, and methods to access the data objects in the attribute class, wherein the attribute class defines the runtime mapping between the relational table column and the entity class attributes a generator class comprising; methods to generate SQL statements comprising SELECT, INSERT, UPDATE, and DELETE, and methods to bind values to the SQL statements passed to the relational table database, the methods to generate the SELECT statement further comprising a method to extract values from a fetched row of a relational table for use in a corresponding attribute class object, wherein the generator class is an active object for the runtime, dynamic generation of the SQL statements used to access the relational data;
whereby mapping can be modified during client program execution and the programmer may define a table class corresponding to a relational table, the table class using the attribute class and the generator class of the framework to define the columns of the table in the object oriented environment and to define specific operations on the relational table. - View Dependent Claims (9)
-
Specification