WO1999017232A1 - Object model mapping and runtime engine for employing relational database with object oriented software - Google Patents

Object model mapping and runtime engine for employing relational database with object oriented software Download PDF

Info

Publication number
WO1999017232A1
WO1999017232A1 PCT/US1998/020008 US9820008W WO9917232A1 WO 1999017232 A1 WO1999017232 A1 WO 1999017232A1 US 9820008 W US9820008 W US 9820008W WO 9917232 A1 WO9917232 A1 WO 9917232A1
Authority
WO
WIPO (PCT)
Prior art keywords
mapping
attribute
class
map
relational database
Prior art date
Application number
PCT/US1998/020008
Other languages
French (fr)
Inventor
Robert A. Huebner
Gabriel Oancea
Robert P. Donald
Jon E. Coleman
Original Assignee
Ontos, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=26739386&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=WO1999017232(A1) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Ontos, Inc. filed Critical Ontos, Inc.
Priority to JP2000514227A priority Critical patent/JP2001518670A/en
Priority to IL13526798A priority patent/IL135267A0/en
Priority to AU96654/98A priority patent/AU743821B2/en
Priority to EP98950668A priority patent/EP1068577A1/en
Priority to CA002304517A priority patent/CA2304517A1/en
Publication of WO1999017232A1 publication Critical patent/WO1999017232A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99941Database schema or data structure
    • Y10S707/99944Object-oriented database structure
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10TECHNICAL SUBJECTS COVERED BY FORMER USPC
    • Y10STECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y10S707/00Data processing: database and file management or data structures
    • Y10S707/99941Database schema or data structure
    • Y10S707/99944Object-oriented database structure
    • Y10S707/99945Object-oriented database structure processing

Definitions

  • the present invention is generally related to database technology, and more particularly to interfacing object oriented software applications with relational databases.
  • Another method of interfacing an object oriented application with a relational database is to translate database information into a format which is compatible with the object oriented application.
  • Relational databases typically separate data into a plurality of tables through a process known as "normalization" to minimize duplication.
  • a normalized relational database includes a plurality of tables, wherein each table includes at least one field and one key, and at least one field in each table is uniquely dependent upon the key that is associated with the table.
  • a mapping between an object model and a relational database and a runtime engine are employed to facilitate access to a relational database.
  • the object model can be created from database schema or database schema can be created from the object model. Further, the mapping can be automatically generated.
  • the database schema, object model, and mapping are employed to provide interface objects that are utilized by an object oriented software application to access the relational database.
  • the present invention provides transparent access to the relational database.
  • the interface objects and runtime engine perform read and write operations on the database, including generation of SQL code. Consequently, neither programmers nor software applications need have knowledge of the database structure, the database programming interface, database security, or the database transaction model in order to obtain access to the relational database. Further, changes to the relational database do not always necessitate additional mapping.
  • Fig. 1 is a block diagram that illustrates use of the map to generate interface objects that are employed by a runtime engine and an object oriented software application to access a relational database;
  • Fig. 2 is a block diagram of database schema
  • Fig. 3 is a block diagram of an object model
  • Fig. 4 is an object diagram of a mapping
  • Fig. 5 is an object diagram of the runtime engine
  • Fig. 6 is an object diagram of RtCore.DLL.
  • Fig. 7 is a sequence diagram that illustrates operation of the runtime engine.
  • a mapping tool 10 is employed to generate a map 12 in which relationships between an object model 14 and schema associated with a relational database 16 are defined.
  • a code generator 18 is employed to examine the relationships that are defined in the map 12 and a model object oriented interface associated with an object oriented software application 22 to generate interface objects 20.
  • the interface objects 20 are employed by the object oriented software application 22 to access the relational database 16 via a runtime engine 24, which also uses the map 12 to drive its processing.
  • the object model 14 is a template that has a predetermined standardized structure.
  • the illustrated object model includes attributes and inheritance relationships that are mapped to relational database features such as tables, rows, columns, keys, and foreign keys.
  • Mapping the object model to the relational database schema includes mapping a class attribute to a table column, mapping a class attribute to a 1-1, 1-N, or N-N relationship, and mapping class inheritance to rows within a table or across tables.
  • mapping the class attribute defines where the attributes are read from and written to.
  • the class attribute CPerson.name 26 maps to table column TPerson.name 28.
  • the "Class Key” is employed to relate an object instance to a row in the table. In particular, key values of the class are mapped to columns in a table that comprise the primary key.
  • CPerson.id 30 maps to TPerson.id 32.
  • "Joins" defines keys between tables within a class. Since there is only one table in the mapping of Cperson.name to Tperson . name , no information is required for Joins. If Cperson includes two tables, such as Tperson and X, then mapping Cperson. y to X.y includes: Cperson. y Maps to X.y + Cperson. id Keys to Tperson. id + Tperson. id Joins to X.id.
  • Mapping a class attribute to a 1-1, 1-N, or N-N relationship with at least one other object can be described generally as: Class Attribute -> Class + Class Attribute -> Foreign Key + Joins.
  • an attribute in the object points to one or multiple other objects. If the object points to only one object, there is a one-to-one (1-1) association between the objects. If an object points to multiple objects, there is either a one-to-many (1-N) or many-to-many (N-N) relationship between the objects.
  • CEmployee . dept 34 maps to Cdepartment 36, where CEmployee 38 to CDepartment 36 is a one to one relationship.
  • Form Key represents identifying the foreign key. If CEmployee is related to CDepartment, there is a foreign key to another table. The foreign key is identified within one of the tables that comprise Cemployee and is related to the class attribute Cemployee . dept . This relationship may be inferred from foreign key information in the database schema. It is also possible that foreign key information is missing or that there are many foreign keys in CEmployee to CDept . Consequently, this step involves selecting columns that represent the foreign key. In the illustrated example, Cemployee. dept is associated with TEmployee .deptid. Once a class attribute is associated with the foreign key which resides in that class, "Joins" is defined to associated classes. In the illustrated example, TEmployee.deptid joins to TDepartment . id is defined.
  • mapping class inheritance to rows within a table or across tables is performed by specifying a WHERE clause on the class which can distinguish the class from the associated parent class. This information is stored in the mapping model .
  • Table 1 describes how an object model can be mapped to structures in a database schema.
  • Object relationships are mapped to the database schema by defining the joins needed to access related objects or groups of objects (lists) .
  • the joins make use of foreign keys defined in the tables that are mapped to the related classes.
  • Table 2 describes mapping of object relationships relative to the illustrated example.
  • Table 3 describes how structures in a database schema can be mapped to structures in an object model.
  • the duplicate columns can be handled by mapping one of the table . columns for read, and all of the columns for insert and update .
  • Schema relationships are mapped directly to object relationships, either in the form of object attributes or list attributes.
  • a foreign key in the database schema is mapped to an inverse relationship between an object attribute (on the class mapped to the table holding a foreign key) and a list attribute (on the class mapped to the table referenced by a foreign key) .
  • a join table is mapped to an inverse relationship between list attributes defined on each of the classes mapped to the tables related by the join table .
  • Table 4 describes how relational keys are mapped to object relationships relative to the illustrated example.
  • the runtime engine comprises a plurality of dynamic link libraries (“DLLs") including: RtMap.dll 50, RtCore.dll 52, DbObjs.dll 54, OiGenBase.dll 57, and a set of generated DLLs 56.
  • the generated DLLs 56 contain one COM interface and implementation class for each class defined by a mapping model.
  • a mapping model binary file is generated in parallel with each DLL containing the mapping information associated with the DLL.
  • the RtMap.dll 50 implements the classes that can load the information from the binary file at runtime and make it available to the runtime interface objects associated with DLLs 56 and to the client objects 58 of the generated COM objects through a set of predefined COM interfaces.
  • Classes OOBase and OObject in RtCore.dll 52 form the core of the runtime engine 24.
  • the OOBase is a base abstract class which is used as a base for all the generated implementation classes.
  • the generated classes are ATL COM objects implementing one of the standard IDslObject/lDslList/lDslQlist and one or more of the client interfaces (e.g., Employee) .
  • the ATL implementation classes have state implemented as a set of attributes of the primitive types called the "front state" (or the front data set) .
  • the OOBase contains a pointer to the OObject and a public pure virtual method to access the address of each attribute in the classes descending from itself. The attributes are indexed according to the class definition for the object.
  • the OObject class is abstracting the runtime functionality for a generic object. It contains a set of attribute info-value pairs (one per attribute, constructed when the object is initialized to form a "back state, " or baseline) . OObject also has a set of attribute flags (one per attribute, bitwise or of values like isModified, isRetrieved, isDirty, isNull and others) . One instance of the OObject is created for every instance of the generated objects to take care of the interface to the persistent data storage through a set of DB objects that are MTS stateless, transactional objects.
  • Fig. 7 illustrates the sequence of actions that take place when a business object creates a Dsl object in step 61, accesses the name property in step 65 and saves the object in step 69.
  • OObject is constructed when the constructor of the DPerson (the generated COM implementation class) is invoked in step 62. The constructor passes as parameters the appropriate constant Classlnfo reference and a reference to itself. The OOBject initializes all flags and sets the attributes to the default values as defined in the Attrlnfo objects associated with the Classlnfo in step 63.
  • the GetAttrPtrO function defined by the OOBase is employed to get the attribute address for each attribute in the class in order to initialize the front set of attributes on the object in step 64.
  • the generated code checks to see if the attribute was retrieved. If the attribute was retrieved then the cached value is returned. Otherwise, RetrieveAttrValue () of the OObject is called in step 66, passing the id of the desired attribute (name in the example) .
  • the OObject will look at the fetch matrix for this attribute and see what other attributes should be retrieved with it in step 67 and then determines what tables and columns are involved, how they are joined and executes the appropriate SQL statements using the stateless MTS object.
  • the GetAttrPtrO function defined by the OOBase is employed to get the attribute address for each attribute in the class in step 68.
  • the generated code calls the OObject SaveChanges () method in step 70.
  • the OObject determines what attributes have changed and, depending on the concurrency control mode in effect, makes sure the appropriate locks and transactions are set and respectively open and then executes the appropriate SQL to write the data to the persistent storage in step 71.
  • the runtime engine also includes a plurality of performance enhancing features such as optimized data retrieval algorithms.
  • An attribute retrieval can be associated with each attribute to optimize attribute retrieval from the database. As a default case, all attributes are retrieved when any one of an object's attributes are needed. However, the attribute retrieval list for any attribute can be edited to specify different attribute retrieval behavior. For example, a request for an Employee Id may cause the Photo attribute to be dropped from the attribute retrieval list on the Id attribute if that data resides in another table and is only infrequently used.
  • Attribute retrieval lists are a performance feature that enable optimized data access by only doing JOINS and additional SELECT statements when the data returned by those actions is needed.
  • Performance is also enhanced by "just in time” data retrieval. By default, whenever an attribute value is read from the database, all of the other attributes for that instance are also read. However, Data Component Developers are permitted to modify the mapping information for a Data
  • Component to define an attribute retrieval group for each attribute of a class that determines which other attribute values are returned when the requested attribute is read from the database. This makes it possible to avoid executing JOINs or SELECTS to retrieve data that may not be needed.
  • a class, CPerson has four attributes: Id, Name, Zip, and Photo, and the Photo attribute is mapped to a column in a different table from the others.
  • the Data Component Developer may drop Photo from the group of attributes that are retrieved when either Id, Name, or Zip are read.
  • the run time engine retrieves only the values for the person. id, person.name, and person.zip attributes, thus avoiding an unnecessary join to return the photo attribute value as well.
  • Lazy reads are also employed to enhance runtime performance.
  • a query is defined to identify objects for retrieval from the database, the SQL SELECT statement is not issued immediately. Queries are executed only after an attempt has been made to use or modify the resulting data.

Abstract

A mapping between an object model (14) and a relational database (16) is generated to facilitate access to the relational database. The object model can be created from database schema or database schema can be created from the object model. Further, the mapping can be automatically generated. The Database schema, object model and mapping are employed to provide interface objects that are utilized by a runtime engine (24) to facilitate access to the relational database by object oriented software applications.

Description

TITLE OF THE INVENTION OBJECT MODEL MAPPING AND RUNTIME ENGINE FOR EMPLOYING RELATIONAL DATABASE WITH OBJECT ORIENTED SOFTWARE
CROSS REFERENCE TO RELATED APPLICATIONS A claim of priority is made to U.S. Provisional Patent Application Serial No. 60/069,157, entitled TIER 3 DESIGN SPECIFICATION, filed December 9 , 1997 and incorporated herein by reference; and U.S. Provisional Patent Application Serial No. 60/059,939, entitled DATABASE SYSTEM ARCHITECTURE, filed September 26, 1997 and incorporated herein by reference.
STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR
DEVELOPMENT N/A.
BACKGROUND OF THE INVENTION The present invention is generally related to database technology, and more particularly to interfacing object oriented software applications with relational databases.
The need for interfacing object oriented software applications with relational databases is well known. One method of interfacing an object oriented application with a relational database is to adapt the requests made by the application to the relational database. More particularly, object operations are translated into relational database queries. However, this technique is processor-intensive and sacrifices some of the advantages associated with the object oriented model. As a result, the object oriented software application is unable to function efficiently.
Another method of interfacing an object oriented application with a relational database is to translate database information into a format which is compatible with the object oriented application. Relational databases typically separate data into a plurality of tables through a process known as "normalization" to minimize duplication. A normalized relational database includes a plurality of tables, wherein each table includes at least one field and one key, and at least one field in each table is uniquely dependent upon the key that is associated with the table. These tables can be translated into objects. However, the objects can become inaccurate when changes are made to the relational database. It is known to adapt to changes in the relational database by performing further translations, but this process requires substantial effort.
BRIEF SUMMARY OF THE INVENTION
In accordance with the present invention, a mapping between an object model and a relational database and a runtime engine are employed to facilitate access to a relational database. The object model can be created from database schema or database schema can be created from the object model. Further, the mapping can be automatically generated. The database schema, object model, and mapping are employed to provide interface objects that are utilized by an object oriented software application to access the relational database.
The present invention provides transparent access to the relational database. The interface objects and runtime engine perform read and write operations on the database, including generation of SQL code. Consequently, neither programmers nor software applications need have knowledge of the database structure, the database programming interface, database security, or the database transaction model in order to obtain access to the relational database. Further, changes to the relational database do not always necessitate additional mapping.
BRIEF DESCRIPTION OF THE DRAWING Other features and advantages of the present invention will become apparent in light of the following detailed description of the drawing, in conjunction with the drawing, of which:
Fig. 1 is a block diagram that illustrates use of the map to generate interface objects that are employed by a runtime engine and an object oriented software application to access a relational database;
Fig. 2 is a block diagram of database schema; Fig. 3 is a block diagram of an object model;
Fig. 4 is an object diagram of a mapping;
Fig. 5 is an object diagram of the runtime engine;
Fig. 6 is an object diagram of RtCore.DLL; and
Fig. 7 is a sequence diagram that illustrates operation of the runtime engine.
DETAILED DESCRIPTION OF THE INVENTION Referring to Fig. 1, a mapping tool 10 is employed to generate a map 12 in which relationships between an object model 14 and schema associated with a relational database 16 are defined. A code generator 18 is employed to examine the relationships that are defined in the map 12 and a model object oriented interface associated with an object oriented software application 22 to generate interface objects 20. The interface objects 20 are employed by the object oriented software application 22 to access the relational database 16 via a runtime engine 24, which also uses the map 12 to drive its processing.
The object model 14 is a template that has a predetermined standardized structure. The illustrated object model includes attributes and inheritance relationships that are mapped to relational database features such as tables, rows, columns, keys, and foreign keys. Mapping the object model to the relational database schema includes mapping a class attribute to a table column, mapping a class attribute to a 1-1, 1-N, or N-N relationship, and mapping class inheritance to rows within a table or across tables.
Referring now to Figs . 2 , 3 and 4 , the mapping of a class attribute to a table column can be described generally as: Class Attribute -> Table Column + Class Key + Joins.
Mapping the class attribute defines where the attributes are read from and written to. In the illustrated example, the class attribute CPerson.name 26 maps to table column TPerson.name 28. The "Class Key" is employed to relate an object instance to a row in the table. In particular, key values of the class are mapped to columns in a table that comprise the primary key. In the illustrated example, CPerson.id 30 maps to TPerson.id 32. "Joins" defines keys between tables within a class. Since there is only one table in the mapping of Cperson.name to Tperson . name , no information is required for Joins. If Cperson includes two tables, such as Tperson and X, then mapping Cperson. y to X.y includes: Cperson. y Maps to X.y + Cperson. id Keys to Tperson. id + Tperson. id Joins to X.id.
Mapping a class attribute to a 1-1, 1-N, or N-N relationship with at least one other object can be described generally as: Class Attribute -> Class + Class Attribute -> Foreign Key + Joins. When an object has associations to other objects, an attribute in the object points to one or multiple other objects. If the object points to only one object, there is a one-to-one (1-1) association between the objects. If an object points to multiple objects, there is either a one-to-many (1-N) or many-to-many (N-N) relationship between the objects. In the illustrated example, CEmployee . dept 34 maps to Cdepartment 36, where CEmployee 38 to CDepartment 36 is a one to one relationship. "Foreign Key" represents identifying the foreign key. If CEmployee is related to CDepartment, there is a foreign key to another table. The foreign key is identified within one of the tables that comprise Cemployee and is related to the class attribute Cemployee . dept . This relationship may be inferred from foreign key information in the database schema. It is also possible that foreign key information is missing or that there are many foreign keys in CEmployee to CDept . Consequently, this step involves selecting columns that represent the foreign key. In the illustrated example, Cemployee. dept is associated with TEmployee .deptid. Once a class attribute is associated with the foreign key which resides in that class, "Joins" is defined to associated classes. In the illustrated example, TEmployee.deptid joins to TDepartment . id is defined.
Mapping class inheritance to rows within a table or across tables is performed by specifying a WHERE clause on the class which can distinguish the class from the associated parent class. This information is stored in the mapping model .
Table 1 describes how an object model can be mapped to structures in a database schema.
Table 1
Figure imgf000008_0001
Object relationships are mapped to the database schema by defining the joins needed to access related objects or groups of objects (lists) . The joins make use of foreign keys defined in the tables that are mapped to the related classes. Table 2 describes mapping of object relationships relative to the illustrated example.
Table 2
Figure imgf000010_0001
Table 3 describes how structures in a database schema can be mapped to structures in an object model.
Table 3
Figure imgf000011_0001
If the same data is stored in multiple tables, the duplicate columns can be handled by mapping one of the table . columns for read, and all of the columns for insert and update .
Schema relationships are mapped directly to object relationships, either in the form of object attributes or list attributes. In general, a foreign key in the database schema is mapped to an inverse relationship between an object attribute (on the class mapped to the table holding a foreign key) and a list attribute (on the class mapped to the table referenced by a foreign key) . A join table is mapped to an inverse relationship between list attributes defined on each of the classes mapped to the tables related by the join table . Table 4 describes how relational keys are mapped to object relationships relative to the illustrated example.
Table 4
Figure imgf000012_0001
Referring to Figs. 5 and 6, the runtime engine comprises a plurality of dynamic link libraries ("DLLs") including: RtMap.dll 50, RtCore.dll 52, DbObjs.dll 54, OiGenBase.dll 57, and a set of generated DLLs 56. The generated DLLs 56 contain one COM interface and implementation class for each class defined by a mapping model. A mapping model binary file is generated in parallel with each DLL containing the mapping information associated with the DLL. The RtMap.dll 50 implements the classes that can load the information from the binary file at runtime and make it available to the runtime interface objects associated with DLLs 56 and to the client objects 58 of the generated COM objects through a set of predefined COM interfaces.
Classes OOBase and OObject in RtCore.dll 52 form the core of the runtime engine 24. The OOBase is a base abstract class which is used as a base for all the generated implementation classes. The generated classes are ATL COM objects implementing one of the standard IDslObject/lDslList/lDslQlist and one or more of the client interfaces (e.g., Employee) . The ATL implementation classes have state implemented as a set of attributes of the primitive types called the "front state" (or the front data set) . The OOBase contains a pointer to the OObject and a public pure virtual method to access the address of each attribute in the classes descending from itself. The attributes are indexed according to the class definition for the object. The OObject class is abstracting the runtime functionality for a generic object. It contains a set of attribute info-value pairs (one per attribute, constructed when the object is initialized to form a "back state, " or baseline) . OObject also has a set of attribute flags (one per attribute, bitwise or of values like isModified, isRetrieved, isDirty, isNull and others) . One instance of the OObject is created for every instance of the generated objects to take care of the interface to the persistent data storage through a set of DB objects that are MTS stateless, transactional objects.
Fig. 7 illustrates the sequence of actions that take place when a business object creates a Dsl object in step 61, accesses the name property in step 65 and saves the object in step 69. OObject is constructed when the constructor of the DPerson (the generated COM implementation class) is invoked in step 62. The constructor passes as parameters the appropriate constant Classlnfo reference and a reference to itself. The OOBject initializes all flags and sets the attributes to the default values as defined in the Attrlnfo objects associated with the Classlnfo in step 63. The GetAttrPtrO function defined by the OOBase is employed to get the attribute address for each attribute in the class in order to initialize the front set of attributes on the object in step 64.
When the getName (propget) of the generated object is called in step 65, the generated code checks to see if the attribute was retrieved. If the attribute was retrieved then the cached value is returned. Otherwise, RetrieveAttrValue () of the OObject is called in step 66, passing the id of the desired attribute (name in the example) . The OObject will look at the fetch matrix for this attribute and see what other attributes should be retrieved with it in step 67 and then determines what tables and columns are involved, how they are joined and executes the appropriate SQL statements using the stateless MTS object. The GetAttrPtrO function defined by the OOBase is employed to get the attribute address for each attribute in the class in step 68.
When the object is saved in step 69, the generated code calls the OObject SaveChanges () method in step 70. The OObject determines what attributes have changed and, depending on the concurrency control mode in effect, makes sure the appropriate locks and transactions are set and respectively open and then executes the appropriate SQL to write the data to the persistent storage in step 71.
Referring again to Figs. 1-4, the runtime engine also includes a plurality of performance enhancing features such as optimized data retrieval algorithms. An attribute retrieval can be associated with each attribute to optimize attribute retrieval from the database. As a default case, all attributes are retrieved when any one of an object's attributes are needed. However, the attribute retrieval list for any attribute can be edited to specify different attribute retrieval behavior. For example, a request for an Employee Id may cause the Photo attribute to be dropped from the attribute retrieval list on the Id attribute if that data resides in another table and is only infrequently used. Attribute retrieval lists are a performance feature that enable optimized data access by only doing JOINS and additional SELECT statements when the data returned by those actions is needed.
Performance is also enhanced by "just in time" data retrieval. By default, whenever an attribute value is read from the database, all of the other attributes for that instance are also read. However, Data Component Developers are permitted to modify the mapping information for a Data
Component to define an attribute retrieval group for each attribute of a class that determines which other attribute values are returned when the requested attribute is read from the database. This makes it possible to avoid executing JOINs or SELECTS to retrieve data that may not be needed. For example, assume that a class, CPerson, has four attributes: Id, Name, Zip, and Photo, and the Photo attribute is mapped to a column in a different table from the others. The Data Component Developer may drop Photo from the group of attributes that are retrieved when either Id, Name, or Zip are read. A query is issued to get the Name and Id of a instance of CPerson where Id = 10. Based on the attribute retrieval information, the run time engine retrieves only the values for the person. id, person.name, and person.zip attributes, thus avoiding an unnecessary join to return the photo attribute value as well.
If an object does not have an attribute in memory when an attempt is made to use that attribute, the object will issue a SELECT statement to retrieve the attribute from the database. "Just-in-time" attribute population allows the object to be populated with the minimal amount of information necessary for the application while still making any remaining information available when it is needed.
Lazy reads are also employed to enhance runtime performance. When a query is defined to identify objects for retrieval from the database, the SQL SELECT statement is not issued immediately. Queries are executed only after an attempt has been made to use or modify the resulting data.
Having described the embodiments consistent with the present invention, other embodiments and variations consistent with the present invention will be apparent to those skilled in the art. Therefore, the invention should not be viewed as limited to the disclosed embodiments but rather should be viewed as limited only by the spirit and scope of the appended claims.

Claims

CLAIMS What is claimed is:
1. A method for interfacing an object oriented software application with a relational database, comprising the steps of: selecting an object model; generating a map of at least some relationships between schema in the database and the selected object model; employing the map to create at least one interface object that corresponds with an object associated with the object oriented software application; and
Utilizing said at least one interface object with the object oriented application to access data from the relational database.
2. The method of claim 1 further including the step of mapping a class attribute to a table column.
3. The method of claim 1 further including the step of mapping a class attribute to a 1-1 relationship.
4. The method of claim 1 further including the step of mapping a class attribute to a 1-N relationship, where N is an integer that is greater than 1.
5. The method of claim 1 further including the step of mapping a class attribute to an N-N relationship, where N is an integer that is greater than 1.
6. The method of claim 1 further including the step of mapping class inheritance to rows within a table.
7. The method of claim 1 further including the step of mapping class inheritance across a plurality of tables.
8. The method of claim 1 further including the step of creating a plurality of said interface objects.
9. The method of claim 8 further including the step of creating at least one stateful interface object and at least one stateless interface object.
10. A computer program that operates on a computer to provide access to a relational database for an object oriented software application, comprising: a mapping routine that generates a map of at least some relationships between schema in the database and a selected object model; a code generator that employs said map to create at least one interface object that corresponds with an object associated with the object oriented software application; and a runtime engine that utilizes said at least one interface object to access data from the relational database.
11. The program of claim 10 wherein said mapping routine is operative to map a class attribute to a table column.
12. The program of claim 10 wherein said mapping routine is operative to map a class attribute to a 1-1 relationship.
13. The program of claim 10 wherein said mapping routine is operative to map a class attribute to a 1-N relationship, where N is an integer that is greater than 1.
14. The program of claim 10 wherein said mapping routine is operative to map a class attribute to an N-N relationship, where N is an integer that is greater than 1.
15. The program of claim 10 wherein said mapping routine is operative to map class inheritance to rows within a table.
16. The program of claim 10 wherein said mapping routine is operative to map class inheritance across a plurality of tables .
17. The program of claim 10 wherein said code generator is operative to create a plurality of said interface objects.
18. The program of claim 17 wherein said code generator is operative to create at least one stateful interface object and at least one stateless interface object.
PCT/US1998/020008 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software WO1999017232A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2000514227A JP2001518670A (en) 1997-09-26 1998-09-25 Objective model mapping and runtime engine for using a relational database with object-oriented software
IL13526798A IL135267A0 (en) 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software
AU96654/98A AU743821B2 (en) 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software
EP98950668A EP1068577A1 (en) 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software
CA002304517A CA2304517A1 (en) 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US5993997P 1997-09-26 1997-09-26
US60/059,939 1997-09-26
US6915797P 1997-12-09 1997-12-09
US60/069,157 1997-12-09

Publications (1)

Publication Number Publication Date
WO1999017232A1 true WO1999017232A1 (en) 1999-04-08

Family

ID=26739386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1998/020008 WO1999017232A1 (en) 1997-09-26 1998-09-25 Object model mapping and runtime engine for employing relational database with object oriented software

Country Status (7)

Country Link
US (1) US6101502A (en)
EP (1) EP1068577A1 (en)
JP (1) JP2001518670A (en)
AU (1) AU743821B2 (en)
CA (1) CA2304517A1 (en)
IL (1) IL135267A0 (en)
WO (1) WO1999017232A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2368427A (en) * 2000-06-20 2002-05-01 Hewlett Packard Co Mapping hierarchical object data to a relational database schema
US6526412B1 (en) * 1999-04-22 2003-02-25 International Business Machines Corporation Use of adapter key to increase performance when updating a value referenced by a data access object
CN1976320B (en) * 2006-12-22 2010-05-26 中国建设银行股份有限公司 Data access control method and system
US7801782B2 (en) 1998-07-31 2010-09-21 Jpmorgan Chase Bank, Na Object oriented system for managing complex financial instruments
WO2011038770A1 (en) * 2009-10-01 2011-04-07 Starcounter Ab Systems and methods for managing databases
US7937348B2 (en) 2006-11-30 2011-05-03 Iti Scotland Limited User profiles
US8266125B2 (en) 2009-10-01 2012-09-11 Starcounter Ab Systems and methods for managing databases
US10248668B2 (en) * 2016-07-18 2019-04-02 International Business Machines Corporation Mapping database structure to software
US10885157B2 (en) 2017-04-03 2021-01-05 International Business Machines Corporation Determining a database signature
US11163616B2 (en) 2017-03-07 2021-11-02 Polyjuice Ab Systems and methods for enabling interoperation of independent software applications

Families Citing this family (76)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7315860B1 (en) * 1994-09-01 2008-01-01 Computer Associates Think, Inc. Directory service system and method with tolerance for data entry storage and output
US6279008B1 (en) * 1998-06-29 2001-08-21 Sun Microsystems, Inc. Integrated graphical user interface method and apparatus for mapping between objects and databases
US6748594B1 (en) * 1998-03-11 2004-06-08 International Business Machines Corporation Object mechanism and method for retrieving attribute values in a object oriented framework
US6397203B1 (en) * 1998-09-30 2002-05-28 International Business Machines Corporation Defining object classes to match corresponding specialized data types in a relational database
US6304871B1 (en) * 1998-12-18 2001-10-16 International Business Machines Corporation Method and system for characterizing applications for use with databases having structured query language interfaces
US6631406B1 (en) * 1999-06-03 2003-10-07 Fujitsu Network Communications, Inc. Common management information base (MIB)
US6782532B1 (en) * 1999-10-21 2004-08-24 Oracle International Corporation Object type system for a run-time environment using generated high-order language instructions for generic functions
US6754670B1 (en) * 1999-12-17 2004-06-22 International Business Machines Corporation Mapping relational tables to object oriented classes
US6901403B1 (en) 2000-03-02 2005-05-31 Quovadx, Inc. XML presentation of general-purpose data sources
US7013340B1 (en) * 2000-05-18 2006-03-14 Microsoft Corporation Postback input handling by server-side control objects
US6853997B2 (en) * 2000-06-29 2005-02-08 Infoglide Corporation System and method for sharing, mapping, transforming data between relational and hierarchical databases
US7016900B2 (en) 2000-06-30 2006-03-21 Boris Gelfand Data cells and data cell generations
US6738968B1 (en) * 2000-07-10 2004-05-18 Microsoft Corporation Unified data type system and method
JP4662657B2 (en) 2000-07-10 2011-03-30 マイクロソフト コーポレーション Unified data type system and method
US6678887B1 (en) * 2000-07-11 2004-01-13 Networks Associates Technology, Inc. Customizing business logic and data sources by modifying methods defined within an API
US20030105732A1 (en) * 2000-11-17 2003-06-05 Kagalwala Raxit A. Database schema for structure query language (SQL) server
WO2002093430A1 (en) * 2001-05-14 2002-11-21 Infomove, Inc. Method and apparatus for implementing a data management system using a metadata specification
US7493397B1 (en) 2001-06-06 2009-02-17 Microsoft Corporation Providing remote processing services over a distributed communications network
US6915454B1 (en) 2001-06-12 2005-07-05 Microsoft Corporation Web controls validation
US7003776B2 (en) * 2001-08-01 2006-02-21 Oic Acquisition I Corporation System and method for object persistence life-cycle and object caching integration
US6907433B2 (en) * 2001-08-01 2005-06-14 Oracle International Corp. System and method for managing object to relational one-to-many mapping
US7054858B2 (en) 2001-08-01 2006-05-30 Oic Acquisition Corporation System and method for retrieval of objects from object to relational mappings
US7020659B2 (en) 2001-08-15 2006-03-28 Oic Acquistion I Corporation System and method for managing bi-directional relationships between objects
US20030154271A1 (en) * 2001-10-05 2003-08-14 Baldwin Duane Mark Storage area network methods and apparatus with centralized management
US20030069758A1 (en) * 2001-10-10 2003-04-10 Anderson Laura M. System and method for use in providing a healthcare information database
US6799182B2 (en) * 2001-11-13 2004-09-28 Quovadx, Inc. System and method for data source flattening
US7421436B2 (en) * 2001-12-21 2008-09-02 International Business Machines Corporation Decentralized many-to-many relationship management in an object persistence management system
US7062502B1 (en) * 2001-12-28 2006-06-13 Kesler John N Automated generation of dynamic data entry user interface for relational database management systems
US7096231B2 (en) * 2001-12-28 2006-08-22 American Management Systems, Inc. Export engine which builds relational database directly from object model
US7149740B2 (en) * 2002-03-26 2006-12-12 Symmetricom, Inc. Using a common link field key
US7010526B2 (en) 2002-05-08 2006-03-07 International Business Machines Corporation Knowledge-based data mining system
US6993534B2 (en) * 2002-05-08 2006-01-31 International Business Machines Corporation Data store for knowledge-based data mining system
US8214391B2 (en) * 2002-05-08 2012-07-03 International Business Machines Corporation Knowledge-based data mining system
US20040010498A1 (en) * 2002-07-10 2004-01-15 Lin Tser Yeng Object persistence to relational database within run-time environment supporting attributes and reflection
US7287022B2 (en) * 2002-07-19 2007-10-23 Microsoft Corporation System and method for analytically modeling data organized according to related attributes
US7711675B2 (en) * 2002-07-22 2010-05-04 Microsoft Corporation Database simulation of data types
US7275024B2 (en) 2003-03-12 2007-09-25 Microsoft Corporation Automatic generation of a dimensional model for business analytics from an object model for online transaction processing
US7546226B1 (en) 2003-03-12 2009-06-09 Microsoft Corporation Architecture for automating analytical view of business applications
US7634478B2 (en) * 2003-12-02 2009-12-15 Microsoft Corporation Metadata driven intelligent data navigation
US8122044B2 (en) * 2003-03-12 2012-02-21 Microsoft Corporation Generation of business intelligence entities from a dimensional model
US7313561B2 (en) * 2003-03-12 2007-12-25 Microsoft Corporation Model definition schema
US7412455B2 (en) * 2003-04-30 2008-08-12 Dillon David M Software framework that facilitates design and implementation of database applications
FI115676B (en) * 2003-07-28 2005-06-15 Nolics Oy A method for object-oriented processing of relational type information
US7712073B1 (en) * 2003-12-23 2010-05-04 Sprint Communications Company L.P. Software development artifact creation tool
US7890604B2 (en) 2004-05-07 2011-02-15 Microsoft Corproation Client-side callbacks to server events
US9026578B2 (en) 2004-05-14 2015-05-05 Microsoft Corporation Systems and methods for persisting data between web pages
US7464386B2 (en) 2004-05-17 2008-12-09 Microsoft Corporation Data controls architecture
US20060064395A1 (en) * 2004-09-23 2006-03-23 Seguin Christopher A Data element storage method
US8131727B2 (en) * 2004-11-30 2012-03-06 International Business Machines Corporation Preserving relationships of mapped views in an object model
EP1896995A4 (en) * 2005-06-24 2009-05-27 Orbital Technologies Inc System and method for translating between relational database queries and multidimensional database queries
US7631011B2 (en) * 2005-07-29 2009-12-08 Microsoft Corporation Code generation patterns
US20070027905A1 (en) * 2005-07-29 2007-02-01 Microsoft Corporation Intelligent SQL generation for persistent object retrieval
US20070027849A1 (en) * 2005-07-29 2007-02-01 Microsoft Corporation Integrating query-related operators in a programming language
US7685567B2 (en) * 2005-07-29 2010-03-23 Microsoft Corporation Architecture that extends types using extension methods
US7702686B2 (en) * 2005-07-29 2010-04-20 Microsoft Corporation Retrieving and persisting objects from/to relational databases
US20070044083A1 (en) * 2005-07-29 2007-02-22 Microsoft Corporation Lambda expressions
CA2631756A1 (en) * 2005-12-01 2007-06-07 Firestar Software, Inc. System and method for exchanging information among exchange applications
WO2007134008A2 (en) * 2006-05-08 2007-11-22 Firestar Software, Inc. System and method for exchanging transaction information using images
WO2008058927A2 (en) * 2006-11-17 2008-05-22 Llinxx Database system
US8060868B2 (en) * 2007-06-21 2011-11-15 Microsoft Corporation Fully capturing outer variables as data objects
US7747899B2 (en) * 2007-06-26 2010-06-29 Microsoft Corporation Providing mapping fault processing
US8566780B2 (en) * 2007-06-26 2013-10-22 Microsoft Corporation Object model based mapping
US7761475B2 (en) * 2007-07-13 2010-07-20 Objectivity, Inc. Method, system and computer-readable media for managing dynamic object associations as a variable-length array of object references of heterogeneous types binding
JP2009223644A (en) * 2008-03-17 2009-10-01 Nec Corp Mapping unit, mapping method and program
US20090271765A1 (en) * 2008-04-29 2009-10-29 Microsoft Corporation Consumer and producer specific semantics of shared object protocols
US8260825B2 (en) * 2009-05-11 2012-09-04 Business Objects Software Limited Functionally-dependent analysis objects
US9990416B2 (en) * 2009-12-02 2018-06-05 Business Objects Software Limited Analysis groups for semantic layer
JP5163662B2 (en) * 2010-01-25 2013-03-13 Necシステムテクノロジー株式会社 File generation system and file generation method
US8739118B2 (en) 2010-04-08 2014-05-27 Microsoft Corporation Pragmatic mapping specification, compilation and validation
US9811353B1 (en) 2010-07-29 2017-11-07 Crimson Corporation Remotely invoking dynamic classes on a computing device
US9665601B1 (en) 2010-12-16 2017-05-30 Crimson Corporation Using a member attribute to perform a database operation on a computing device
US9274773B2 (en) 2011-06-23 2016-03-01 Microsoft Technology Licensing, Llc Translating programming language patterns into database schema patterns
US9639562B2 (en) * 2013-03-15 2017-05-02 Oracle International Corporation Automatically determining an optimal database subsection
WO2015027425A1 (en) * 2013-08-29 2015-03-05 华为技术有限公司 Method and device for storing data
US10437564B1 (en) 2016-09-16 2019-10-08 Software Tree, LLC Object mapping and conversion system
US10977008B1 (en) * 2020-08-11 2021-04-13 First Capitol Consulting, Inc. Single data class for in-memory creation and programmatic access of arbitrary data in a strongly-typed computer programming language

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291583A (en) * 1990-12-14 1994-03-01 Racal-Datacom, Inc. Automatic storage of persistent ASN.1 objects in a relational schema
US5809505A (en) * 1996-06-14 1998-09-15 Lo; Thomas System and method for relational to object mapping
US5812996A (en) * 1994-07-12 1998-09-22 Sybase, Inc. Database system with methods for optimizing query performance with a buffer manager

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07295815A (en) * 1994-04-26 1995-11-10 Internatl Business Mach Corp <Ibm> Mapping system and method of permanence object
US5627979A (en) * 1994-07-18 1997-05-06 International Business Machines Corporation System and method for providing a graphical user interface for mapping and accessing objects in data stores
US5752027A (en) * 1994-11-30 1998-05-12 Dun & Bradstreet Software Services, Inc. Apparatus and process for creating and accessing a database centric object
US5873093A (en) * 1994-12-07 1999-02-16 Next Software, Inc. Method and apparatus for mapping objects to a data source
US5878411A (en) * 1997-06-27 1999-03-02 International Business Machines Corporation Dependent object class and subclass mapping to relational data store
US5937409A (en) * 1997-07-25 1999-08-10 Oracle Corporation Integrating relational databases in an object oriented environment
US5956725A (en) * 1997-11-26 1999-09-21 Interanational Business Machines Corporation Schema mapping to a legacy table with primary and foreign key support

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291583A (en) * 1990-12-14 1994-03-01 Racal-Datacom, Inc. Automatic storage of persistent ASN.1 objects in a relational schema
US5812996A (en) * 1994-07-12 1998-09-22 Sybase, Inc. Database system with methods for optimizing query performance with a buffer manager
US5809505A (en) * 1996-06-14 1998-09-15 Lo; Thomas System and method for relational to object mapping

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8099347B2 (en) 1998-07-31 2012-01-17 JPMorgan Chase Bank, N.A, Object oriented system for managing complex financial instruments
US8732049B2 (en) 1998-07-31 2014-05-20 Jpmorgan Chase Bank, Na Object oriented system for managing complex financial instruments
US7801782B2 (en) 1998-07-31 2010-09-21 Jpmorgan Chase Bank, Na Object oriented system for managing complex financial instruments
US9824341B2 (en) 1998-07-31 2017-11-21 Jpmorgan Chase Bank, N.A. Object oriented system for managing complex financial instruments
US6526412B1 (en) * 1999-04-22 2003-02-25 International Business Machines Corporation Use of adapter key to increase performance when updating a value referenced by a data access object
GB2368427A (en) * 2000-06-20 2002-05-01 Hewlett Packard Co Mapping hierarchical object data to a relational database schema
US7937348B2 (en) 2006-11-30 2011-05-03 Iti Scotland Limited User profiles
CN1976320B (en) * 2006-12-22 2010-05-26 中国建设银行股份有限公司 Data access control method and system
US8266125B2 (en) 2009-10-01 2012-09-11 Starcounter Ab Systems and methods for managing databases
WO2011038770A1 (en) * 2009-10-01 2011-04-07 Starcounter Ab Systems and methods for managing databases
US8856092B2 (en) 2009-10-01 2014-10-07 Starcounter Ab Systems and methods for managing databases
US10248668B2 (en) * 2016-07-18 2019-04-02 International Business Machines Corporation Mapping database structure to software
US11163616B2 (en) 2017-03-07 2021-11-02 Polyjuice Ab Systems and methods for enabling interoperation of independent software applications
US10885157B2 (en) 2017-04-03 2021-01-05 International Business Machines Corporation Determining a database signature

Also Published As

Publication number Publication date
JP2001518670A (en) 2001-10-16
IL135267A0 (en) 2001-05-20
CA2304517A1 (en) 1999-04-08
US6101502A (en) 2000-08-08
AU743821B2 (en) 2002-02-07
EP1068577A1 (en) 2001-01-17
AU9665498A (en) 1999-04-23

Similar Documents

Publication Publication Date Title
US6101502A (en) Object model mapping and runtime engine for employing relational database with object oriented software
US5937409A (en) Integrating relational databases in an object oriented environment
US8291376B2 (en) Method and system to automatically regenerate software code
US6243709B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
EP1042721B1 (en) Integrating both modifications to an object model and modifications to a database into source code by an object-relational mapping tool
US6341289B1 (en) Object identity and partitioning for user defined extents
US6374256B1 (en) Method and apparatus for creating indexes in a relational database corresponding to classes in an object-oriented application
US6356913B1 (en) Generic (database-independent) and dynamically-modifiable schema
US8145685B2 (en) Object relational mapping layer
JP4809652B2 (en) . NET data types and instance persistent storage
US20040015516A1 (en) Object graph faulting and trimming in an object-relational database system
US20080201345A1 (en) Apparatus and Article of Manufacture For Determining a Target Data Type In a Heterogeneous Multi-Level Environment
EP1040432B1 (en) Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies
US7225201B1 (en) Extensible data type
US20040230606A1 (en) Mechanism for enabling persistence of abstract and versioned dependent value objects
Kakivaya et al. Durable storage of .NET data types and instances

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 135267

Country of ref document: IL

AK Designated states

Kind code of ref document: A1

Designated state(s): AU CA IL JP RU

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
ENP Entry into the national phase

Ref document number: 2304517

Country of ref document: CA

Ref country code: CA

Ref document number: 2304517

Kind code of ref document: A

Format of ref document f/p: F

ENP Entry into the national phase

Ref country code: JP

Ref document number: 2000 514227

Kind code of ref document: A

Format of ref document f/p: F

WWE Wipo information: entry into national phase

Ref document number: 1998950668

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 96654/98

Country of ref document: AU

WWP Wipo information: published in national office

Ref document number: 1998950668

Country of ref document: EP

WWW Wipo information: withdrawn in national office

Ref document number: 1998950668

Country of ref document: EP

WWG Wipo information: grant in national office

Ref document number: 96654/98

Country of ref document: AU