The subject application is related to U.S. application Ser. No. 10/652,258, entitled “Relational Schema Format” filed Aug. 29, 2003 and U.S. application Ser. No. 10/652,214, entitled “Mapping Architecture for Arbitrary Data Models” filed on Aug. 29, 2003, the entireties of which are incorporated herein by reference.
The present invention relates generally to computers and more particularly toward schema mappings and data persistence.
There are a plethora of different computer programming paradigms available today. Each paradigm has been optimized for use in its own particular problem space. However, the technological differences between models can present obstacles for user who wish to employ a plurality of different models in concert so as to leverage the benefits provided by each. For instance, object oriented programming employs of units of software called “objects” which encapsulate both data and functions. Object Oriented Programming (OOP) objects are software entities comprising data structures and operations on data. Together, these elements enable programmers to generate objects to model virtually any real-world entity in terms of its characteristics, represented by its data elements, and its behavior represented by its data manipulation functions.
The benefit of object technology arises out of three basic principles: encapsulation, polymorphism and inheritance. Objects hide or encapsulate the internal structure of their data and the algorithms by which their functions work. Instead of exposing these implementation details, objects present interfaces that represent their abstractions cleanly with no extraneous information. Polymorphism takes encapsulation one step further—the idea being many shapes, one interface. The third principle is inheritance, which allows developers to reuse pre-existing design and code. This capability allows developers to avoid creating software from scratch. Rather, through inheritance, developers derive subclasses that inherit behaviors, which the developer then customizes to meet particular needs.
The relational database model is a desirable choice of programmers for use in storing, retrieving and analyzing data. In contrast to the object oriented programming model, however, the fundamental units of operation for relational database management systems are tables. One of the significant benefits of relational databases is that they can store an extremely large quantity of data in part because data is not replicated. Furthermore, relational database are highly scalable and flexible. Additionally, relational database systems are advantageous in that they provide an easy way to analyze and retrieve large amounts of stored data. Relational database data can be analyzed utilizing structured query languages (SQL) to query data. Queries can be used to perform record retrieval and updates, perform calculations, append data to tables, or summarize data in one or more tables. Using queries, a user can specify the criteria for a search and then automatically sort and display all records matching the criteria.
Valuable software applications engage in data manipulation and processing. Accordingly, data needs to be stored somewhere to allow the data to survive the termination of the applications and/or computer shut down. This can be accomplished in a myriad of different ways such as storing data to text files, XML files or other data containers. Such storage can easily be accomplished by serializing objects and writing them to files. However, when applications deal with huge amounts of data there is a need to store data in databases such as a relational database to take advantage of the high performance query operations and consistency in data, among other things. Otherwise, an application would have to search through thousands of entries, in a file for instance, before retrieving desired information. Nevertheless, applications are most often written employing an object-oriented model while databases typically utilize the relational model. Hence, a mapping needs to be developed to provide translation from the object oriented model to the relational model and back from the relational model to the object oriented model. Conventionally, it is a developer's job to develop such a single map between the two worlds. Unfortunately, developing such a mapping component is a complex, time consuming, and error prone task.
Accordingly, there is a need in the art for a system and method to facilitate mapping between disparate domain models such as an object oriented programming model and a relational database model.
The following presents a simplified summary of the invention in order to provide a basic understanding of some aspects of the invention. This summary is not an extensive overview of the invention. It is not intended to identify key/critical elements of the invention or to delineate the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that is presented later.
The present invention discloses an object schema component. The object schema provides a mechanism for providing a bridge between a transient graph of objects and a related persistent data store. In particular, the object schema provides metadata describing a given set of classes in addition to a program assembly containing type definitions. The metadata can subsequently be utilized by a mapping system to translate relational data to and from user objects during a materialization or persistence process. According to one particular aspect of the present invention, the object schema is defined in a declarative manner in that it is specified as information external to programming logic. By providing this information outside of a users type definitions, the schema can be deployed independently of an associated application thereby allowing persistence storage of objects to change without forcing a user to recompile and redeploy application code.
According to another aspect of the present invention, the object schema can define classes that describe persistent objects. The object schema can also describe or define members associated with one or more classes, wherein a member can include a field or properties of a class. Furthermore, relationships between classes can be described and defined by the object schema. The object schema can also include a plurality of specifiable attributes to assist in describing classes, members, and relationships amongst them. In addition, such attributes can be utilized or specified solely to facilitate querying of an object data source.
According to another aspect of the invention, the object schema is one of three distinct schemas utilized to map objects to a relational data store, for example. A mapping system can employ an object schema, a relational schema and a mapping schema. The object schema can contain definitions of classes, members, and relationships between objects from an object oriented model. The relational schema can provide information regarding tables and fields amongst tables relating to a relational data model. Finally, the mapping schema can utilize references to both the object schema and the relational schema to provide a mapping there between.
According to still another aspect of the present invention, a schema generation system is disclosed to automatically generate an object schema from provided object code. More specifically, the system can retrieve object data from a provided application and provide it to a generation component. The generation component can subsequently utilize information concerning a corresponding relational model and object information to produce an object schema.
According to yet another aspect of the present invention a graphical user interface can be utilized to generate an object schema. A free form user interface can be provided including a plurality of graphical objects and components (e.g., buttons, tabs, text boxes, check boxes, menus . . . ) that a developer can utilize to easily specify metadata concerning objects and thereby produce an object schema. Additionally or alternatively, a wizard can be employed to guide a developer through construction of a schema from a given object program.
To the accomplishment of the foregoing and related ends, certain illustrative aspects of the invention are described herein in connection with the following description and the annexed drawings. These aspects are indicative of various ways in which the invention may be practiced, all of which are intended to be covered by the present invention. Other advantages and novel features of the invention may become apparent from the following detailed description of the invention when considered in conjunction with the drawings.
The foregoing and other aspects of the invention will become apparent from the following detailed description and the appended drawings described in brief hereinafter.
The present invention is now described with reference to the annexed drawings, wherein like numerals refer to like elements throughout. It should be understood, however, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed. Rather, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present invention.
As used in this application, the terms “component” and “system” are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, software, or software in execution. For example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a server and the server can be a component. One or more components may reside within a process and/or thread of execution and a component may be localized on one computer and/or distributed between two or more computers.
Furthermore, the present invention may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof. The term “article of manufacture” (or alternatively, “computer program product”) as used herein is intended to encompass a computer program accessible from any computer-readable device, carrier, or media. For example, a computer readable media can include but are not limited to magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips . . . ), optical disks (e.g., compact disk (CD), digital versatile disk (DVD) . . . ), smart cards, and flash memory devices (e.g., card, stick). Of course, those skilled in the art will recognize many modifications may be made to this configuration without departing from the scope or spirit of the subject invention.
Turning to
The above object schema comprises metadata, which describes the following programmatic class definitions:
Turning to
Turning to
Paths attribute 350 can also be employed when multiple class definitions are needed in addition to multiple maps. For instance:
Thus for either of the two different representations a mapping schema component 240 (
Search inheritance hierarchy 428 is a Boolean flag that tells a search system to search the inheritance hierarchy for a private member. If the value is false, private members in base classes will not be searched for unless the base type is also a persistent type defined by the object schema. For example, if the object models is specifies
It should be noted that in this example CompanyBase is not a persistent type, so it is not in the identified in the schema.
Member structure(s) 112 can also comprise compound members. Compound members allow mapping of complex members as inline members of a given class. For instance, this can allow inline mapping of arrays, structs, and entity key members. Each compound member can contain members or other compound members. Turing to
An inline class (struct) can define a function within a class. An inline class can be represented as a compound member. For example assume the object model is specified as follows:
This inline class and associated function can be represented in an object schema as follows:
Turning to
This object schema sets forth two classes: customer and order. The object relationship attributes indicated that the relationship name is CustomerOrder and the type of relationship is OneToMany. A one-to-many relationship indicates that one object class is associated with more than one other object class. Here, each customer can be associated with a plurality of orders. Accordingly, parent class is set to customer and child class to order. Furthermore, parent member is associated with the myOrders field in the parent class and child member is associated with the myCustomer field of the child class.
It should be appreciated that what has been described thus far are exemplary object schemas and portions thereof. The present invention contemplates multiple different types of object schemas specified in different languages (e.g., other than XML) with more, less, and/or different attributes associated therewith. The provided object schemas and description thereof have been supplied for purpose of clearly describing various aspects of the subject invention and are not meant to limit the scope of the present invention in any way.
Turning to
In accordance with the present invention an object schema can be written by hand by a developer, automatically generated, or generated by a developer with the help of a graphical user interface or wizard, for example. Turning to
In view of the exemplary system(s) described supra, a methodology that may be implemented in accordance with the present invention will be better appreciated with reference to the flow charts of
Additionally, it should be further appreciated that the methodologies disclosed hereinafter and throughout this specification are capable of being stored on an article of manufacture to facilitate transporting and transferring such methodologies to computers. The term article of manufacture, as used, is intended to encompass a computer program accessible from any computer-readable device, carrier, or media.
In order to provide a context for the various aspects of the invention,
With reference to
The system bus 1418 can be any of several types of bus structure(s) including the memory bus or memory controller, a peripheral bus or external bus, and/or a local bus using any variety of available bus architectures including, but not limited to, 11-bit bus, Industrial Standard Architecture (ISA), Micro-Channel Architecture (MSA), Extended ISA (EISA), Intelligent Drive Electronics (IDE), VESA Local Bus (VLB), Peripheral Component Interconnect (PCI), Universal Serial Bus (USB), Advanced Graphics Port (AGP), Personal Computer Memory Card International Association bus (PCMCIA), and Small Computer Systems Interface (SCSI).
The system memory 1416 includes volatile memory 1420 and nonvolatile memory 1422. The basic input/output system (BIOS), containing the basic routines to transfer information between elements within the computer 1412, such as during start-up, is stored in nonvolatile memory 1422. By way of illustration, and not limitation, nonvolatile memory 1422 can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory 1420 includes random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in many forms such as synchronous RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM).
Computer 1412 also includes removable/non-removable, volatile/non-volatile computer storage media.
It is to be appreciated that
A user enters commands or information into the computer 1412 through input device(s) 1436. Input devices 1436 include, but are not limited to, a pointing device such as a mouse, trackball, stylus, touch pad, touch screen, keyboard, microphone, joystick, game pad, satellite dish, scanner, TV tuner card, digital camera, digital video camera, web camera, and the like. These and other input devices connect to the processing unit 1414 through the system bus 1418 via interface port(s) 1438. Interface port(s) 1438 include, for example, a serial port, a parallel port, a game port, and a universal serial bus (USB). Output device(s) 1440 use some of the same type of ports as input device(s) 1436. Thus, for example, a USB port may be used to provide input to computer 1412 and to output information from computer 1412 to an output device 1440. Output adapter 1442 is provided to illustrate that there are some output devices 1440 like monitors, speakers, and printers, among other output devices 1440 that require special adapters. The output adapters 1442 include, by way of illustration and not limitation, video and sound cards that provide a means of connection between the output device 1440 and the system bus 1418. It should be noted that other devices and/or systems of devices provide both input and output capabilities such as remote computer(s) 1444.
Computer 1412 can operate in a networked environment using logical connections to one or more remote computers, such as remote computer(s) 1444. The remote computer(s) 1444 can be a personal computer, a server, a router, a network PC, a workstation, a microprocessor based appliance, a peer device or other common network node and the like, and typically includes many or all of the elements described relative to computer 1412. For purposes of brevity, only a memory storage device 1446 is illustrated with remote computer(s) 1444. Remote computer(s) 1444 is logically connected to computer 1412 through a network interface 1448 and then physically connected via communication connection 1450. Network interface 1448 encompasses communication networks such as local-area networks (LAN) and wide-area networks (WAN). LAN technologies include Fiber Distributed Data Interface (FDDI), Copper Distributed Data Interface (CDDI), Ethernet/IEEE 802.3, Token Ring/IEEE 802.5 and the like. WAN technologies include, but are not limited to, point-to-point links, circuit switching networks like Integrated Services Digital Networks (ISDN) and variations thereon, packet switching networks, and Digital Subscriber Lines (DSL).
Communication connection(s) 1450 refers to the hardware/software employed to connect the network interface 1448 to the bus 1418. While communication connection 1450 is shown for illustrative clarity inside computer 1412, it can also be external to computer 1412. The hardware/software necessary for connection to the network interface 1448 includes, for exemplary purposes only, internal and external technologies such as, modems including regular telephone grade modems, cable modems, DSL modems, power modems, ISDN adapters, and Ethernet cards.
What has been described above includes examples of the present invention. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the present invention, but one of ordinary skill in the art may recognize that many further combinations and permutations of the present invention are possible. Accordingly, the present invention is intended to embrace all such alterations, modifications and variations that fall within the spirit and scope of the appended claims. Furthermore, to the extent that the term “includes or having” is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term “comprising” as “comprising” is interpreted when employed as a transitional word in a claim.
Number | Name | Date | Kind |
---|---|---|---|
5315709 | Alston | May 1994 | A |
5668991 | Dunn | Sep 1997 | A |
5710917 | Musa et al. | Jan 1998 | A |
5729739 | Cantin et al. | Mar 1998 | A |
5926833 | Rasoulian et al. | Jul 1999 | A |
5937409 | Wetherbee | Aug 1999 | A |
5987247 | Lau | Nov 1999 | A |
6006230 | Ludwig et al. | Dec 1999 | A |
6018743 | Xu | Jan 2000 | A |
6038565 | Nock | Mar 2000 | A |
6041386 | Bello | Mar 2000 | A |
6061515 | Chang | May 2000 | A |
6076090 | Burroughs | Jun 2000 | A |
6154748 | Gupta | Nov 2000 | A |
6370541 | Chou et al. | Apr 2002 | B1 |
6569207 | Sundaresan | May 2003 | B1 |
6581062 | Draper | Jun 2003 | B1 |
6631519 | Nicholson | Oct 2003 | B1 |
6769124 | Schoening | Jul 2004 | B1 |
6820135 | Dingman | Nov 2004 | B1 |
6853997 | Wotring et al. | Feb 2005 | B2 |
6907433 | Wang et al. | Jun 2005 | B2 |
7136843 | Bigus et al. | Nov 2006 | B2 |
20020078094 | Krishnaprasad | Jun 2002 | A1 |
20020103793 | Koller et al. | Aug 2002 | A1 |
20030055828 | Koch | Mar 2003 | A1 |
20030074358 | Sarbaz | Apr 2003 | A1 |
20030093770 | Fernandez | May 2003 | A1 |
20030101170 | Edelstein | May 2003 | A1 |
20030217069 | Fagin | Nov 2003 | A1 |
20040015783 | Lennon | Jan 2004 | A1 |
20040044959 | Shanmugasundaram | Mar 2004 | A1 |
20050210124 | Chua | Sep 2005 | A1 |
20090024642 | Vaschillo | Jan 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20050216501 A1 | Sep 2005 | US |