|
|
|
| United States Patent | 5499371 |
| Link to this page | http://www.wikipatents.com/5499371.html |
| Inventor(s) | Henninger; Derek P. (Cupertino, CA);
Jensen; Richard H. (Redwood City, CA);
Keene; Christopher T. (San Francisco, CA) |
| Abstract | A method and apparatus are provided for using an object model of an
object-oriented application to automatically map information between an
object-oriented application and a structured database, such as a
relational database. This is done by taking into account all of the
semantics (implications) of an object model, such as inheritance and
relationships among object classes, and using these semantics to generate
a minimal set of routines for each object class that manipulate the object
and other objects to which it is related or from which it inherits. The
generated routines, when executed, provide transparent access to
relational data or other field-delimited data. Object classes and routines
generated using the method encapsulate all the details of database access,
such that developers (computer programmers) can write object-oriented
applications using those object classes without any explicit reference to
or knowledge of the underlying database or its structure. By working with
the objects, the user of such applications transparently manipulates the
database without needing to know anything of its structure. Applications
can be written using the object classes to transparently integrate
information from multiple databases. |
|
|
|
Title Information  |
|
|
|
|
|
Drawing from US Patent 5499371 |
|
|
Method and apparatus for automatic generation of object oriented code
for mapping relational data to objects |
|
|
|
|
|
| Publication Date |
March 12, 1996 |
|
|
|
|
|
| Filing Date |
March 22, 1995 |
|
|
|
|
|
|
|
|
|
|
|
| Parent Case |
This is a continuation of application Ser. No. 08/095,322 filed Jul. 21,
1993, now abandoned. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Title Information  |
|
|
References  |
|
|
| *references marked with an asterisk below are user-added references |
|
U.S. References |
|
|
|
|
|
|
U.S. References |
|
|
Foreign References |
|
|
|
|
|
|
Foreign References |
|
|
Other References |
|
|
|
|
|
|
Other References |
|
|
|
|
|
References  |
|
|
|
|
|
| Market Size |
|
Estimate the gross annual revenues of the relevant market
sector:
|
| | |
| |
|
|
| Market Share |
|
Estimate the percentage of the relevant market sector this invention will capture:
|
| | |
| |
|
|
| Reasonable Royalty |
|
What percentage of gross sales should the inventor or assignee be paid?
|
| | |
| |
|
|
|
Public's "Guesstimation" of Royalty Value
|
| Market Size | N/A | [No votes] | | x | Market Share | N/A | [No votes] | | x | Reasonable Royalty | N/A | [No votes] |
| | N/A | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
Market Review  |
|
|
Technical Review  |
|
|
Claims  |
|
|
What is claimed is:
1. A method for automatically mapping information of an object said
information comprising the object attributes, relationships, and
inheritances between an object-oriented application and a structured
database, said method being carried out using a digital computing system
comprising a processor, said method comprising the steps of:
executing instructions on said processor to load into temporary storage an
object model, said object model comprising a plurality of semantic
elements, said semantic elements being less complex than object class
source code definitions, representing a plurality of object classes and a
plurality of relationships between said plurality of object classes within
said object-oriented application, each of said plurality of semantic
elements comprising relationships between object classes, inheritances
between object classes, and attributes of an object class comprising at
least one object ID attribute;
executing instructions on said processor to automatically generate code by
parsing said object model to identify the object classes and their
relationships for which said code is generated and automatically
generating class definitions and methods, said code being suitable for
conversion to an executable form that when executed automatically maps
said information between said object-oriented application and said
structured database; and
executing instructions on said processor to output to persistent storage
said code.
2. A method for automatically mapping information of an object comprising
the object attributes, relationships, and inheritances between an
object-oriented application and a structured database, said method being
carried out using a digital computing system comprising a processor, said
method comprising the steps of:
executing instructions on said processor to load into temporary storage an
object model, said object model comprising a plurality of semantic
elements, said semantic elements being less complex than object class
source code definitions, representing a plurality of object classes and a
plurality of relationships between said plurality of object classes within
said object-oriented application, each of said plurality of semantic
elements comprising relationships between object classes, inheritances
between object classes, and attributes of an object class comprising at
least one object ID attribute;
executing instructions on said processor to load into temporary storage for
processing a database schema that represents the structure of data in said
structured database, said structured database comprising tables, columns,
primary keys, foreign keys, and join tables;
executing instructions on said processor to load into temporary storage for
processing a transform that represents a mapping between said object model
and said database schema, said transform having the further capability of
being modified;
executing instructions on said processor to automatically generate code by
parsing said object model to identify the object classes and their
relationships for which said code is generated, parsing said database
schema to identify the database tables used to store the object class
instances, and parsing said transform to identify the mapping of said
object classes, and relationships between said database tables and said
object classes, said code being suitable for conversion to an executable
form that when executed automatically maps said information between said
object-oriented application and said structured database;
executing instructions on said processor to generate code for each object
class, including code for four routines associated with said object class,
said four routines being:
a routine to create an instance of said object class;
a routine to retrieve an instance of said object class;
a routine to update an instance of said object class; and
a routine to delete an instance of said object class, each of said four
routines based on said semantic elements of said object model; and
executing instructions on said processor to output to persistent storage
said code.
3. The method of claim 2 wherein said step of executing instructions on
said processor to load into temporary storage for processing a database
schema comprises executing instructions on said processor to load into
temporary storage from persistent storage said database schema, and
wherein said step of executing instructions on said processor to load into
temporary storage for processing a transform comprises executing
instructions on said processor to load into temporary storage from
persistent storage said transform.
4. The method of claim 2 wherein said computing system further comprises an
input means coupled to said processor, wherein said step of executing
instructions on the processor to load into temporary storage for
processing a database schema comprises executing instructions on said
processor in conjunction with said input means to input said database
schema, and wherein said step of executing instructions on said processor
to load into temporary storage for processing a transform comprises
executing instructions on said processor in conjunction with said input
means to input said transform.
5. The method of claim 2 wherein said step of executing instructions on
said processor to load into temporary storage for processing a database
schema comprises executing instructions on said processor to construct
said database schema by loading said object model into temporary storage,
locating object classes and relationships within said object model,
creating said database schema comprising semantic representations of
tables representing said object classes and relationships of said object
model such that said database schema represents a database capable of
storing said elements of said object model, and wherein said step of
executing instructions on said processor to load into temporary storage
for processing a transform comprises executing instructions on said
processor to construct said transform by loading said object model into
temporary storage, locating object classes and relationships within said
object model, creating said transform comprising mappings between said
object classes and relationships of said object model and said tables of
said database schema such that said transform is capable of mapping said
elements of said object model from said object oriented application to
said structured database.
6. The method of claim 2 wherein said step of executing instructions on
said processor to load into temporary storage an object model comprises
executing instructions on said processor to load into temporary storage an
object model;
wherein said step of executing instructions on said processor to load into
temporary storage for processing a database schema said database schema
describing tables organized in rows and columns, each one of said tables
having at least one primary key column that uniquely identifies rows in
each said table; and
wherein said step of executing instructions on said processor to load into
temporary storage for processing a transform includes executing
instructions on said processor to load into temporary storage for
processing a transform that comprises a set of mappings between said
semantic elements of said object model and said database schema.
7. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code which performs a mapping
from each one of said object classes from said object model to at least
one table described by said database schema, according to said mappings of
said transform.
8. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code which performs a mapping
from said object ID attributes from said object model to primary key
columns in at least one table described by said database schema, according
to said mappings of said transform.
9. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code which performs a mapping
from attributes from said object model to columns in a single table
described by said database schema, according to said mappings of said
transform.
10. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code for implementing a
one-to-one relationship between object classes of said object model by
generating code that references at least one foreign key column in at
least one table described by said database schema, said foreign key column
being capable of use in said create, retrieve, update, and delete routines
for preserving said one-to-one relationship between said object classes,
and said foreign key column being specified according to said mappings of
said transform.
11. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code implementing a one-to-many
relationship between object classes of said object model by generating
code that references at least one foreign key column in at least one table
of said database schema, said foreign key column being capable of use in
said create, retrieve, update, and delete routines for preserving said
one-to-many relationship between said object classes, and said foreign key
column being specified according to said mappings of said transform.
12. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code implementing a
many-to-many relationship between object classes of said object model in
said structured database by generating code that references a join table
described by said database schema, said join table containing foreign key
references to primary key columns, said join table being capable of use in
said create, retrieve, update, and delete routines for preserving said
many-to-many relationship between said object classes, and said join table
being specified according to said mappings of said transform.
13. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to generate code which implements the
vertical inheritance between a child object class and a parent object
class of said object model in said structured database by referencing at
least one foreign key column in a table described by said database schema
that corresponds to said child object class, representing said vertical
inheritance according to said mappings of said transform.
14. The method of claim 6 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to automatically generate code which
implements the horizontal inheritance between a child object class and a
parent object class of said object model in said structured database by
copying attributes of said parent object class from said object oriented
application to a table described by said database schema corresponding to
said child object class according to said mappings of said transform.
15. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for a
plurality of object classes determined by said object model and a set of
routines for each object class of said plurality, such that said routines
operate on an instance in said object oriented application of said object
class.
16. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for a
plurality of object classes determined by said object model and a set of
routines for each object class of said plurality, each said set comprising
a routine for creating an object instance of said object class, said
routine for creating an object instance of said object class being
suitable for conversion to an executable form that when executed causes a
new object instance to be created in said object-oriented application and
further causes the attributes of said new object instance to be added to
columns of tables of said structured database according to said database
schema and said mapping of said transform, and further causes
relationships and inheritance of said object model to be implemented by
modifying columns, tables and keys in said structured database according
said mapping of said transform.
17. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for a
plurality of object classes determined by said object model and a set of
routines for each object class of said plurality, each said set comprising
a routine for retrieving an object instance of said object class from said
structured database, said routine for retrieving an object instance being
suitable for conversion to an executable form that when executed causes a
new object instance to be created in said object-oriented application,
said new object instance being initialized with attribute values,
relationships, and inheritances determined according to information
extracted from said structured database.
18. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for a
plurality of object classes determined by said object model and a set of
routines for each object class of said plurality, each said set comprising
a routine for updating an object instance of said object class, said
routine for updating an object instance being suitable for conversion to
an executable form that when executed causes modifications to the database
tables, columns and keys representing the object instance in said
structured database and further causes the attribute values, inheritances,
and relationships of said object instance in said object-oriented
application to be modified to reflect said modifications to said database
tables, columns, and keys representing the object instance in said
structured database.
19. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for a
plurality of object classes determined by said object model and a set of
routines for each object class of said plurality, each said set comprising
a routine for deleting an object instance of said object class, said
routine for deleting an object instance being suitable for conversion to
an executable form that when executed causes an object instance to be
deleted in said object-oriented application and further causes the
database tables, columns, primary keys, foreign keys, and join tables
representing the object instance to be updated reflecting the deletion of
the object instance from said object oriented application in said
structured database.
20. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate a create routine
for each object class in a plurality of object classes determined by said
object model, said create routine comprising the step of generating an
attribute of the object instance comprising the object ID by combining the
attributes specified in said object model and transform as defining the
object ID such that an object instance is uniquely identifiable within
said structured database and said object oriented application.
21. The method of claim 19 wherein said step of automatically generating a
delete routine for each object class in a plurality of object classes
determined by said object model further comprises the step of canceling
the deletion of an object instance in said structured database based on
the existence of a blocking relationship between said object instance and
a related object instance in said object model.
22. The method of claim 19 wherein said step of automatically generating a
delete routine for each object class in a plurality of object classes
determined by said object model further comprises the step of generating
code to call a second delete routine for a related object instance based
on the existence of a propagate relationship between said first object
instance and said related object instance in said object model.
23. The method of claim 19 wherein said step of automatically generating a
delete routine for each object class in a plurality of object classes
determined by said object model further comprises the step of removing the
columns, foreign keys, and join table entries in said structured database
representing a remove relationship between a first object instance and a
related object instance based on the existence of a remove relationship
between said first object instance and said related object instance in
said object model.
24. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for object
classes and routines using as inputs said object model, said database
schema, and said transform, at least one routine of said generated
routines calling a notification hook routine in connection with the
execution of said at least one routine of said generated routines, said
notification hook routine being externally generated.
25. The method of claim 2 wherein said step of executing instructions on
said processor to automatically generate code comprises executing
instructions on said processor to automatically generate code for object
classes and routines by loading into temporary storage from persistent
storage said object model, said database schema, and said transform,
including generating a source code routine to create at least one table in
said structured database that corresponds to an object class in said
object model.
26. A method for automatically mapping information between an
object-oriented application and a plurality of structured databases, each
of said structured databases comprising tables, columns, primary keys,
foreign keys, and join tables, said method being carried out by executing
instructions on a digital computing system comprising at least one
processor, said method comprising the steps of:
executing instructions on a processor of said digital computing system to
load into temporary storage an object model, said object model comprising
a plurality of semantic elements, said semantic elements being less
complex than object class source code definitions, representing a
plurality of object classes and a plurality of relationships between said
plurality of object classes within said object-oriented application, each
of said plurality of semantic elements comprising relationships between
object classes, inheritances between object classes, and attributes of an
object class comprising at least one object ID attribute;
executing instructions on said processor to automatically generate code,
said code being suitable for conversion to an executable form that when
executed automatically maps said information between said object-oriented
application and the structured databases of said plurality;
executing instructions on said processor to generate code for each object
class, including code for four routines associated with said object class,
said four routines being:
a routine to create an instance of said object class;
a routine to retrieve an instance of said object class;
a routine to update an instance of said object class; and
a routine to delete an instance of said object class, each of said four
routines based on said semantic elements of said object model; and
executing instructions on said processor to output to persistent storage
said code.
27. The method of claim 26 wherein said step of executing instructions on
said processor to automatically generate code further comprises executing
instructions on said processor to parse object classes from said object
model and to generate code such that each one of said object classes maps
to at least one table in at least one structured database of said
plurality of structured databases.
28. A method for automatically generating code to support an
object-oriented application that interacts transparently with a
field-delimited database, said method performed by a processor coupled to
an input means and an output means, said method comprising the steps of:
(a) executing instructions on said processor to enable a user to
dynamically specify an object model to load into temporary storage by
using said input means to select from a plurality of input fields
representing said object model, said object model comprising a plurality
of semantic elements, said semantic elements being less complex than
object class source code definitions, representing a plurality of object
classes and a plurality of relationships between said plurality of object
classes within said object-oriented application, each of said plurality of
semantic elements comprising relationships between object classes,
inheritances between object classes, and attributes of an object class
comprising at least one object ID attribute;
(b) executing instructions on said processor to load into temporary storage
a database schema;
(c) executing instructions on said processor to load into temporary storage
a transform, said transform representing a mapping between said object
model and said schema;
(d) for each object class in said object model, executing instructions on
said processor to generate code for each object class, including code for
four routines associated with said object class, said four routines being:
a routine to create an instance of said object class;
a routine to retrieve an instance of said object class;
a routine to update an instance of said object class; and
a routine to delete an instance of said object class, each of said four
routines based on said semantic elements of said object model; and
executing instructions on said processor and outputting to persistent
storage the code thus generated.
29. An apparatus for automatically mapping information between an
object-oriented application and a structured database, said apparatus
comprising a digital computing system, said digital computing system
comprising a first processor, a memory coupled to said processor, a user
interface coupled to said processor, a storage device coupled to said
processor, a network coupled to said processor, a second processor
dedicated to a structured database coupled to said network and supporting
said structured database, and:
means for executing instructions on said first processor to load into
temporary storage an object model, said object model comprising a
plurality of semantic elements, said semantic elements being less complex
than object class source code definitions, representing a plurality of
object classes and a plurality of relationships between said plurality of
object classes within said object-oriented application, each of said
plurality of semantic elements comprising relationships between object
classes, inheritances between object classes, and attributes of an object
class comprising at least one object ID attribute;
means for executing instructions on said processor to automatically
generate code that when executed automatically maps said information
between said object-oriented application and said structured database;
executing instructions on said processor to generate code for each object
class, including code for four routines associated with said object class,
said four routines being:
a routine to create an instance of said object class;
a routine to retrieve an instance of said object class;
a routine to update an instance of said object class; and
a routine to delete an instance of said object class, each of said four
routines based on said semantic elements of said object model; and
means associated with said first processor for outputting said code to
persistent storage.
30. The method of claim 6 wherein said step of executing instructions on
said processor to load into temporary storage for processing a database
schema further includes executing instructions on said processor to load
into temporary storage for processing a database schema that describes
tables organized in rows and columns, each one of said tables further
containing a foreign key column that represents a mapping between a row in
said table and a row in another table of said structured database. |
|
|
|
|
Claims  |
|
|
Description  |
|
|
COPYRIGHT NOTIFICATION
A portion of the disclosure of this patent document contains material which
is subject to copyright protection. The copyright owners have no objection
to the facsimile reproduction, by anyone, of the patent document or the
patent disclosure, as it appears in the patent and trademark office patent
file or records, but otherwise reserve all copyright rights whatsoever.
MICROFICHE APPENDICES
Two appendices comprising a total of 1444 frames on 16 microfiche are
included as part of this application. Appendix I contains the source code
of Persistence.TM. version 1.3 released Jun. 15, 1993. It comprises 1358
frames on 14 microfiche. The Persistence.TM. software represents an
embodiment of the method of the present invention. Appendix II contains a
user's manual for Persistence.TM. version 1.2 released March 1993. It
comprises 100 frames on 2 microfiche.
The source code in Appendix I represents unpublished work,
Copyright.COPYRGT. 1993 Persistence Software, Inc. All rights reserved.
The user's manual in Appendix II is Copyright.COPYRGT. 1993 Persistence
Software, Inc. All rights reserved. For both Appendices I and II,
copyright protection claimed includes all forms and matters of
copyrightable material and information now allowed by statutory or
judicial law or hereafter granted, including without limitation, material
generated from the software programs which are displayed on the screen
such as icons, screen display looks, etc.
BACKGROUND OF THE INVENTION
The invention relates to the interrelationship of databases, particularly
relational databases, and object-oriented systems. More particularly, the
invention relates to relationships between objects in object-oriented
systems and descriptions of objects storable in field-delimited database
structures. Field-delimited databases can structure data into fields which
have common attributes. For example, relational databases can structure
data into tables, each with columns and rows (in "n" dimensions) forming
tuples, upon which certain operations in set algebra can be performed very
conveniently.
Object-oriented applications organize data and routines together into
encapsulated units referred to as objects. Object-oriented applications
lead to modular software systems which have increased flexibility and are
easy to alter and maintain.
An object model is a formal description of an object-oriented application.
The semantic elements of an object model describe object classes,
attributes of object classes, relationships between object classes, and
inheritance between object classes. An object model provides a powerful
mechanism to represent the real world, for example because objects carry
information about inherited characteristics and relationships with other
objects. For example, an object model of a car can contain many classes,
such as "tire." The tire class can have attributes, such as "pressure";
relationships, such as "tire" is related to an "axle"; and inheritances,
such as a "snow tire" inherits from a "tire."
The difference between a relational database management system (RDBMS) and
an object-oriented application is that an object "knows" what operations
can be performed on its data, whereas an RDBMS only has a set of generic
operations which can be performed on its tuples. The semantics available
in an object model are not preserved in a relational database. For
example, a "snow tire" knows that it is related to an "axle" and inherits
from a "tire." In contrast, a relational database represents this
information in three separate data tables with no explicit representation
of the relationships between the tables. The tire table in a relational
database might have foreign key information referring to the axle table,
but this representation of the relationship between tire and axle is
implicit. It is up to the developer to know about these relationships,
what they mean, and how to handle them.
There is a desire to build object-oriented applications that store and
access data found in relational databases. For example, it would be useful
to employ a plan for an automobile (an object model) to build a vehicle
(an object) from an organized inventory of auto parts (a relational
database). A system is needed which can map information between a database
and an object-oriented application based on the semantics of an object
model. More particularly, what is needed is a mechanism for using the
semantic elements of an object model to generate routines that map data
between a database and an object-oriented application.
Systems are known for manual mapping between objects in knowledge bases and
database management systems. One approach is to employ a static class
library as an interface between an object-oriented system and a relational
database. An example is METHOD FOR INTEGRATING A KNOWLEDGE-BASED SYSTEM
WITH AN ARBITRARY RELATIONAL DATABASE SYSTEM, U.S. Pat. No. 4,930,071
issued May 29, 1990 and assigned to IntelliCorp, Inc. of Mountain View,
Calif. In static-type systems, objects can be extended to handle concepts
such as relationships and inheritance, but they must be manually extended
if they are to model complex real world structures. This limits their
usefulness to building relatively simple object models from existing data,
such as those used in rapidly building prototype systems. It is believed
that there are commercial systems which use the static-type class
approach. Among the candidates include "ProKappa" from IntelliCorp,
"DB.H++" from Rogue Wave of Corvallis, Oreg., and possibly "Open ODB" from
Hewlett Packard Company of Cupertino, Calif. and "UniSQL from UniSQL of
Austin, Tex.
SUMMARY OF THE INVENTION
According to the invention, a method and apparatus are provided for using
an object model of an object-oriented application to automatically map
information between an object-oriented application and a structured
database, such as a relational database. This is done by taking into
account all of the semantics (implications) of an object model, such as
inheritance and relationships among object classes, and using these
semantics to generate a minimal set of routines for each object class that
manipulate the object and other objects to which it is related or from
which it inherits. The generated routines, when executed (that is, when
converted to an executable form which is then executed), provide
transparent access to relational data or other field-delimited data.
Object classes and routines generated using the method encapsulate all the
details of database access, such that developers (computer programmers)
can write object-oriented applications using those object classes without
any explicit reference to or knowledge of the underlying database or its
structure. By working with the objects, the user of such applications
transparently manipulates the database without needing to know anything of
its structure. Applications can be written using the object classes to
transparently integrate information from multiple databases.
The method of the invention comprises accepting a user-defined object model
as a "blueprint" for an object-oriented application; accepting or
constructing a schema of the structure of data in a database; and
accepting or constructing a transform defining the mapping between the
database schema and the object model. Based on these inputs the method
automatically generates source code routines for each object class to
perform four tasks: to create, retrieve, update, and delete instances of
the object class and automatically make the corresponding changes in the
database. These source code routines can subsequently be executed.
The invention will be better understood by reference to the following
detailed description in connection with the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram of a computer system in accordance with the
invention.
FIG. 2 is a schematic diagram representing the correspondence between a
database schema and an object model by means of a transform.
FIG. 3 is a flow chart representing an overview of the method steps.
FIG. 4 is a flow chart representing the process for constructing the
database schema and transform.
FIG. 5 is a flow chart representing the process for writing code which when
executed creates an object instance and its corresponding structured
information in the database.
FIG. 6 is a flow chart representing the process for writing code which when
executed retrieves an object instance base on its corresponding structured
information in the database.
FIG. 7 is a flow chart representing the process for writing code which when
executed updates an object instance and its corresponding structured
information in the database.
FIG. 8 is a flow chart representing the process for writing code which when
executed deletes an object instance and makes corresponding changes to
structured information in the database.
DESCRIPTION OF A SPECIFIC EMBODIMENT
Following is a description of a specific embodiment of the method of the
present invention. Section 1 sets forth terminology that is used in the
remainder of the description. Section 2 provides a description of a
computing system that can be used to support the steps of the method.
Section 3 describes the inputs to the method. Section 4 describes an
overview of the method steps. Sections 5 and 6 give more detailed
descriptions of specific method steps. Section 7 concludes the
description.
1. Terminology
It is helpful to clarify the general meanings of terms used in connection
with object-oriented systems.
An "object class" is a set of data (attributes) and functional capabilities
(routines) encapsulated into a single logical entity. For example, an
employee class may be characterized by a telephone number attribute and a
"hire.sub.13 employee" routine.
An "object instance" is an embodiment (instantiation) of an object class.
Instances are differentiated from one another by their attribute values,
but not their routines (capabilities). For example, Jane Smith may be a
first person-object instance and John Doe may be a second person-object
instance. The term "object" is often used by itself to refer loosely to
either an object class or an object instance, the difference being
understood in context.
An "object-oriented application" is an operational computer program which
when employed on an appropriate computer system uses a set of object
instances that work in cooperation to perform useful work. For example, an
object-oriented application could be built to manage personnel records for
a company, including such operations as hire new employee or add an
employee to a department.
An "object model" is a set of object classes that together form a blueprint
for building an object-oriented application. Each object class of an
object model can have attributes, inheritances, and relationships.
A "relationship" defines a link between two object classes. For example, an
employee class may be related to the department class Each specific
employee for example, "Jane Smith," would have a relationship with a
specific department, such as "engineering." Relationships can be
one-to-one, one-to-many, or many-to-many. An example of a one-to-one
relationship can be a relationship between employee and parking place such
that each employee can have a single parking place. An example of a
one-to-many relationship can be a relationship between department and
employee such that each department can employ multiple employees. An
example of a many-to-many relationship can be a relationship between
employee and project such that each employee serves on multiple projects,
and each project consists of multiple employees.
"Attributes" are data elements of object classes which are expressed
through particular values in object instances. For example, a person class
can have the attribute "name", and a particular person instance can have
the name value "Jane Smith."
An "object ID" is used to uniquely identify each object instance. The
object ID can generated in one of two ways. It can be generated by the
application, which can automatically assign a unique object ID for each
new object instance. Alternatively it can comprise a set of attributes
that are guaranteed in the object model to always form a unique set of
values for an instance. In this case, the create routine will require a
unique set of attributes in order to create a new object instance.
A "routine" is a functional capability associated with an object class. For
example, the routine "hire.sub.13 employee" could be used to create a new
employee instance.
"Inheritance" represents a specialization of an object class in which the
specialized class shares all of the attributes and routines of parent
classes. Thus the employee class can inherit certain attributes, such as
name, from the person class. In this case, the person class is called the
"parent" of the employee class, and the employee class is called the
"child" of the person class.
Inheritance can extend across many object class "generations." For example,
the object class "snow tire" can inherit from the object class "tire"
which in turn can inherit from the object class "car.sub.-- part". In this
example, "car.sub.-- part" is a parent of the object class "tire" and an
ancestor of the object class "snow tire".
Inheritance can be "vertical" (concrete) or "horizontal" (abstract)
according to how the information corresponding to inherited attributes is
stored in the database. In the case of vertical inheritance between two
object classes in an object model, the database contains data associated
with each object class. In the case of horizontal inheritance between two
object classes in the object model, the database does not contain data
associated with each object class. For example, suppose that there are two
object classes, "and that "employee" inherits "person" and "employee"
inherits from "person." If this inheritance is vertical, then there can be
a "person" table in the database which contains the attributes for each
"person". If the inheritance is horizontal, there is no "person" table in
the database. All the attributes of "person" are found in the
"employee.sub.-- data" table. Horizontal and vertical inheritance can be
mixed within the same object model.
The attributes, inheritances, and relationships of all the object classes
of an object model are called the "semantics" or "semantic elements" of
the object model. An object model contains certain information associated
with its semantics. For each attribute, the object model contains
information as to whether that attribute is to be associated with the
object | | |