US20010056426A1 - Transparent object instantiation/initialization from a relational store - Google Patents
Transparent object instantiation/initialization from a relational store Download PDFInfo
- Publication number
- US20010056426A1 US20010056426A1 US09/181,411 US18141198A US2001056426A1 US 20010056426 A1 US20010056426 A1 US 20010056426A1 US 18141198 A US18141198 A US 18141198A US 2001056426 A1 US2001056426 A1 US 2001056426A1
- Authority
- US
- United States
- Prior art keywords
- property
- class
- instance
- column
- assist
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/289—Object oriented databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- Y—GENERAL 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
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/953—Organization of data
- Y10S707/954—Relational
-
- Y—GENERAL 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
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99931—Database or file accessing
-
- Y—GENERAL 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
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99931—Database or file accessing
- Y10S707/99932—Access augmentation or optimizing
-
- Y—GENERAL 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
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99931—Database or file accessing
- Y10S707/99933—Query processing, i.e. searching
-
- Y—GENERAL 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
- Y10—TECHNICAL SUBJECTS COVERED BY FORMER USPC
- Y10S—TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y10S707/00—Data processing: database and file management or data structures
- Y10S707/99941—Database schema or data structure
- Y10S707/99944—Object-oriented database structure
Definitions
- the invention relates in general to object persistence on computer systems, and more particularly, to a transparent object instantiation/initialization from a relational database.
- RDBMS Relational Data Base Management System
- OOPS Object-Oriented Programming Systems
- the present invention discloses a method, apparatus, and article of manufacture for instantiation and initialization of an object from a relational database.
- the relational database is created with object assist columns within the database, and instances of the object are created using the object assist columns.
- the instance is then stored in the database itself.
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment that could be used with the present invention
- FIG. 2 illustrates entries in an relational database managed by an RDBMS
- FIGS. 3A and 3B illustrate an implementation of a relational database of the present invention.
- FIG. 4 is a flowchart that illustrates exemplary logic performed by the initiator/instantiator according to the present invention.
- the present invention discloses a method, apparatus, and article of manufacture for instantiation and initialization of objects using a relational database.
- the object-relational bridge uses Application Programming Interfaces (API's) which are part of the MicrosoftTM Common Object Model (COM) specification. Additional columns are used within the relational database to allow the invention to instantiate objects directly from the relational database.
- API's Application Programming Interfaces
- COM Common Object Model
- the present invention uses a centralized repository for instantiation and initialization of in-memory objects from a RDBMS.
- the present invention also saves (“persists”) existing objects to the underlying RDBMS.
- Objects which are ultimately persisted in Relational Tables are hereinafter referred to as “Persistent Objects”.
- All persistent objects must support dual interfaces IDispatch to provide late binding facilities to the repository for object initialization, and Custom to provide fast in process access to COM clients.
- All persistent objects must support the IMetaPersist custom interface.
- This interface provides identifying characteristics for every object contained in the RDBMS. This interface provides access to at least two properties: ClassID, which uniquely identifies the Class Factory for an object, and ObjectID, which uniquely identifies an object within its relational table.
- Persistent objects are instantiations of a class.
- the classes that define persistent objects are described within an RDBMS schema.
- each class definition is represented by a table, with each property in the class represented by a column in the table.
- Instances of the class (persisted objects) are then stored as relational tuples (rows in the table).
- Primary keys (ObjectIDs) support retrieval of unique instances; foreign keys and reference tables enable class relationships and collections.
- Each property column in an object table is associated with two “object assist” columns. These columns furnish type information for the property and a late binding index for initialization of the property within an instantiated object. When objects are referenced from within an application, they must be instantiated from the repository.
- FIG. 1 is a block diagram showing a hardware environment implementing one embodiment of the present invention.
- a computer device 102 and one or more DBMS nodes 104 typically implement the database management system 100 of the present invention.
- the computer 102 implements a user interface 106 , a session manager 108 , a parser 110 , a resolver 112 , a Global Data Dictionary (GDD) manager 114 , query plan generator 116 , optimizer 118 , evaluator 120 , and a dispatcher 122 .
- the dispatcher 122 contains instantiator/initiator 124 of the present invention.
- DBMS nodes 104 may include one or more relational databases 126 that have one or more Global Data Dictionaries 128 , and one or more object servers 130 A, 130 B, and 130 C.
- the user interface 106 translates computer messages into user-viewable results, and accepts client commands and translates those commands into computer interpretable instructions.
- the session manager 108 creates a session that is used to communicate with the client, and assigns a session identifier. This session manager 108 handles incoming requests and sends back responses to the client.
- the parser 110 checks the syntax of the client commands and uses a grammar definition to generate a high-level collection of object structures that will be later optimized and converted into a query execution plan. This is accomplished by defining language protocol classes (objects) that represent the parse tree. In one embodiment, these objects are defined according to the C++ protocol.
- the parser 110 creates a link-list of attribute objects, table name objects, and predicate expressions for use by the resolver 112 .
- the resolver 112 receives the object structures from the parser, iterates over the object parse tree, and binds attributes and UDF invocations to object-relational tables and libraries.
- the resolver 112 also appends statistical, static cost, and historical usage information to the parse tree objects. This information is later used to optimize the query plan.
- the resolver 112 also obtains statistical, static cost, and historical usage information from the Global Data Dictionary (GDD) 128 , which is stored in the form of GDD tables in the RDBMS 126 , and managed by the GDD manager 114 .
- the GDD manager 114 also maintains a user-configurable and definable GDD cache that is updated when changes are made to the GDD 128 . This is accomplished by spooling entries during data definition language (DDL) M-SQL operations or checking a time-stamp or version number associated with the GDD 128 tables. If a change has occurred, the GDD manager 114 updates the GDD 128 cache.
- DDL data definition language
- the GDD 128 cache structure is subdivided into boundary areas that are allocated to a GDD 128 table whose values are replaced using a least recently used (LRU) algorithm. This method decreases system response times and improves overall performance.
- the GDD manager 114 also checks the integrity of the entries in the GDD 128 .
- the plan generator 116 translates the optimized parse tree into a query execution plan.
- the optimizer module 118 optimizes and balances query plans. This is performed by writing functions that transform parse-tree objects into commands that can be understood by the component modules that will receive these commands.
- the evaluator evaluates the query plan for accessing the RDBMS 126 , and the dispatcher 122 distributes the commands to the RDBMS 126 and the object servers 130 .
- these steps are in the structured query language, SQL.
- For the object servers 130 these steps are sent to an interface manager (IM) for evaluation.
- IM interface manager
- the dispatcher 122 also coordinates execution of the commands, and coordinates sending first-pass results from the commands to the requesting client.
- the object initiator/instantiator 124 comprises data and/or instructions which, when read and executed by the computer system 100 , causes the computer system 100 to perform the steps for performing and/or using the present invention.
- the data and/or instructions are embodied in and/or readable from a device, carrier, and/or media.
- the data and/or instructions can be embodied in and/or readable from a memory, data storage device, Application Specific Integrated Circuit (ASIC), remote devices coupled to the computer via a data communications device for downloading a file from a network to the computer as is done in client-server architectures and on the Internet, floppy diskettes, CD-ROM disks, or other magnetic, optical, electronic, or other storage media or devices that can be connected to and interpreted by the computer.
- ASIC Application Specific Integrated Circuit
- FIG. 1 The exemplary environment illustrated in FIG. 1 is not intended to limit the present invention. Indeed, other alternative hardware environments may be used without departing from the scope of the present invention.
- the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, hardware, firmware, or any combination thereof.
- article of manufacture as used herein is intended to encompass logic embodied in or accessible from any device, carrier, or media.
- FIG. 2 illustrates entries in an relational database managed by an RDBMS 126 .
- entries correspond to several attributes and are related to each other via relational tuples.
- Each row in the database is a relational tuple that describes the object.
- FIG. 2 a database managed by an RDBMS 126 is shown in FIG. 2 that describes typical entries in a sales database.
- Class CDomain 200 contains tuple 202 that describes the “sales” force for a given company.
- tuple 202 there are several attributes, name attribute 204 , maximum connections (MaxConn) attribute 206 , and dimension collection attribute 208 .
- Dimension collection 208 is a pointer 210 to another portion of the RDBMS 126 that contains additional attributes associated with tuple 202 .
- Pointer 210 points from dimension collection 208 to table 212 .
- Table 212 contains tuple 214 , which has attributes name 216 and ID 218 .
- Name 216 attribute is used to couple table 212 to other classes in the RDBMS 126 .
- Name 216 of table 212 is referenced to class Dimension 220 for additional description and qualities associated with name 2016 .
- description 222 and Attribute Collection 224 are part of the tuple 202 associated with name 216 .
- Attribute Collection 224 relates class CDimension 220 to table 226 .
- Table 226 provides additional information about name field 216 .
- Table 226 is further defined in another class 228 . This description method is shown for illustration purposes only, and is not meant to limit the present invention. Further, the number of tables and classes are not limiting to the present invention; larger or smaller numbers of tables, classes, or combinations of tables and classes are integrable with the present invention without exceeding the scope of the present invention.
- class 200 , class 220 , and class 228 may be retrieved from the database, but without knowing the structure of the object, e.g., name field 204 , it would be difficult if not impossible for the RDBMS 126 to actually populate an object with the relational tuple 202 containing that object's property values.
- FIGS. 3A and 3B illustrate an implementation of a relational database of the present invention.
- class 200 contains relational tuple 202 , name field 204 , maximum connection field 206 , and dimension collection 208
- class 200 (and therefore relational tuple 202 ) also contains entries to assist the RDBMS 126 in instantiating and initialing objects. These entries, namely entries 230 , 232 , 234 , and 236 , are called object assist entries (or object assist columns in the database). An object assist column exists for each object property.
- the creation of object assist entries 230 - 236 shifts the object description from a language dependent header file to an entry in the relational database where the objects are stored.
- FIG. 3B illustrates a reference table 240 that maps class ID numbers 218 to table 242 .
- Table 240 is used to instantiate an object from the RDBMS 126 by identifying the objects class factory, and thus constructor.
- a client When a client wishes to instantiate a persistent object of a given class, it may choose to create an empty object itself, or ask the RDBMS 126 to create the object on the client's behalf If the client wants to create the object itself, it can create an object without regard to the RDBMS 126 .
- the client requests object creation by the RDBMS 126 using the present invention, the client sends a ClassID 218 as an argument to the creation call.
- the ClassID is a 128 bit GUID as indicated in the MicrosoftTM Common Object Module (COM) specification and is passed through to the COM API CoCreateInstance().
- CoCreateInstance locates the class factory (and thus constructor) for the object associated with the ClassID 218 in table 240 , loads the class factory into memory, and invokes the constructor corresponding to the ClassID 218 , which creates the object in question.
- COM Common Object Module
- the RDBMS 126 After successful object creation (whether an “empty” object was passed, or object creation was requested via a ClassID) the RDBMS 126 has an empty instance of the required class within the client's address space.
- the next step is to initialize the object from persistent data.
- the IDispatch interface that is implemented in every persistent object enables this initialization process.
- IDispatch furnishes an invoke() method, which uses a dispatch map (indexed table of function pointers) to late bind to property initialization methods within the persistent object.
- the repository will obtain the relational tuple 202 corresponding to the ObjectID and map each column value into the object, by using the “object assist columns” shown in FIG. 3A. These columns provide the invoke() dispatch index, and type information for the property being initialized from the database column.
- dispid SQL (Select NmDispID from CDomain . . . )
- the call on the object through pDispatch requires that all persistent (saved) objects implement the IDispatch interface.
- the persistent object supplies a pointer to the IDispatch interface that is used by the RDBMS 126 to gain access to the Invoke method. This agreement ensures that the RDBMS 126 can initialize any persistent object without compile-time knowledge of the object's structure.
- the table 240 is used to recreate the object from the class ID.
- the pointers (object assist columns 230 - 236 ) associated with the class ID through tuple 202 recreate the object and the properties of the object upon recalling the object.
- FIG. 4 is a flowchart that illustrates exemplary logic performed by the initiator/instantiator 124 according to the present invention.
- Block 244 represents the computer 100 performing the step of representing a class definition as a table in the relational database, wherein an instance of the class is represented by a tuple of the table, a property of the instance is represented by a column of the table, and one or more object assist columns is associated with the property.
- Block 246 represents the computer 100 performing the step of identifying one or more methods of the class definition associated with the property based on the object assist column.
- the present invention discloses a method, apparatus, article of manufacture, and data structure for persistently storing objects in a relational database.
- a class definition is represented as a table in the relational database, where an instance of the class is represented by a tuple of the table, a property of the instance is represented by a column of the table, and one or more object assist columns are associated with the property.
- One or more methods of the class definition associated with the property based on the object assist column are identified.
Abstract
Description
- 1. Field of the Invention
- The invention relates in general to object persistence on computer systems, and more particularly, to a transparent object instantiation/initialization from a relational database.
- 2. Description of Related Art
- In modern computer systems, relational databases are used to store large amounts of data. A Relational Data Base Management System (RDBMS) is utilized to control access to, storage in, and manipulation of data that is stored in the relational database. More recently, Object-Oriented Programming Systems (OOPS) have also been used more extensively to create a new programming environment for computer systems.
- The merger of RDBMS and OOPS has proceeded slowly because of the large differences in approach to data storage and manipulation. Further, the large number of installations of RDBMS has slowed the progress of OOPS because of this incompatibility.
- One of the major incompatibilities is that an OOPS has difficulties creating (instantiating) a new object from an underlying RDBMS, because the object types, which are described in a header file (typically written in C++), is language dependent and therefore cannot be used universally with an RDBMS. Since creation of instances is difficult, the data structure of the underlying program cannot be manipulated easily, creating slower systems and more possibilities for error.
- It can be seen, then, that there is a need in the art for a method to bridge the differences between RDBMS and OOPS. Further, there is a need for a merged RDBMS/OOPS system to be able to create an instance of an object without specific knowledge of the object types. There is also a need for a merged RDBMS/OOPS system to be able to store an instance of an object.
- 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 instantiation and initialization of an object from a relational database. The relational database is created with object assist columns within the database, and instances of the object are created using the object assist columns. The instance is then stored in the database itself.
- These and various other advantages and features of novelty which characterize the invention are pointed out with particularity in the claims annexed hereto and form a part hereof. However, for a better understanding of the invention, its advantages, and the objects obtained by its use, reference should be made to the drawings which form a further part hereof, and to the accompanying detailed description, in which there is illustrated and described specific examples of a method, apparatus, and article of manufacture in accordance with the invention.
- Referring now to the drawings in which like reference numbers represent corresponding parts throughout:
- FIG. 1 is a block diagram that illustrates an exemplary hardware environment that could be used with the present invention;
- FIG. 2 illustrates entries in an relational database managed by an RDBMS;
- FIGS. 3A and 3B illustrate an implementation of a relational database of the present invention; and
- FIG. 4 is a flowchart that illustrates exemplary logic performed by the initiator/instantiator according to the present invention.
- In the following description of the preferred embodiment, reference is made to the accompanying drawings which form a part hereof, and in which is shown by way of illustration a specific embodiment in which the invention may be practiced. It is to be understood that other embodiments may be utilized and structural changes may be made without departing from the scope of the present invention.
- Overview
- The present invention discloses a method, apparatus, and article of manufacture for instantiation and initialization of objects using a relational database. The object-relational bridge uses Application Programming Interfaces (API's) which are part of the Microsoft™ Common Object Model (COM) specification. Additional columns are used within the relational database to allow the invention to instantiate objects directly from the relational database.
- The present invention uses a centralized repository for instantiation and initialization of in-memory objects from a RDBMS. The present invention also saves (“persists”) existing objects to the underlying RDBMS. Objects which are ultimately persisted in Relational Tables are hereinafter referred to as “Persistent Objects”.
- All persistent objects must support dual interfaces IDispatch to provide late binding facilities to the repository for object initialization, and Custom to provide fast in process access to COM clients.
- All persistent objects must support the IMetaPersist custom interface. This interface provides identifying characteristics for every object contained in the RDBMS. This interface provides access to at least two properties: ClassID, which uniquely identifies the Class Factory for an object, and ObjectID, which uniquely identifies an object within its relational table.
- Persistent objects are instantiations of a class. The classes that define persistent objects are described within an RDBMS schema. In general, each class definition is represented by a table, with each property in the class represented by a column in the table. Instances of the class (persisted objects) are then stored as relational tuples (rows in the table). Primary keys (ObjectIDs) support retrieval of unique instances; foreign keys and reference tables enable class relationships and collections.
- Each property column in an object table is associated with two “object assist” columns. These columns furnish type information for the property and a late binding index for initialization of the property within an instantiated object. When objects are referenced from within an application, they must be instantiated from the repository.
- Hardware Environment
- FIG. 1 is a block diagram showing a hardware environment implementing one embodiment of the present invention. A
computer device 102 and one ormore DBMS nodes 104 typically implement thedatabase management system 100 of the present invention. Thecomputer 102 implements auser interface 106, asession manager 108, aparser 110, aresolver 112, a Global Data Dictionary (GDD)manager 114, query plan generator 116,optimizer 118,evaluator 120, and adispatcher 122. Thedispatcher 122 contains instantiator/initiator 124 of the present invention.DBMS nodes 104 may include one or morerelational databases 126 that have one or moreGlobal Data Dictionaries 128, and one ormore object servers - The
user interface 106 translates computer messages into user-viewable results, and accepts client commands and translates those commands into computer interpretable instructions. - The
session manager 108 creates a session that is used to communicate with the client, and assigns a session identifier. Thissession manager 108 handles incoming requests and sends back responses to the client. - The
parser 110 checks the syntax of the client commands and uses a grammar definition to generate a high-level collection of object structures that will be later optimized and converted into a query execution plan. This is accomplished by defining language protocol classes (objects) that represent the parse tree. In one embodiment, these objects are defined according to the C++ protocol. - The
parser 110 creates a link-list of attribute objects, table name objects, and predicate expressions for use by theresolver 112. - The
resolver 112 receives the object structures from the parser, iterates over the object parse tree, and binds attributes and UDF invocations to object-relational tables and libraries. Theresolver 112 also appends statistical, static cost, and historical usage information to the parse tree objects. This information is later used to optimize the query plan. - The
resolver 112 also obtains statistical, static cost, and historical usage information from the Global Data Dictionary (GDD) 128, which is stored in the form of GDD tables in theRDBMS 126, and managed by theGDD manager 114. TheGDD manager 114 also maintains a user-configurable and definable GDD cache that is updated when changes are made to theGDD 128. This is accomplished by spooling entries during data definition language (DDL) M-SQL operations or checking a time-stamp or version number associated with theGDD 128 tables. If a change has occurred, theGDD manager 114 updates theGDD 128 cache. TheGDD 128 cache structure is subdivided into boundary areas that are allocated to aGDD 128 table whose values are replaced using a least recently used (LRU) algorithm. This method decreases system response times and improves overall performance. TheGDD manager 114 also checks the integrity of the entries in theGDD 128. - The plan generator116 translates the optimized parse tree into a query execution plan. The
optimizer module 118 optimizes and balances query plans. This is performed by writing functions that transform parse-tree objects into commands that can be understood by the component modules that will receive these commands. - The evaluator evaluates the query plan for accessing the
RDBMS 126, and thedispatcher 122 distributes the commands to theRDBMS 126 and the object servers 130. For theRDBMS 126, these steps are in the structured query language, SQL. For the object servers 130, these steps are sent to an interface manager (IM) for evaluation. Thedispatcher 122 also coordinates execution of the commands, and coordinates sending first-pass results from the commands to the requesting client. - In general, the object initiator/instantiator124 comprises data and/or instructions which, when read and executed by the
computer system 100, causes thecomputer system 100 to perform the steps for performing and/or using the present invention. Generally, the data and/or instructions are embodied in and/or readable from a device, carrier, and/or media. For example, the data and/or instructions can be embodied in and/or readable from a memory, data storage device, Application Specific Integrated Circuit (ASIC), remote devices coupled to the computer via a data communications device for downloading a file from a network to the computer as is done in client-server architectures and on the Internet, floppy diskettes, CD-ROM disks, or other magnetic, optical, electronic, or other storage media or devices that can be connected to and interpreted by the computer. - The exemplary environment illustrated in FIG. 1 is not intended to limit the present invention. Indeed, other alternative hardware environments may be used without departing from the scope of the present invention.
- Thus, the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, hardware, firmware, or any combination thereof. In addition, the term “article of manufacture” as used herein is intended to encompass logic embodied in or accessible from any device, carrier, or media.
- Relationships and Operation
- FIG. 2 illustrates entries in an relational database managed by an
RDBMS 126. Within a relational database, entries correspond to several attributes and are related to each other via relational tuples. Each row in the database is a relational tuple that describes the object. - As an example, a database managed by an
RDBMS 126 is shown in FIG. 2 that describes typical entries in a sales database.Class CDomain 200 containstuple 202 that describes the “sales” force for a given company. Withintuple 202, there are several attributes,name attribute 204, maximum connections (MaxConn)attribute 206, anddimension collection attribute 208.Dimension collection 208 is apointer 210 to another portion of theRDBMS 126 that contains additional attributes associated withtuple 202. -
Pointer 210 points fromdimension collection 208 to table 212. Table 212 containstuple 214, which hasattributes name 216 andID 218. Name 216 attribute is used to couple table 212 to other classes in theRDBMS 126. Name 216 of table 212 is referenced toclass Dimension 220 for additional description and qualities associated with name 2016. For example,description 222 and AttributeCollection 224 are part of thetuple 202 associated withname 216.Attribute Collection 224 relatesclass CDimension 220 to table 226. - Table226 provides additional information about
name field 216. Table 226 is further defined in anotherclass 228. This description method is shown for illustration purposes only, and is not meant to limit the present invention. Further, the number of tables and classes are not limiting to the present invention; larger or smaller numbers of tables, classes, or combinations of tables and classes are integrable with the present invention without exceeding the scope of the present invention. - The properties for
class 200,class 220, andclass 228 may be retrieved from the database, but without knowing the structure of the object, e.g.,name field 204, it would be difficult if not impossible for theRDBMS 126 to actually populate an object with therelational tuple 202 containing that object's property values. - FIGS. 3A and 3B illustrate an implementation of a relational database of the present invention. Although
class 200 containsrelational tuple 202,name field 204,maximum connection field 206, anddimension collection 208, class 200 (and therefore relational tuple 202) also contains entries to assist theRDBMS 126 in instantiating and initialing objects. These entries, namelyentries RDBMS 126 can now store not only the properties of the object, but the description of the class and/or instance of the object as well. To further assist theRDBMS 126 in instantiating and/or initializing the object, FIG. 3B illustrates a reference table 240 that mapsclass ID numbers 218 to table 242. Table 240 is used to instantiate an object from theRDBMS 126 by identifying the objects class factory, and thus constructor. - Object Creation—CoCreateInstance
- When a client wishes to instantiate a persistent object of a given class, it may choose to create an empty object itself, or ask the
RDBMS 126 to create the object on the client's behalf If the client wants to create the object itself, it can create an object without regard to theRDBMS 126. - However, if the client requests object creation by the
RDBMS 126 using the present invention, the client sends aClassID 218 as an argument to the creation call. The ClassID is a 128 bit GUID as indicated in the Microsoft™ Common Object Module (COM) specification and is passed through to the COM API CoCreateInstance(). CoCreateInstance locates the class factory (and thus constructor) for the object associated with theClassID 218 in table 240, loads the class factory into memory, and invokes the constructor corresponding to theClassID 218, which creates the object in question. - Object Initialization—IDispatch
- After successful object creation (whether an “empty” object was passed, or object creation was requested via a ClassID) the
RDBMS 126 has an empty instance of the required class within the client's address space. The next step is to initialize the object from persistent data. The IDispatch interface that is implemented in every persistent object enables this initialization process. IDispatch furnishes an invoke() method, which uses a dispatch map (indexed table of function pointers) to late bind to property initialization methods within the persistent object. The repository will obtain therelational tuple 202 corresponding to the ObjectID and map each column value into the object, by using the “object assist columns” shown in FIG. 3A. These columns provide the invoke() dispatch index, and type information for the property being initialized from the database column. - As an example, object assist
column 230 is passed to the invoke function, which used the entry (NmDispID=1) to locate the persistent object method that knows how to retrieve or set the object property. For example, to set thename 204 property of an entry (object) in class CDomain 200: - dispid=SQL (Select NmDispID from CDomain . . . )
- //get the DispID for the Name property pDispatch->
- Invoke(dispid, . . . , DISPATCH_PROPERTYPUT, <“putvalue”>. . . )
- The call on the object through pDispatch requires that all persistent (saved) objects implement the IDispatch interface. In essence, the persistent object supplies a pointer to the IDispatch interface that is used by the
RDBMS 126 to gain access to the Invoke method. This agreement ensures that theRDBMS 126 can initialize any persistent object without compile-time knowledge of the object's structure. - To retrieve an object from the
RDBMS 126, the table 240 is used to recreate the object from the class ID. The pointers (object assist columns 230-236) associated with the class ID throughtuple 202 recreate the object and the properties of the object upon recalling the object. - Logic of the Initiator
- FIG. 4 is a flowchart that illustrates exemplary logic performed by the initiator/instantiator124 according to the present invention.
-
Block 244 represents thecomputer 100 performing the step of representing a class definition as a table in the relational database, wherein an instance of the class is represented by a tuple of the table, a property of the instance is represented by a column of the table, and one or more object assist columns is associated with the property. -
Block 246 represents thecomputer 100 performing the step of identifying one or more methods of the class definition associated with the property based on the object assist column. - Conclusion
- This concludes the description of the preferred embodiment of the invention. The following describes some alternative embodiments for accomplishing the present invention. For example, any type of computer, such as a mainframe, minicomputer, or personal computer, could be used with the present invention. In addition, any software program utilizing (either partially or entirely) an RDBMS and/or object-oriented programming could benefit from the present invention.
- In summary, the present invention discloses a method, apparatus, article of manufacture, and data structure for persistently storing objects in a relational database. A class definition is represented as a table in the relational database, where an instance of the class is represented by a tuple of the table, a property of the instance is represented by a column of the table, and one or more object assist columns are associated with the property. One or more methods of the class definition associated with the property based on the object assist column are identified.
- The foregoing description of the preferred embodiment of the invention has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. It is intended that the scope of the invention be limited not by this detailed description, but rather by the claims appended hereto.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/181,411 US6405209B2 (en) | 1998-10-28 | 1998-10-28 | Transparent object instantiation/initialization from a relational store |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US09/181,411 US6405209B2 (en) | 1998-10-28 | 1998-10-28 | Transparent object instantiation/initialization from a relational store |
Publications (2)
Publication Number | Publication Date |
---|---|
US20010056426A1 true US20010056426A1 (en) | 2001-12-27 |
US6405209B2 US6405209B2 (en) | 2002-06-11 |
Family
ID=22664176
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US09/181,411 Expired - Lifetime US6405209B2 (en) | 1998-10-28 | 1998-10-28 | Transparent object instantiation/initialization from a relational store |
Country Status (1)
Country | Link |
---|---|
US (1) | US6405209B2 (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020194152A1 (en) * | 2000-07-02 | 2002-12-19 | Treil Nicolas Herve Edouard | Method for processing structured data using an object-oriented computer language |
US20030105732A1 (en) * | 2000-11-17 | 2003-06-05 | Kagalwala Raxit A. | Database schema for structure query language (SQL) server |
US20040010498A1 (en) * | 2002-07-10 | 2004-01-15 | Lin Tser Yeng | Object persistence to relational database within run-time environment supporting attributes and reflection |
US20040015501A1 (en) * | 2002-07-22 | 2004-01-22 | Anonsen Steven P. | Metadata based hypermedia management system |
US20050086245A1 (en) * | 2003-10-15 | 2005-04-21 | Calpont Corporation | Architecture for a hardware database management system |
US20060095513A1 (en) * | 2002-07-22 | 2006-05-04 | Microsoft Corporation | Hypermedia management system |
US7574461B1 (en) * | 2005-12-28 | 2009-08-11 | Emc Corporation | Dividing data for multi-thread backup |
US7693889B1 (en) | 2005-12-28 | 2010-04-06 | Emc Corporation | Automated backup and recovery for content repository |
US20230185804A1 (en) * | 2021-12-10 | 2023-06-15 | Sap Se | Computational dependency directory |
Families Citing this family (35)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7388092B2 (en) * | 1996-05-03 | 2008-06-17 | Applera Corporation | Oligonucleotides and analogs labeled with energy transfer dyes |
US7062456B1 (en) | 1999-02-09 | 2006-06-13 | The Chase Manhattan Bank | System and method for back office processing of banking transactions using electronic files |
US6957228B1 (en) * | 2000-01-07 | 2005-10-18 | International Business Machines Corporation | Object oriented apparatus and method for providing context-based class replacement in an object oriented system |
DE10006959B4 (en) * | 2000-02-16 | 2006-11-30 | Siemens Ag | Method for querying a database |
US6980996B1 (en) | 2000-06-28 | 2005-12-27 | Cisco Technology, Inc. | Generic command interface for multiple executable routines having character-based command tree |
US7047526B1 (en) * | 2000-06-28 | 2006-05-16 | Cisco Technology, Inc. | Generic command interface for multiple executable routines |
US6647391B1 (en) * | 2000-07-11 | 2003-11-11 | Ian E. Smith | System, method and article of manufacture for fast mapping from a propertied document management system to a relational database |
US7328211B2 (en) | 2000-09-21 | 2008-02-05 | Jpmorgan Chase Bank, N.A. | System and methods for improved linguistic pattern matching |
US7987246B2 (en) * | 2002-05-23 | 2011-07-26 | Jpmorgan Chase Bank | Method and system for client browser update |
US7458061B2 (en) * | 2002-06-14 | 2008-11-25 | Sun Microsystems, Inc. | Protecting object identity in a language with built-in synchronization objects |
US6889231B1 (en) * | 2002-08-01 | 2005-05-03 | Oracle International Corporation | Asynchronous information sharing system |
US7103612B2 (en) * | 2002-08-01 | 2006-09-05 | Oracle International Corporation | Instantiation of objects for information-sharing relationships |
US7031974B1 (en) | 2002-08-01 | 2006-04-18 | Oracle International Corporation | Replicating DDL changes using streams |
US20040103199A1 (en) * | 2002-11-22 | 2004-05-27 | Anthony Chao | Method and system for client browser update from a lite cache |
US20040230555A1 (en) * | 2003-05-16 | 2004-11-18 | John Phenix | System and method for representing a relational database as a java object |
WO2005015361A2 (en) | 2003-08-08 | 2005-02-17 | Jp Morgan Chase Bank | System for archive integrity management and related methods |
US7516139B2 (en) | 2003-09-19 | 2009-04-07 | Jp Morgan Chase Bank | Processing of tree data structures |
US7779036B2 (en) * | 2004-02-19 | 2010-08-17 | Oracle International Corporation | Integration functionality for a test tool for application programming interfaces |
US7366974B2 (en) * | 2004-09-03 | 2008-04-29 | Jp Morgan Chase Bank | System and method for managing template attributes |
US20060059210A1 (en) * | 2004-09-16 | 2006-03-16 | Macdonald Glynne | Generic database structure and related systems and methods for storing data independent of data type |
US20090132466A1 (en) * | 2004-10-13 | 2009-05-21 | Jp Morgan Chase Bank | System and method for archiving data |
US20060175822A1 (en) * | 2005-02-09 | 2006-08-10 | Sheng-Yuan Chen | Engaging structure of loose-leaf storing box |
US8065606B1 (en) | 2005-09-16 | 2011-11-22 | Jpmorgan Chase Bank, N.A. | System and method for automating document generation |
US7680793B2 (en) * | 2005-10-07 | 2010-03-16 | Oracle International Corporation | Commit-time ordered message queue supporting arbitrary read and dequeue patterns from multiple subscribers |
US8095531B2 (en) | 2006-10-03 | 2012-01-10 | Salesforce.Com, Inc. | Methods and systems for controlling access to custom objects in a database |
US8104076B1 (en) | 2006-11-13 | 2012-01-24 | Jpmorgan Chase Bank, N.A. | Application access control system |
US8417731B2 (en) | 2006-12-28 | 2013-04-09 | Sap Ag | Article utilizing a generic update module with recursive calls identify, reformat the update parameters into the identified database table structure |
US8606799B2 (en) | 2006-12-28 | 2013-12-10 | Sap Ag | Software and method for utilizing a generic database query |
US7730056B2 (en) * | 2006-12-28 | 2010-06-01 | Sap Ag | Software and method for utilizing a common database layout |
US8024701B2 (en) * | 2007-03-27 | 2011-09-20 | Microsoft Corporation | Visual creation of object/relational constructs |
US20110219037A1 (en) * | 2010-03-04 | 2011-09-08 | Src, Inc. | High-Performance Persistence Framework |
US9038177B1 (en) | 2010-11-30 | 2015-05-19 | Jpmorgan Chase Bank, N.A. | Method and system for implementing multi-level data fusion |
US9292588B1 (en) | 2011-07-20 | 2016-03-22 | Jpmorgan Chase Bank, N.A. | Safe storing data for disaster recovery |
US10540373B1 (en) | 2013-03-04 | 2020-01-21 | Jpmorgan Chase Bank, N.A. | Clause library manager |
US9432344B2 (en) * | 2013-03-15 | 2016-08-30 | Low Gravity Innovation, Inc. | Secure storage and sharing of user objects |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5297279A (en) | 1990-05-30 | 1994-03-22 | Texas Instruments Incorporated | System and method for database management supporting object-oriented programming |
EP0553285B1 (en) | 1990-10-16 | 2000-03-01 | Consilium, Inc. | Object-oriented architecture for factory floor management |
US5295256A (en) * | 1990-12-14 | 1994-03-15 | Racal-Datacom, Inc. | Automatic storage of persistent objects in a relational schema |
FR2681451B1 (en) | 1991-09-13 | 1993-11-12 | Bull Sa | METHOD FOR MANAGING STRUCTURED OBJECTS. |
US5386564A (en) | 1993-02-24 | 1995-01-31 | Hewlett-Packard Company | Conversion of data and objects across classes in an object management system |
US6052693A (en) * | 1996-07-02 | 2000-04-18 | Harlequin Group Plc | System for assembling large databases through information extracted from text sources |
US5905987A (en) * | 1997-03-19 | 1999-05-18 | Microsoft Corporation | Method, data structure, and computer program product for object state storage in a repository |
US6128621A (en) | 1997-10-31 | 2000-10-03 | Oracle Corporation | Apparatus and method for pickling data |
US6061690A (en) * | 1997-10-31 | 2000-05-09 | Oracle Corporation | Apparatus and method for storage of object collections in a database system |
US6112210A (en) * | 1997-10-31 | 2000-08-29 | Oracle Corporation | Apparatus and method for null representation in database object storage |
US6038565A (en) * | 1998-01-16 | 2000-03-14 | International Business Machines Corporation | Object oriented data format mapping mechanism |
US6035303A (en) * | 1998-02-02 | 2000-03-07 | International Business Machines Corporation | Object management system for digital libraries |
-
1998
- 1998-10-28 US US09/181,411 patent/US6405209B2/en not_active Expired - Lifetime
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020194152A1 (en) * | 2000-07-02 | 2002-12-19 | Treil Nicolas Herve Edouard | Method for processing structured data using an object-oriented computer language |
US7203689B2 (en) * | 2000-07-03 | 2007-04-10 | Cedara Software Corp. | Method for processing structured data using an object-oriented computer language |
US20030105732A1 (en) * | 2000-11-17 | 2003-06-05 | Kagalwala Raxit A. | Database schema for structure query language (SQL) server |
US20040010498A1 (en) * | 2002-07-10 | 2004-01-15 | Lin Tser Yeng | Object persistence to relational database within run-time environment supporting attributes and reflection |
US20060095513A1 (en) * | 2002-07-22 | 2006-05-04 | Microsoft Corporation | Hypermedia management system |
US20040015501A1 (en) * | 2002-07-22 | 2004-01-22 | Anonsen Steven P. | Metadata based hypermedia management system |
US7769750B2 (en) * | 2002-07-22 | 2010-08-03 | Microsoft Corporation | Metadata based hypermedia management system |
US7970867B2 (en) | 2002-07-22 | 2011-06-28 | Microsoft Corporation | Hypermedia management system |
WO2005038619A2 (en) * | 2003-10-15 | 2005-04-28 | Calpont Corporation | Architecture for a hardware database management system |
US20050086245A1 (en) * | 2003-10-15 | 2005-04-21 | Calpont Corporation | Architecture for a hardware database management system |
WO2005038619A3 (en) * | 2003-10-15 | 2009-04-16 | Calpont Corp | Architecture for a hardware database management system |
US7574461B1 (en) * | 2005-12-28 | 2009-08-11 | Emc Corporation | Dividing data for multi-thread backup |
US7693889B1 (en) | 2005-12-28 | 2010-04-06 | Emc Corporation | Automated backup and recovery for content repository |
US20230185804A1 (en) * | 2021-12-10 | 2023-06-15 | Sap Se | Computational dependency directory |
US11789948B2 (en) * | 2021-12-10 | 2023-10-17 | Sap Se | Computational dependency directory |
Also Published As
Publication number | Publication date |
---|---|
US6405209B2 (en) | 2002-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6405209B2 (en) | Transparent object instantiation/initialization from a relational store | |
US6907433B2 (en) | System and method for managing object to relational one-to-many mapping | |
US5706506A (en) | Method and apparatus for managing relational data in an object cache | |
US6665863B1 (en) | Data referencing within a database graph | |
US6772172B2 (en) | Method, system, program, and computer readable medium for indexing object oriented objects in an object oriented database | |
US6453321B1 (en) | Structured cache for persistent objects | |
US7020641B2 (en) | Method, system, and program for maintaining a database of data objects | |
US7024656B1 (en) | Persistent agents | |
US6366921B1 (en) | System and method for data manipulation in a dynamic object-based format | |
US6243709B1 (en) | Method and apparatus for loading stored procedures in a database corresponding to object-oriented data dependencies | |
US5950188A (en) | Database system with methods for executing system-created internal SQL command statements | |
US6374256B1 (en) | Method and apparatus for creating indexes in a relational database corresponding to classes in an object-oriented application | |
US5802523A (en) | Method and apparatus for reducing the memory required to store bind variable descriptors in a database | |
US5930795A (en) | Supporting dynamic tables in SQL query compilers | |
US7769747B2 (en) | Method and apparatus for generating a service data object based service pattern for an enterprise Java beans model | |
US7873611B2 (en) | Boolean literal and parameter handling in object relational mapping | |
US9171036B2 (en) | Batching heterogeneous database commands | |
JPH0644128A (en) | Data base management system and method supporting object directional programming | |
CA2398148C (en) | System and method for managing bi-directional relationships between objects | |
KR20060048418A (en) | System and method for delayed fetching of designated members of a user defined type | |
US6421666B1 (en) | Mechanism for sharing ancillary data between a family of related functions | |
JPH09244896A (en) | Object base structuring method for permanent object, computer readable medium, and information operation system | |
US20090063435A1 (en) | Parameter type prediction in object relational mapping | |
US20030195987A1 (en) | Method, system, and article of manufacture for transferring structured data between different data stores | |
US20110087642A1 (en) | Memory-Mapped Objects |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: NCR CORPORATION, OHIO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:OBENDORF, MICHAEL SCOTT;REEL/FRAME:009557/0096 Effective date: 19981025 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
AS | Assignment |
Owner name: TERADATA US, INC., OHIO Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:NCR CORPORATION;REEL/FRAME:020540/0786 Effective date: 20070924 |
|
FPAY | Fee payment |
Year of fee payment: 8 |
|
FPAY | Fee payment |
Year of fee payment: 12 |