Modeling of object-oriented database structures, translation to relational database structures, and dynamic searches thereon6374252Abstract A method and system for modeling of object-oriented database structures, translation to relational database structures, and dynamic searches thereon. The user may create, edit and manipulate a user's object database (dynamically translated into a set of relational database structures), to create, edit and manipulate objects for that object database (dynamically translated into data for those relational database structures), and to create, edit and manipulate queries to be applied to that object database (dynamically translated into queries to be applied to those relational database structures). A meta-model of the user's object database, which is itself an object database, and which has itself been translated into a set of relational database structures for manipulation by a relational database engine. The meta-model comprises a set of classes, objects, and relationships between classes which model the classes and relationships between classes of the system. Each of these classes may comprise a set of searchable properties, and each of these relationships may comprise an inheritance relationship (between a base class and a derived class) or a data-model relationship (such as a one-to-one, one-to-many, or many-to-many relationship). The data model of the user's object database is modeled by actual objects in the meta-model, and editing or manipulating the user's object database is modeled by creating, modifying, or deleting objects in the meta-model. The meta-model also models itself, in the same manner as it models the user's object database, and may be manipulated in the same manner as the user's object database. Claims We claim: Description BACKGROUND OF THE INVENTION
TABLE 3-1
Class Description of Object in Class
Class class modeled by the meta-model
Class Link cross-link class between parent/child
classes
Pointer Class Property searchable property modeled by a pointer
to another class, having a delete, in-
sert, and update rules associated with
the pointer
Pointer Valid Class relationship between pointing object and
object of target class
Class Property searchable property modeled by the meta-
model, having built-in type of value
Property Group related group of properties
Logical Datatype Definition logical data type for property
Enumerated Valid Value set of enumerated valid values for prop-
erty
Range Valid Value range of valid values for property
Unit of Measurement unit of measurement for property
Unit Conversion Formula formula for converting between source and
target unit of measurement
Class Property Function member function defined for a class prop-
Operation erty
Class Function Operation member function defined for a class
Custom Function Definition user-specified function
External Access Function function which calls on the operating
Operation system
Formula algebraic formula
Configuration description of how an object is dis-
played, such as a configuration for edit-
ing an object
Search Panel Configuration configuration for a search
Results Panel Configuration configuration for displaying search re-
sults
The user's object database 100 comprises a set of classes 101. In the meta-model 220, each class of the user's object database 100 is modeled by an object of class Class 301. In a preferred embodiment, each object of class Class 301 comprises information in table 3-2.
TABLE 3-2
Property Description
Object ID unique ID for this object
Class Label name to be displayed for the class
Class DB Name unique name for the class to be used in
the user relational database
Class Group indicates whether the class is part of
the meta-model, a predefined class pro-
vided by the system, such as for graphics
or permissions, or a user class
Class Type indicates whether the class is part of
the meta-model, a cross-link class, a
base class created for the sole purpose
of grouping derived classes under a sin-
gle "folder" name, or any other class
created by the user
Is System Specific TRUE if this class is part of the system
Number of Objects number of objects currently in this class
Number of DB Blocks number of database blocks currently used
by this class
Max # of Objects maximum number of objects expected for
the class
Class Description description of the class, for user con-
venience
Pending Operation indicates the next operation pending for
the class, e.g., create relational table,
modify relational table, recreate rela-
tional table, or no action pending
Action indicates an action being taken for this
class, e.g., executing the "Pending Op-
eration", altering display configuration,
refreshing an Oracle "view", counting the
number of objects in the class, or no ac-
tion being taken
The property 102 "Class DB Name" is generated by the system 200, and is preferably required to satisfy name restrictions imposed by the relational database engine 240, such as being limited to a certain length or to having only certain characters. The "Class DB Name" is used by the system 200 for generating SQL commands for accessing relational structures corresponding to this class 101, such as the SQL commands 232, 233, and 261. In a preferred embodiment, the user 201 may override the "Class DB Name" generated by the system 200, but must still satisfy the name restrictions imposed by the relational database engine 240. The properties 102 "Class Group", "Class Type", and "Is System Specific" maintain information about the purpose of the class 101 in the system 200. If the user 201 modifies a class 101 which is critical to operation of the system 200, such as a class 101 which is part of the meta-model 220, the system 200 warns the user 201 and requests confirmation that the action is truly intended. The property 102 "Max # of Objects" is provided by the user 201, although this property 102 does not impose a hard limit of any kind, and is just a suggestion by the user 201, and the system 200 preferably provides a default value and a procedure for extension when the number of objects exceeds this property value. The properties 102 "Number of Objects" and "Number of DB Blocks" are provided by the system 200. These properties 102 are used for improving the system's efficiency in creating or searching tables using the relational database engine 220, as shown herein with reference to FIG. 9. The properties 102 "Pending Operation" and "Action" maintain information about the status of the class 101 with regard to its representation in the relational database 250. If there is more than one user 201 simultaneously using the system 200 (this is the preferable operation of the system 200), it may occur that more than one user 201 attempts to simultaneously modify the same class 101. The system 200 uses these properties 102 to assure that such attempts do not cause any class 101 to enter an inconsistent state. Those skilled in the art of database systems will recognize that there are many known techniques for maintaining database integrity despite simultaneous updates of a database system, and will recognize, after perusal of this application, that application of such techniques to the system 200 would not require either invention or undue experimentation. Parent/Child Classes In the user's object database 100, each class comprises zero or more parent classes (base classes from which that class is derived), and zero or more child classes (derived classes for which that class is a base class). In the meta-model 220, each object of class Class 301 may have zero or more parent objects of class Class 301, and may have zero or more child objects of class Class 301. These many-to-many parent/child class relationships 103 are represented using a cross-link class Class Link 302. Each object in the class Class Link 302 links a child class 101 to a parent class 101. A child class 101 may have more than one parent class 101 due to multiple inheritance. In a preferred embodiment, each object of class Class Link 302 comprises information in table 3-3.
TABLE 3-3
Property Description
Object ID unique ID for this object
Parent Class object ID for parent class
Child Class object ID for child class
Distributed DB Node node in a distributed database for which
this object is a link
The searchable property 102 "Distributed DB Node" identifies a node in a distributed database. When an object of class Class Link 302 has a link to another node in a distributed database, the searchable property 102 "Distributed DB Node" for that object is set to identify the other node, and the system 200 responds to that link by attempting to spawn a related process at the linked-to node. Thus, the user 201 can perform relational database JOIN operations, and cascade searches, across multiple nodes of a distributed relational database 250. When the user 201 creates a derived class 101, or alters the base/derived status of a class 101, the system 200 creates or edits an object of class Class Link 302 to model the base/derived relationship. Searchable Properties The user's object database 100 comprises a set of searchable properties for each class. Searchable properties may comprise data values which are "built-in" data types, such as integers and floating-point numbers, or may comprise data values which are themselves user-defined data types, represented as objects in user-defined classes. In the meta-model 220, searchable properties comprising built-in data types are represented by a class Class Property 303, while searchable properties comprising user-defined data types (implemented by pointers to objects of the user-defined data types) are represented by a class 101 Pointer Class Property 304. The class Class 301 has a relationship 103 to the class Pointer Class Property 304 which links a class 101 to its searchable properties with user-defined data types. The class Pointer Class Property 304 has a relationship 103 to the class Pointer Valid Class 305, and the class Pointer Valid Class 305 has a relationship 103 to the class Class 301, which link a searchable property 102 with a user-defined data type to the class 101 defining that data type. Searchable Properties: User-Defined Datatypes The class Pointer Class Property 304 includes one object for each searchable property 102 for any object of class Class 301 having a user-defined data type, and each object of class Class 301 may have zero or more associated objects of class Pointer Class Property 304. Each object of class Pointer Class Property 304 has a pointer to an object of the user-defined type; the pointer is an object of class Pointer Valid Class 305. In a preferred embodiment, each object of class Pointer Class Property 304 comprises information in table 3-4
TABLE 3-4
Property Description
Object ID unique ID for this object
Pointer Property Label name to be displayed for the property
Pointer Property DB Name unique name for the property to be used
in the user relational database
Display Order order this property is displayed relative
to others within its class
Is Owned by Target TRUE if this property inherits permission
from the class it points to
Is Value Required TRUE if value cannot be null
Is Column Indexed TRUE if column for this property is in-
dexed in the user relational database
Column Index Type type of index in the relational database
Is Derived Externally TRUE if generated by system
Relational Meaning relational meaning of property in the
user relational database, e.g., primary
key, internal key, description
Configuration Info indicates when this property is dis-
played: for searches, for search results,
for both, or for neither
Insert Update Rule rule to follow when inserting or updating
new objects having this property, e.g.,
disallow updates if there are related ob-
jects, cascade update to any related ob-
jects, or set pointer to null on update
of related objects
Delete Rule rule to follow when deleting objects hav-
ing this property, e.g., disallow dele-
tion if there are related objects, cas-
cade deletion to any related objects, set
pointer to null on deletion of related
objects, or set pointer to default value
on deletion of related objects
Pending Operation indicates the next operation pending for
the property, e.g., alter relational da-
tabase dictionary, or no action pending
Number of DB Blocks number of database blocks used by the re-
lational column for this property
Row Selectivity measure of distribution of values in the
relational column for this property
Block Selectivity measure of distribution of values, at DB
block level
Pointer Description description of the property, for user
convenience
Similar to the property 102 "Class DB Name", the property 102 "Pointer Property DB Name" is generated by the system 200, and is preferably required to satisfy name restrictions imposed by the relational database engine 240, such as being limited to a certain length or to having only certain characters. The "Pointer Property Class DB Name" is used by the system 200 for generating SQL commands for accessing relational structures corresponding to this property 102, such as the ESQL commands 232, 233, and 261. In a preferred embodiment, the user 201 may override the "Pointer Property DB Name" generated by the system 200, but must still satisfy the name restrictions imposed by the relational database engine 240. The properties 102 "Display Order" and "Configuration Info" are merely default values for the property 102, and may be overridden by the user 201 for specific display configurations or searches. The properties 102 "Number of DB Blocks", "Row Selectivity" and "Block Selectivity" are computed by the system 200. These properties 102 are used for improving the system's efficiency in searching tables using the relational database engine 220. In a preferred embodiment, each object of class Pointer Valid Class 305 includes information in table 3-5.
TABLE 3-5
Property Description
Object ID unique ID for this object
Valid Class Description description of the relation between the
pointing and target classes, e.g., in
"part is-manufactured-by manufacturer",
the Valid Class Description would be `is-
manufactured-by`
Each object of class Pointer Valid Class 305 links an object of class Pointer Class Property 304 to a target class 101. Searchable Properties: Built-In Datatypes The class Class Property 303 includes one object for each searchable property 102 for any object of type class having a built-in data type, and each object of class Class 301 may have zero or more associated objects of class Class Property 303. Each object of class Class Property 303 has a value. In a preferred embodiment, each object of class Class Property 303 comprises information in table 3-6
TABLE 3-6
Property Description
Object ID unique ID for this object
Property Label name to be displayed for the property
Property Data Type indicates data type this property is
stored as: boolean, character, date, in-
teger, monetary, numeric, or timestamp
Property DB Name unique name for the property to be used
in the user relational database
Display Order order this property is displayed relative
to others within its class
Display Type indicates data type this property is dis-
played as: boolean, character, date, in-
teger, monetary, numeric, or timestamp
Display Length space allocated to displaying this prop-
erty
Display Precision number of digits for displaying this
property
Case Style for text values only, either always lower
case, always upper case, case insensi-
tive, or case sensitive
Visible Rows number of rows for displaying this prop-
erty
Relational Meaning relational meaning of property in the
user relational database, e.g., primary
key, internal key, description
Configuration Info indicates when this property is dis-
played: for searches, for search results,
for both, or for neither
Default Value value when not specified by the user
Is Value Required TRUE if value cannot be null
Is Column Indexed TRUE if column for this property is in-
dexed in the user relational database
Column Index Type type of index in the relational database
Valid Value Type indicates if value is restricted to cer-
tain valid values, e.g., enumerated valid
value or range valid value
Is Derived Externally TRUE if generated by system
Is Comma Displayed for numeric values only, TRUE if a comma
is displayed to separate thousands
Is Scientific Notation for numeric values only, TRUE if dis-
played in scientific notation
Pending Operation indicates the next operation pending for
the property, e.g., alter relational da-
tabase dictionary, or no action pending
Number of DB Blocks number of database blocks used by the re-
lational column for this property
Row Selectivity measure of distribution of values in the
relational column for this property
Block Selectivity measure of distribution of values, at DB
block level
Property Description description of the property, for user
convenience
Similar to the property 102 "Class DB Name", the property 102 "Property DB Name" is generated by the system 200, and is preferably required to satisfy name restrictions imposed by the relational database engine 240, such as being limited to a certain length or to having only certain characters. The "Property Class DB Name" is used by the system 200 for generating SQL commands for accessing relational structures corresponding to this property 102, such as the SQL commands 232, 233, and 261. In a preferred embodiment, the user 201 may override the "Property DB Name" generated by the system 200, but must still satisfy the name restrictions imposed by the relational database engine 240. The properties 102 "Display Order", "Display Type", "Display Length", "Display Precision", "Visible Rows" and "Configuration Info" are merely default values for the property 102, and may be overridden by the user 201 for specific display configurations or searches. The properties 102 "Number of DB Blocks", "Row Selectivity" and "Block Selectivity" are computed by the system 200. These properties 102 are used for improving the system's efficiency in searching tables using the relational database engine 220. A class Property Group 306 includes one object for each type of searchable property 102, and each object of class Class Property 303 may have zero or more associated objects of class 101 Property Group 306. Each object of class Property Group 306 has a group name. The class Class Property 303 has a relationship 103 to the class Property Group 306 which links a group of properties into a single folder class 101. Searchable Property Data Values In the user's object database 100, a searchable property 102 of the class Class Property 306 may have a specific logical data type, such as integer or floating point. In the meta-model 220, a class Logical Datatype Definition 307 includes one object for each logical data type, and each object of class Class Property 303 is associated with no more than one object of class Logical Datatype Definition 307. In a preferred embodiment, each object of class Logical Datatype Definition 307 comprises information in table 3-7.
TABLE 3-7
Property Description
Object ID unique ID for this object
Logical Datatype Name name to be displayed for the data type
DBMS Data Type name of data type as defined by rela-
tional database engine
DBMS Data Type Length length of data type as defined by rela-
tional database engine
Data Storage Precision maximum number of digits to right of
decimal point
Datatype Description description of the data type, for user
convenience
In the user's object database 100, a searchable property 102 of the class Class Property 303 may have its value restricted to a specific range or to a specific set of enumerated values. In the meta-model 220, a class Enumerated Valid Value 308 includes one object for each set of enumerated valid values, and each object of class Class Property 303 is associated with zero or more objects of class Enumerated Valid Value 308. Similarly, a class Range Valid Value 309 includes one object for each set of range valid values, and each object of class Class Property 303 is associated with zero or more objects of class Range Valid Value 309. In a preferred embodiment, each object of class Enumerated Valid Value 308 comprises information in table 3-8.
TABLE 3-8
Property Description
Object ID unique ID for this object
Enumerated Value valid lookup value
Valid Value Name name for valid lookup value
Cascade Flag TRUE if valid lookup value is cascaded to
derived classes
The property 102 "Cascade Flag" describes whether, when the object of class Enumerated Valid Value 308 is associated with a property 102 for a base class 101, whether the enumerated valid values are cascaded to the same property 102 for objects of derived classes 101 which are derived from that base class 101. For example, in the example user's object database 100 shown in FIG. 1, the user 201 may specify a searchable property 102 "Serial Number" for the class 101 component, and may specify a set of enumerated valid values for the class 101 component. Although this searchable property 102 "Serial Number" is inherited by each derived class 101 of the base class 101 component, such as the class analog component and the class 101 memory, the user 201 may desire that these derived classes 101 have distinct sets of enumerated values for their own serial numbers. The class Enumerated Valid Value 308 has a first relationship 103 with the class Class 301 and has a second relationship 103 with the class Class Property 303. In a preferred embodiment, each object of class Range Valid Value 309 comprises information in table 3-9.
TABLE 3-9
Property Description
Object ID unique ID for this object
Minimum Value minimum valid value
Maximum Value maximum valid value
Default Value default value if none specified
Cascade Flag TRUE if valid lookup value is cascaded to
derived classes
Similar to the property 102 "Cascade Flag" for the class Enumerated Valid Value 308, the property 102 "Cascade Flag" describes whether, when the object of class Range Valid Value 309 is associated with a property 102 for a base class 101, whether the range of valid values are cascaded to the same property 102 for objects of derived classes 101 which are derived from that base class 101. For example, in the example user's object database 100 shown in FIG. 1, the user 201 may specify a searchable property 102 "Serial Number" for the class 101 component, and may specify a range of valid values for the class 101 component. Although this searchable property 102 "Serial Number" is inherited by each derived class 101 of the base class 101 component, such as the class analog component and the class 101 memory, the user 201 may desire that these derived classes 101 have distinct ranges of values for their own serial numbers. The class Range Valid Value 309 has a first relationship 103 with the class Class 301 and has a second relationship 103 with the class Class Property 303. Units of Measurement In the user's object database 1001 a searchable property 102 of the class Class Property 303 may have its value expressed in a designated unit of measurement. In the meta-model 220, a class Unit of Measurement 310 includes one object for each unit of measurement, and each object of class Class Property 303 is associated (for display) with at most one objects of class Unit of Measurement 310, and is also associated (for storage) with at most one objects of class Unit of Measurement 310. In a preferred embodiment, each object of class Unit of Measurement 310 comprises information in table 3-10.
TABLE 3-10
Property Description
Object ID unique ID for this object
UOM Name name of the unit of measurement
UOM Display Symbol symbol to be displayed for the unit of
measurement, e.g., "mg"
UOM Description description of the unit of measurement,
for user convenience
In the user's object database 100, a first unit of measurement may be converted to a second unit of measurement. For example, to convert volts to millivolts, multiply by 1,000. In the meta-model 220, a class Unit Conversion Formula 311 includes one object for each formula for converting units of measurement, and each object of class Unit Conversion Formula 311 is associated (for source units) with zero or more objects of class Unit of Measurement 310, and is also associated (for target units) with zero or more objects of class Unit of Measurement 310. Custom Functions Custom functions provide a technique for dynamic modification of objects in the system 200, including objects in the meta-model 220. Those custom functions are triggered by insertion events, modification events, and deletion events. The user 201 specifies the actual changes performed by the system 200 when custom functions are invoked. The meta-model 220 comprises several additional classes 101 embodying objects for computation, class Class Property Function Operation 312, class Class Function Operation 313, class Custom Function Definition 314, class External Access Function Operation 315, and class Formula 316. The class Unit Conversion Formula 311 has a first relationship 103 with the class Unit of Measurement 310 for a source unit of measurement, a second relationship 103 with the class Unit of Measurement 310 for a target unit of measurement, and a relationship 103 with the class Formula 316 for the conversion formula. An object of class Formula 316 comprises an algebraic formula, and includes a formula name, an addend, a multiplier, an add/multiply rule (add, multiply, add then multiply, or multiply then add), and a formula description. Objects of class Class Property Function Operation 312 and of class Class Function Operation 313 comprise information about functions to be performed in addition to, or in place of, an operation for the relational database 250, and includes an operation sequence (e.g., defined in terms of calls on the operating system), and a DBMS operation which the custom function adds to or substitutes for. An object of class Custom Function Definition 314 comprises information about a custom function, and includes a function name, a version number, a function description, a flag to force execution of the custom function when an object of a class 101 related to the custom function is created, and a flag to override a custom function for a base class 101 when an object of a derived class 101 is created. A custom function adds or overrides a class member function, for a class 101 or an object in a class 101, and may be specified to override the class member function either before or after the class member function's ordinary operation. An object of class External Access Function Operation 315 comprises information about a function for accessing an object which is external to the system 200, such as a file system object, an external database, or another object accessed by calls on the operating system. Class Information Display In a preferred embodiment, a class Class Configuration 320 includes one object for each description of a display configuration of a class 101 in the user's object database 100. Each object of class Class Configuration 320 is related to zero or more objects of class Search Pane Configuration 321, a class 101 including one object for each display configuration for searches on the class 101, and is related to zero or more objects of class Result Pane Configuration 322, a class 101 including one object for each display configuration for results of searches on the class 101. In a preferred embodiment, each object of class Search Pane Configuration 321 and each object of class Result Pane Configuration 322 comprises information in table 3-11.
TABLE 3-11
Property Description
Object ID unique ID for this object
Display Type data type for display of the field
Display Width maximum display width for the field
Display UOM unit of measurement for display
Row Order relative order for displaying row
Column Order relative order for displaying column
Custom Label label for displaying the field
Each object of class Search Pane Configuration 321 and each object of class Result Pane Configuration 322 is also associated with zero or more objects of class Class 301 and with zero or more objects of class Class Property 303, to define the classes and class properties to be displayed. Access Control FIG. 4 shows a data model diagram of a set of classes for modeling access control for the user's object database. In a preferred embodiment, the set of classes shown in FIG. 4 are predefined for the system 200. However, unlike the meta-model 220, these classes 101 are provided for convenience in modeling access control, and are not strictly required for modeling, translation, or searching the user's object database 100. A class Root 401 is a base class 101 for all classes 101. In a preferred embodiment, the class Root 401 has only a few searchable properties which are generic to all objects in the system 200, such as a signature of the last creator or last modifier of the object, a timestamp, an is-private flag for indicating whether the object is private to a particular user 201, and a template identifier, if the object is a member of a class template. The class Root 401 is provided so that relationships 103 with the class Root 401 are inherited by all classes 101. An object of class User 402 represents an individual user of the system 200, and includes information about the user, such as a user name, user password (possibly encoded for security), "super user" status, mailing address, telephone number, and accounting information such as who is responsible for user charges. An object of class User Group 403 represents a group of users of the system 200, all having similar access control rights. User groups form a parent/child hierarchy (more precisely, a directed acyclic graph) like the parent/child relationship of classes 101. The class User Group 403 has a many-to-many relationship with itself using the cross-link class User Group to User Group 404, which represents the user group parent/child hierarchy. The class User 402 and the class User Group 403 have a many-to-many relationship using the cross-link class User to User Group Link 405, which represents zero or more users' membership in zero or more user groups. Access control is provided by two features. The first feature is ownership of a class property or an individual object, which ownership is by a user group or a user. (A user group may also own an entire class.) The second feature is edit permissions for a class or an individual object, which edit permissions are by a user group or a user. Ownership is represented by the cross-link class User Group to Class Ownership 406, the cross-link class User Group to Class Property Ownership 407, the cross-link class User Group to Object Ownership 408, the cross-link class User to Class Property Ownership 409, and the cross-link class User to Object Ownership 410. Ownership is thus a many-to-many relationship which links classes, class properties and objects with their user group and user owners. Edit permissions are represented by the class User Group to Class Object Edit Permission 411, the class User Group to Object Edit Permissions 412, the class User to Class Object Edit Permission 413, and the class User to Object Edit Permission 414. Edit permissions are also a many-to-many relationship which links class properties and objects with user groups and users having permissions, except that for each such relationship the specific edit permissions are listed in an edit permissions object. Graphical Information Display FIG. 5 shows a data model diagram of a set of classes for modeling predefined graphical information display for the user's object database. In a preferred embodiment, the set of classes shown in FIG. 5 are predefined for the system 200. However, unlike the meta-model 220, these classes 101 are provided for convenience in modeling predefined graphical information, and are not strictly required for modeling, translation, or searching the user's object database 100. An object of class Graphics 501 comprises information about a predefined graphics object. The class Graphics 501 is related to the class Root 401 by a cross-link class Graphics to Object Link 502, defining a many-to-many relationship in which any object may be sharably attached to any graphics object, and any graphics object may be sharably attached to any object. The class Graphics 501 is also related to the class Root 401 by a many-to-one relationship 103, in which a graphics object may be a non-shared attachment of any object. An object of class Alias Variable 503 comprises information about a file accessible using the operating system. The class Graphics 501 is related to the class Alias Variable 503 by several many-to-one relationships 103, one each for files used by the operating system to implement the graphics object. Similarly, an object of class Binary Large Object 504 comprises a binary large object implemented by the operating system, and is associated with zero or more graphics objects. The class Graphics 501 is also related to the class User 402 by a many-to-one relationship 103, in which a graphics object may be "checked out" or "checked in" (as a library book) by a user. When a graphics object is "checked out," no other user 201 of the system 200 is allowed to access that graphics object until it is "checked in" again. This allows the user 201 to check out a graphics object, atomically update it, and check the graphics object back in, when it will again be available to other users 201. An object of class Locale 505 comprises a logical location, such as a country. Zero or more locations may be related to a currency, represented by an object of class Unit of Measurement 310, and to an object of class Timezone 506. An object of class Locale 505 includes a language identifier, a currency symbol and its placement, numeric formats (e.g., a digit separator, a date format, a time format, a radix point), and words for "false" and "true". Zero or more users may be associated with a single locale. An object of class Information Text 507 comprises textual information about any object. The class Information Text 507 is related to the class Root 401 by a many-to-one relationship 103, in which textual information may be attached to any object. An object of class Information Text Type 508 comprises a type descriptor for textual information (e.g., "e-mail" or "memo"). The class Information Text Type 508 is related to the class Information Text 507 by a many-to-one relationship 103. The system 200 also provides a "note" which may be attached to each object. If the textual information to be associated with an object is short, e.g., just a few lines of text, the user 201 may simply add a "note" to the object, such as a short comment or reminder. This feature saves the user 201 having to create a searchable property 102 for notes to be associated with the object. An object of class Activation 509 comprises an activation class for users, such as "subscription". The class User 402 has a many-to-many relationship with the class Activation 509 using the cross-link class Activation to User Link 510. Similarly, the class User Group 403 has a many-to-many relationship with the class Activation 509 using the cross-link class Activation to User Group 511. In a preferred embodiment, the system 200 also provides that some or all attachments are stored in a central location that is not accessible by other applications running under control of the same operating system (unless those other applications are launched from within the system 200). Building and Editing a Data Model FIG. 6 shows a flow diagram of a process for building and editing a data model of the user's object database. At a flow point 600, the user 201 desires to build or edit the user database model 230. In a preferred embodiment, the system 200 provides a facility for atomic transactions, using a "transaction begin" command and a "transaction end" command, to be invoked by the user 201. When the user 201 invokes the "transaction begin" command, all changes to the user database model 230 or to the relational database 250 are collected, and committed in one atomic operation when the user 201 invokes the "transaction end" command. This feature allows the user 201 to protect the user database model 230 and the relational database 250 against partial changes. Although this flow diagram is described with regard to an order in which the system 200 examines the user's commands, in actual practice the user 201 specifies the order in which commands are to be executed, and need not follow the order indicated in this flow diagram. At a step 610, the system determines if the user 201 chooses to build, edit or delete a class 101. If so, the system 200 proceeds to the step 612. Otherwise, the system 200 proceeds to the step 620. At the step 612, the user 201 has chosen to build, edit or delete a class 101. If the user 201 chooses to build a new class 101, the system 200 proceeds to the step 614. If the user 201 chooses to edit an existing class 101, the system 200 proceeds to the step 616. If the user 201 chooses to delete an existing class 101, the system 200 proceeds to the step 618. At the step 614, the system 200 creates a new object of class Class 301 in the meta-model 220. The system 200 provides a capability for the user 201 to select values for the properties 102 of the new object of class Class 301 which has just been created. For some of these properties, such as "Class DB Name", the system 200 generates a default value, but for others, it requires that the user 201 supply a value. The system 200 then returns to the step 610. At the step 616, the user 201 selects an object of class Class 301 in the meta-model 220, and proceeds to edit that object. The system 200 receives editing commands and changes the values for the properties 102 of the object. The system 200 then returns to the step 610. At the step 618, the user 201 selects an object of class Class 301 in the meta-model 220, and proceeds to delete that object. The system 200 removes the object from the meta-model 220, and implements any delete rules, such as deleting the objects of class Class Property 303 which relate to that object of class Class 301. The system then returns to the step 610. At the step 620, the system determines if the user 201 chooses to build, edit or delete a class property 102. If so, the system 200 proceeds to the step 622. Otherwise, the system 200 proceeds to the step 630. At the step 622, the user 201 has chosen to build, edit or delete a class property 102. If the user 201 chooses to build a new class property 102, the system 200 proceeds to the step 624. If the user 201 chooses to edit an existing class property 102, the system 200 proceeds to the step 626. If the user 201 chooses to delete an existing class property 102, the system 200 proceeds to the step 628. (Of course, as class properties 102 are related to classes 101, any of these actions has the effect of editing a class 101.) At the step 624, the system 200 creates a new object of class Class Property 303 in the meta-model 220. The system 200 provides a capability for the user 201 to select values for the properties 102 of the new object of class Class Property 303 which has just been created. For some of these properties, such as "Class Property DB Name", the system 200 generates a default value, but for others, it requires that the user 201 supply a value. The system 200 then returns to the step 610. At the step 626, the user 201 selects an object of class Class Property 303 in the meta-model 220, and proceeds to edit that object. The system 200 receives editing commands and changes the values for the properties 102 of the object. The system 200 then returns to the step 610. At the step 628, the user 201 selects an object of class Class Property 303 in the meta-model 220, and proceeds to delete that object. The system 200 removes the object from the meta-model 220, and implements any delete rules. The system then returns to the step 610. At the step 630, the system determines if the user 201 chooses to build, edit or delete a relationship 103 between classes 101. If so, the system 200 proceeds to the step 632. Otherwise, the system 200 proceeds to the flow point 640. At the step 632, the user 201 has chosen to build, edit or delete a relationship 103 between classes 101. If the user 201 chooses to build a new relationship 103 between classes 101, the system 200 proceeds to the step 634. If the user 201 chooses to edit an existing relationship 103 between classes 101, the system 200 proceeds to the step 636. If the user 201 chooses to delete an existing relationship 103 between classes 101, the system 200 proceeds to the step 638. (Of course, as relationships 103 between classes 101 comprise pointer class properties and are related to classes 101, any of these actions has the effect of editing a class 101.) At the step 634, the system 200 creates a new object of class Pointer Class Property 304 in the meta-model 220. The system 200 provides a capability for the user 201 to select values for the properties 102 of the new object of class Pointer Class Property 304 which has just been created. For some of these properties, such as "Pointer Class Property DB Name", the system 200 generates a default value, but for others, it requires that the user 201 supply a value. The system 200 then returns to the step 610. At the step 636, the user 201 selects an object of class Pointer Class Property 304 in the meta-model 220, and proceeds to edit that object. The system 200 receives editing commands and changes the values for the properties 102 of the object. The system 200 then returns to the step 610. At the step 638, the user 201 selects an object of class Pointer Class Property 304 in the meta-model 220, and proceeds to delete that object. The system 200 removes the object from the meta-model 220, and implements any delete rules. The system then returns to the step 610. At the flow point 640, the user 201 does not desire to build, edit or delete any further objects in the meta-model 220, and the process is complete. Compilation and Translation Process FIG. 7 shows a flow diagram of a process for compilation and translation between object-oriented and relational database structures. At a flow point 700, the user 201 desires to translate the user's object database 100 into the corresponding relational database 203. At a step 710, the user 201, having completed editing the user model 230, triggers the translation process. At a step 720, the system 200 selects a class 101 in the user's object database 100. If there are no more classes 101 to select in the user's object database 100, the system 200 proceeds with the step 740. At a step 730, the system 200 creates a table in the corresponding relational database 203 to correspond to the selected class 101. At a step 740, the system 200 creates a set of specified columns in the table. These specified columns include a column for a unique identifier ("UID") for each object, a column for the "class identifier" for each object, and a column for the "object type" for each object. When an object is populated into the corresponding relational database 203, the system 200 will create a row in the table corresponding to the object's class 101, and in each table corresponding to a base class 101 for the object's class 101. Thus, each object will correspond to one row in each table corresponding to each class 101 which is a base class 101 for the object's class 101. The first column in each table is for the UID for each object. Thus, in each table in which a row is created for the object, the first column corresponds to the UID for the object. This column is preferably selected to be the first, leftmost, column because many relational database engines 240 are optimized to perform indexed searches on that first column. Another column in each table is for the "class identifier" for each object. Because an object corresponds to a row in the table for its class 101 and in each table for a base class 101 for its class 101, it is efficient to record an identifier of what class 101 each object is, in each table for which a row for that object is stored. Another column in each table is for the "object type" for each object. Like the searchable property 102 "Class Type" in the class Class 301, the "object type" column indicates whether this particular object (as opposed to an entire class) is part of the meta-model, or is an object created by the user. At a step 750, the system 200 creates a column in the table for a value for a searchable property 102 for the class 101. If the searchable property 102 has a built-in datatype, the column holds the actual value for that built-in datatype. Otherwise, if the searchable property 102 has a user-defined datatype, the column holds the UID for the object corresponding to the value for that user-defined datatype. At a step 760, the system 200 creates a column in the table for each relationship 103 between the class 101 and a related class 101. In the column for this relationship 103, the system 200 places the UID of the object in the related class 101 which is related to the object in the class 101 for this table. If the relationship 103 is many-to-one, the system creates multiple records in the table for the same object, each with the UID of a different object in the related class 101. At a flow point 770, the compilation and translation process is complete. Sample Target Relational Database FIG. 8 shows a data model diagram of a user relational database corresponding to the sample user's object database of FIG. 1. As described with regard to FIG. 7, the user relational database 230 corresponding to the user's object database 100 comprises a set of relational tables 800, each corresponding to a class 101. Accordingly, in the example of FIG. 1, the system 200 creates a table 800 component, a table 800 analog component, a table 800 memory, a table 800 dynamic memory, a table 800 static memory, a table 800 manufacturer, a table 800 domestic manufacturer, and a table 800 foreign manufacturer. Each such table 800 comprises a set of columns 810 and a set of rows 820. The system 200 creates, for each table 800, a column 810 "Object ID" for the UID of the object, and assures that objects added to each table 800 for derived classes 101 are also added to tables 800 for the base classes 101, with corresponding UIDs. For example, each row 820 added to the table 800 static memory corresponds to a row 820 added to the table 800 memory and corresponds to a row 820 added to the table 800 component, and the UIDs are identical in the column 810 "Object ID" for these three rows 820. The system 200 also creates for the table 800 component a column 810 "name" for the name of the component, for the table 800 memory a column 810 "size" for the size of the component, for the table 800 manufacturer a column 810 "name" for the name of the manufacturer and a column 810 "city" for its city, and for the table 800 foreign manufacturer a column 810 "country" for the country of the foreign manufacturer. The system 200 also creates for the table 800 component a column 810 "manufacturer" for the UID of the manufacturer, identical to the UID of a row 820 in the table 800 manufacturer, thus establishing the relationship 103 between objects of the class 101 component and objects of the class 101 manufacturer. Cascade Searching and Search Translation FIG. 9 shows a flow diagram of a process for cascade searching of an object database and search translation between object-oriented and relational database structures. At a flow point 900, the user 201 desires to perform a cascade search of the user's object database 100. Specifying the Cascade Search At a step 910, the user 201 specifies the cascade search request, i.e., the classes to be cascaded and the properties to be searched in each class. The user interface 210 receives the information from the user 201. To perform this step 910, the system 200 performs the steps 911 through 916 inclusive. At a step 911, the user interface 210 obtains a list of classes 101 in the user database model 230 from the meta-model 220, and presents the list of classes 101 to the user 201 for selection. In an example cascade search using the example user's object database 100 in FIG. 1, the system 200 would present the list of classes 101 available in the user database model 230. At a step 912, the user 201 selects a class 101. The user interface 210 obtains a list of related classes 101 (i.e., classes 101 coupled to the selected class 101 by a relationship 103) in the user database model 230 from the meta-model 220, and their derived classes 101. The user interface 210 presents the list of related classes 101 and their derived classes 101 to the user 201 for selection. In this example cascade search, the user could select the class 101 static memory. The class 101 static memory inherits all the relationships 103 of its parent class 101 memory and all the relationships 103 of its grandparent class 101 component, which includes a relationship 103 with the class 101 manufacturer. At a step 913, the user 201 may select a related class 101 or a class 101 derived from a related class 101. So long as the user 201 continues to select related classes 101 or their derived classes 101, the system 200 continues with the step 912. When the user 201 declines to select any further related classes 101 or their derived classes 101, the system continues with the step 914. In this example cascade search, the user 201 could select the class 101 foreign manufacturer, which is a class 101 derived from the related class 101 manufacturer. At a step 914, for each class 101 selected by the user 201, the user interface 210 obtains a list of searchable properties (and any restrictions on their values) in the user database model 230 from the meta-model 220, and presents the list of searchable properties to the user 201 for selection. In this example cascade search, the system 200 would present the searchable properties 102 "name" and "size" for the class 101 static memory, and would present the searchable properties 102 "name" and "country" for the class foreign manufacturer. At a step 915, the user 201 selects at least one searchable property 102 of the selected classes 101, may specify restrictions on their values, and may continue to select searchable properties 102 of the selected classes 101. So long as the user 201 continues to select searchable properties 102, the system 200 continues with the step 914. When the user 201 declines to select any further searchable properties 102, the system continues with the step 916. In this example cascade search, the user 201 could select the searchable property 102 "name" for the class 101 static memory to be presented, and selected the searchable property 102 "country" for the class 101 foreign manufacturer to be searched, and require that the latter must equal the text string `France`. In a preferred embodiment, the steps 914 and 915 may proceed in parallel with the steps 912 and 913. When the user 201 selects a class 101, the system 200 presents the searchable properties 102 in that class 101 for selection, and also presents the related classes 101 (and derived classes 101) for selection. Instead of responding to a prompt, the user 201 then uses a pointing device to select either a related class 101 (or derived class 101) or a searchable property 102, or selects a command to trigger the cascade search (in the step 916). At a step 916, the user 201 indicates that the cascade search has been fully specified, and triggers the search. The system 200 provides a technique for the user 201 to record the specification of a cascade search, to recall the specification of a previously recorded cascade search, to edit the specification of a cascade search to create a new cascade search, and to apply a previously recorded cascade search to the current relational database 250. In this example cascade search, the user 201 has requested a cascade search for `the names of all static memories made by a manufacturer from France`. Building the Query Model At a step 920, the system 200 parses the cascade search request and builds the query model 260. To perform this step 920, the system 200 performs the steps 921 through 922 inclusive. At a step 921, the system 200 builds a configuration object 991 for the initial class 101 selected by the user 201 to be searched. Each such configuration object 991 represents a single class 101 selected by the user 201, and comprises a first list of searchable properties 102 to be searched, a second list of searchable properties 102 to be displayed in the query result 251, and a third list of classes 101 starting with the initial class 101 selected by the user 201, and continuing with each related class 101 selected by the user 201. At a step 922, the system 200 builds a configuration object 991 for each additional class 101 selected by the user 201 to be searched, and links each such additional configuration object 991 to the configuration object 991 for the initial class 101 selected by the user 201 to be searched. Building the SQL Query At a step 930, the system 200 builds the SQL query 261 in response to the query model 260. To perform this step 930, the system performs the steps 931 through 936 inclusive. At a step 931, the system 200 re-links the configuration object 991 into a list of query model objects 992. Each query model object 992 specifies a single search field or a single result field of the cascade search. At a step 932, the system 200 performs table alias analysis for the query model 260. To perform this step 932, the system 200 examines the list of query model objects 992 and determines if translation of the query model 260 into SQL commands 261 would otherwise cause any table to be joined with itself, e.g., if two or more different columns of the same table appear in the query model 260. If so, the System 200 generates a unique name for an Oracle "alias" for each instance of that table after the first, creates an alias record 993 for each such alias, and attaches the alias record 993 to the list of query model objects 992. The alias record 993 indicates that the alias should be specified and the table referred to using the alias in the SQL commands 261 to be generated. At a step 933, the system 200 performs join analysis for the query model 260. To perform this step 933, the system 200 examines the list of query model objects 992 and determines if translation of the query model 260 into SQL commands 261 would otherwise cause any duplicate join conditions to be specified, e.g., if a first and second table are joined twice using the same join condition. If so, the system 200 selects a single one of the join conditions to be applied, creates a join record 994 for each such join condition, and attaches the join record 994 to the list of query model objects 992. The join record 994 indicates that the single join condition should be specified, and that duplicate join conditions should be omitted, in the SQL commands 261 to be generated. At a step 934, the system 200 performs search condition analysis for the query model 260. To perform this step 934, the system 200 examines the list of query model objects 992 for each of the search conditions shown in table 9-1, creates a condition record 995 for each search condition, and attaches the condition record 995 to the list of query model objects 992.
TABLE 9-1
.smallcircle. Comparison of a searchable property with a numeric value,
represented in the SQL commands using a "WHERE" clause and a
logical comparison of a column in the relational database
250 with that numeric value.
.smallcircle. Comparison of a searchable property with a text string, rep-
resented in the SQL commands using a "WHERE" clause and a
logical comparison of a column in the relational database
250 with that text string. If the text string to be com-
pared comprises "wildcards" (e.g., special characters to in-
dicate matching with one or more arbitrary characters), the
comparison is represented in the SQL commands using the Ora-
cle "LIKE" statement. If the text string to be compared is
case-insensitive, the comparison is represented in the SQL
commands using an Oracle statement for forcing case to upper
case. Other string operations are converted to appropriate
Oracle statements using a conversion table.
.smallcircle. Comparison of a searchable property using a different unit
of measurement, represented in the SQL commands using the
appropriate conversion function for the source and target
units of measurement, as recorded in the meta-model 220.
.smallcircle. Multiple comparisons of multiple searchable properties, or
other boolean operations on comparisons, represented in the
SQL commands using boolean logical operators such as "AND",
"OR", and "NOT".
.smallcircle. Comparison of a searchable property with a group of numeric
or text string values, or a range of numeric values, repre-
sented in the SQL commands using a plurality of comparisons
of the same searchable property with different numeric or
text string values.
In a preferred embodiment, when a cascade search relates to a searchable property 102 having a unit of measurement, the system 200 examines the units of measurement for the searchable property 102 and for the value it is being compared against, and if they are not the same, adjusts the SQL commands 261 to account for different units of measurement. To make this adjustment, the system 200 examines the object of class Class Property 303 for the searchable property 102, and searches the meta-model 200 for the object of class Unit of Measurement 310 associated (as a storage unit of measurement) with that object of class Class Property 303. The system 200 then examines the query model 260, determines the unit of measurement for the cascade search, and searches the meta-model 200 for the object of class Unit of Measurement 310 associated with that unit of measurement. The system 200 then searches the meta-model 200 for the object of class Unit Conversion Formula 311 which converts the first unit of measurement to the second, and inserts a call to that unit conversion formula into the SQL commands 261. At a step 935, the system 200 performs optimization analysis for the query model 260. To perform this step 935, the system 200 examines the query model 260 for each of the optimization conditions shown in table 9-2, and modifies the query model 260 to generate SQL commands 261 according to the optimization techniques shown therein.
TABLE 9-2
Row Selectivity. A value for "Row Selectivity" is computed
by the system for each searchable property, according to the
following formula:
##EQU1##
Row Selectivity is multiplied by 100 to normalize it as a
percentage, and used to determine if the column modeling
that searchable property should be indexed. If the Row Se-
lectivity of a column is more than 70%, the column is almost
always indexed; if the Row Selectivity of a column is less
than 30%, the column is almost never indexed.
Avoiding Sort/Merge. Using multiple indexed columns in a
WHERE clause causes the Oracle RDBMS to perform a sort/merge
operation. As sort/merge operations take substantial time,
the system 200 attempts to replace such constructs with
WHERE clauses which use only one indexed column.
To cause an indexed column to be treated by the Oracle RDBMS
as non-indexed, the value to be searched is changed from the
raw column value, table.column, to a computed value, ta-
ble.column+0 (for numeric values) or table.column.vertline..vertline.''
(for
text string values).
Otherwise, where a column is indexed, the system attempts to
write SQL commands to require the Oracle RDBMS to treat that
column as indexed. When a function or arithmetic operation
is applied to a column value, the Oracle RDBMS does not
treat the column as being indexed. Accordingly, the system
prefers to avoid these constructs. For example, "WHERE fre-
quency = 3000" is preferred to "WHERE frequency/3 = 1000".
Array Fetching. When large numbers of rows are to be se-
lected from a table, the system attempts to fetch those rows
into an array, for faster retrieval.
Search Condition Ranking. When the system prefers a certain
search condition order, for faster retrieval, it may alter
the nature of the search conditions to place them in formats
which cause the Oracle RDBMS to assign search priority in
the order the system prefers.
Table Name Sequence. In a FROM clause, the "driving" table,
i.e., the table which is an intersection table, or the table
with the smaller number of records if there is no intersec-
tion table, is placed at the end of a FROM clause. Other
tables in the FROM clause are ordered similarly.
Condition Predicate Sequence. In a WHERE clause, the
"driving" condition predicate, i.e., the most efficient con-
dition predicate that will return the fewest records, is
placed at the beginning of a WHERE clause. Other condition
predicates are ordered similarly.
Booster Engines. In a WHERE clause, if the selected condi-
tion predicate would cause the Oracle RDBMS to perform a
non-indexed search, a secondary condition predicate is added
to first perform an indexed search and reduce the number of
records to be searched.
For example, the SQL command "SELECT . . . FROM part WHERE
UPPER(part.partnumber) = UPPER( `DM54ALS114AJ`)" would per-
form a non-indexed search because each part.partnumber would
have to be converted to upper case. (This is simply a case-
insensitive search on part.partnumber.) Instead, the system
prefers the SQL command "SELECT . . . FROM part WHERE UP-
PER(part.partnumber) = UPPER( `DM54ALS114AJ`) AND
(part.partnumber LIKE `D%54%114%`)", where all alphabetic
characters except the first have been replaced with Oracle
wildcards in the search text. The LIKE clause is performed
as an indexed search and is thus much faster, and also re-
duces the number of records which must be manipulated and
checked for the case-insensitive comparison.
Table Aliases. The system prefers to use table aliases and
to prefix column names with their aliases whenever there is
more than one table specified in the FROM clause of a SELECT
statement, as this provides for faster parsing time.
Preferred Constructs. Certain SQL statements are preferred
for efficiency, even though their alternatives are function-
ally equivalent. For example, in general, the NOT EXISTS
construct is preferred to the NOT IN construct, the EXISTS
construct is preferred to the DISTINCT construct, the WHERE
construct is preferred to the HAVING construct, and table
joins are preferred to sub-queries.
NOT and OR Operators. The system prefers to avoid WHERE
clauses which use a negated operator, such as NOT EQUALS,
because the Oracle RDBMS performs a non-indexed table scan
in these case.
Similarly, in a WHERE clause which has multiple index predi-
cates separated by logical OR, the most specific index
predicate is placed at the beginning of the WHERE clause.
If the logical OR clause refers to two indexed columns, the
system prefers to use the UNION construct to select all rows
which satisfy either condition predicate.
The SQL commands 261 are dynamically generated in response to the query model 260 and the list of query model objects 992, which are themselves generated in response to the cascade search specified by the user 201. Each cascade search is potentially quite different, so the system 200 first provides for generating SQL commands 261 to perform the cascade search function, and then provides for optimizing those SQL commands 261 so as to perform the search in an efficient manner. Those skilled in the art will recognize, after perusal of this application, that other and further optimizations of SQL commands 261 generated by the system 200 are possible, that such other and further optimizations are within the scope and spirit of the invention, and that such other and further optimizations would not require either invention or undue experimentation. At a step 936, the system 200 examines the query model 260, the list of query model objects 992, the alias records 993, the join records 994, and the condition records 995, and in response, generates SQL commands 261 using the form shown in table 9-3.
TABLE 9-3
"SELECT <result> FROM <tables and aliases>
WHERE <JOIN of tables>
AND <conditions>"
The form in table 9-3 includes a <results> section for specifying the form of the query results 251, a <tables and aliases> section for specifying the tables in the relational database 250 to be searched, a <JOIN of tables> section for specifying how the tables to be searched are joined, and a <conditions> section for specifying additional conditions to be met by those records to be retrieved. There may also be additional SQL statements after the <conditions> section, such as a section for the SQL "GROUP BY", "ORDER BY" or other statements. Information regarding the form of the query results 251 to be presented to the user 201 is inserted in the <result> section of the SQL commands 261. In a preferred embodiment, the information regarding the form of the query results 251 comprises a sequence of columns to be selected (using the SQL "SELECT" statement) from tables in the relational database 250. The sequence of columns to be selected comprises those columns requested by the user 201 when specifying the cascade search. In this example cascade search, the system 200 would generate SQL commands 261 with a result section specifying the class 101 static memory and the searchable property 102 "name". The SQL commands 261 would thus begin with a statement such as "SELECT static_memory.name". Information regarding the tables (and aliases of tables) in the relational database 250 to select data from is inserted in the <tables and aliases> section of the SQL commands 261. In a preferred embodiment, the information regarding the tables and aliases comprises a sequence of tables and aliases of tables to be joined from the relational database 250 into a single joint table to be searched. The choice and order of the tables and aliases to be joined is retrieved from the alias records 992 and the join records 993 created by the system 200. In this example cascade search, the system 200 would generate SQL commands 261 with a result section specifying the class 101 static memory and the searchable property 102 "name". The SQL commands 261 would thus continue with a statement such as "FROM static_memory, memory, component, foreign_manufacturer, manufacturer". Information regarding the conditions to be met is inserted into the <conditions> section of the SQL commands 261. In a preferred embodiment, the information regarding the conditions to be met comprises a sequence of logical operators (using the SQL "WHERE" statement, and using the SQL "AND" statement where there are multiple conditions) which must be met by records selected from the relational database 250. The choice and order of the conditions to be met is retrieved from the condition records 994 created by the system 200. In this example cascade search, the system 200 would generate SQL commands 261 with a condition section specifying the logical conditions required by the user 201, by reference to the searchable properties 102 of the specified classes 101. The SQL commands 261 would thus continue with a statement such as "WHERE (manufacturer.country=`France`)". In addition to logical conditions imposed by the user, the <conditions> section must impose any logical requirements for JOIN of tables 800. There are two types of JOIN, those required by inheritance relationships between classes 101, and those required by data-model relationships 103 between classes 101. As noted with regard to FIG. 8, inheritance relationships are modeled by providing a column 810 "Object ID" in each table 800; when an object of a derived class 101 is created in th | ||||||
