The present invention relates to a hierarchical dictionary creating apparatus, a computer program product, and a method that are used for description and creation of a hierarchical dictionary having a function of inheriting properties from upper classes to lower classes, in compliance with XML schema, Resource Description Framework (RDF), ISO13584/IEC61360, ISO15926 standard, or the like.
This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 2005-276647, filed on Sep. 22, 2005; the entire contents of which are incorporated herein by reference.
A hierarchical database, which is exemplified by an object-oriented database (OODB) and an object relational database (ORDB), has a hierarchical structure in which lower classes inherit properties of upper classes. In such a hierarchical database, the number of properties of the lower classes increases with successions from the upper classes. The successions of the properties of the upper classes to the lower classes are generally called “inheritance,” the feature of which is described in many documents.
In the OODB, a unit of classification of one level is generally called a “class.” On the other hand, in the ORDB, a table that permits the inheritance corresponds to the class in the OODB. Between the tables with a hierarchical relation, the properties are inherited from upper tables to lower tables, in other words, header information of a column constituting an upper table is inherited to a lower table. Data having the same type of property and belonging to a certain class of each level is called an “instance,” and a collection thereof is called a “population.” The population of data is usually stored in a structure called table in a relational database (RDB) or an ORDB. A string of properties making up a table is called a header of the table.
One known hierarchical database is defined by ISO13584 Parts Library Standard (hereinbelow simply referred to as “PLIB” standard), which is an international standard for implementing an electronic catalogue system which electronically providing product information. The “PLIB” standard is an international standard consisting of a plurality of “Parts” and defines a manner of object-oriented description of products library data or parts library data and a semantics for file exchange, in other words, defines what kind of terms, manner of description, and data type are to be employed. Part 42 (Part Issue No. 42) of the PLIB has same contents with the IEC61360-2 (Part Issue No. 2). The standard classifies products in an object-oriented manner, clarifies a group of properties characterizing each class, and realizes a file exchange of the contents corresponding to the class, and therefore, the concept of property inheritance is naturally incorporated herein. Further, since the standard is formulated based on the ISO6523 “Structure for Identification of organizations and organization parts,” with the use of the International Code Designator (ICD) defined by ISO 6523, in particular, an internationally unique identifier can be allocated to each property.
In recent years, systems based on the PLIB standard are proposed, for example, in Japanese Patent Application Laid-Open No. 2004-177996, and Japanese Patent Application Laid-Open No. 2004-178015.
According to the above described PLIB standard, a dictionary in which the property inheritances and imports among classes are described in detail is created in advance.
However, it is troublesome and time-consuming to create such a dictionary in which the property inheritances and imports among classes are described in detail. Also, users need to grasp the specific rules and methods concerning the description of inheritances and the import of each property. Further, there is an increase in the amount of descriptions concerning the property imports in the data dictionary.
According to one aspect of the present invention, a hierarchical dictionary creating apparatus includes an operation file editing unit that edits a logic operation file by adding a new class using an inter-class logic operation, the logic operation file in which the inter-class logic operation is described, the inter-class logic operation being employed in a hierarchical dictionary having inheritance of a property from an upper class to a lower class; an operation file storing unit that stores the logic operation file edited by the operation file editing unit; an operation file determining unit that determines a property to be introduced from an existing class to the new class in the logic operation file stored in the operation file storing unit; a dictionary file outputting unit that outputs the property to be introduced from the existing class to the new class into a hierarchical dictionary file, the property being determined by the operation file determining unit; and a dictionary file storing unit that stores the hierarchical dictionary file.
According to another aspect of the present invention, a method of creating a hierarchical dictionary includes editing a logic operation file by adding a new class using an inter-class logic operation, the logic operation file in which the inter-class logic operation is described, the inter-class logic operation being employed in a hierarchical dictionary having inheritance of a property from an upper class to a lower class; storing the edited logic operation file; determining a property to be introduced from an existing class to the new class in the logic operation file; converting the property to be introduced from the existing class to the new class into a hierarchical dictionary file, the property being determined; and storing the hierarchical dictionary file.
A computer program product according to still another aspect of the present invention causes a computer to perform the method according to the present invention.
The following is a description of preferred embodiments of a hierarchical dictionary creating apparatus, a computer program product for hierarchical dictionary creation, and a hierarchical dictionary creating method in accordance with the present invention, with reference to the accompanying drawings.
A hierarchical dictionary employed in an electronic catalogue system that electronically provides product information will be first described. The hierarchical dictionary is a basis for embodiments.
PLIB standard (ISO13584 Parts Library), which is an international standard for implementing an electronic catalogue system that electronically provides product information, employs a simple tree structure as a hierarchical structure for classification of products and properties thereof. Hence, there is only one upper class (parent class). When the property of class other than the parent class is to be inherited, a special structure is employed for an import (citation) of a property called “Case Of.” This structure can be regarded as a modified version of the multiple inheritance of
In
The contents 111 to 114 of
The class and the property of the dictionary are defined by respective attributes. Here, “attribute” means an information field employed to define detailed information of each class and property. To avoid confusion between the “property” of the class and the “attribute,” the detailed information fields of the class and the property will be referred to as the “attribute” in the description. For each class, as shown in
The attributes define the class and the property based on the PLIB definition thereby determining a format of the content, whether the content can be edited or not (as indicated by “Add,” “Modify,” and “Delete” in
A first embodiment of the preset invention will be described in detail.
When the power of the server 1 is turned on by the user, the CPU 101 starts up a program called loader inside the ROM 102, to read out an operating system (OS) which is a program for managing a hardware and a software of the computer from the HDD 104 to the RAM 103, and starts up the OS. The OS serves to activate a program, read in information, and store information according to a manipulation by the user. Known typical OS are, for example, Windows (registered trademark), and UNIX (registered trademark). A program running on the OS is called an application program. The application program is not limited to those running on a predetermined OS and may be a program that let the OS execute a part of various processing described later. Still alternatively, the application program may be included in a group of program files making up a predetermined application software or an OS.
Here, the server 1 stores the hierarchical dictionary creating program in the HDD 104 as an application program. In this sense, the HDD 104 functions as a storing medium that stores the hierarchical dictionary creating program.
A program installed in the HDD 104 of the server 1 is generally recorded in the storing medium 110 such as an optical disk such as a CD-ROM, or a DVD, various magnetooptical disk, various magnetic disk such as a flexible disk, a media of various recording schemes such as a semiconductor memory, and the program stored in the storing medium 110 is installed into the HDD 104. Here, a portable storing medium 110 such as an optical information recording medium such as a CD-ROM, or a magnetic media such as an FD can be employed as a storing medium that stores a hierarchical dictionary creating program. Further, the hierarchical dictionary creating program may be taken in from outside via the communication controlling device 106, for example, and installed into the HDD 104.
When the hierarchical dictionary creating program running on the OS is started up, the server 1 follows the hierarchical dictionary creating program, and the CPU 101 executes various operations to collectively control the respective units. Among the various operations executed by the CPU 101 of the server 1, characteristic processing of the first embodiment will be described below.
The logic operation file input unit 11 reads in the inter-class logic operation file 18. After the reading-in, the inter-class logic operation file 18 is evaluated by the logic formula evaluating unit 12, and the evaluation results are output to the data model generating unit 13.
The data model generating unit 13 replaces the evaluation results from the logic formula evaluating unit 12 with a PLIB data model. The data model generated by the data model generating unit 13 is output in a PLIB file format (such as ISO10303-21 or a XML file representing the PLIB data model) from the PLIB file output unit 14, and is stored as the PLIB format dictionary file 19 in the RAM 103 or the HDD 104. In this manner, the function of the dictionary file storage unit is realized. The data model generating unit 13 and the PLIB file output unit 14 form the dictionary file output unit.
Meanwhile, the logic formula editor unit 15 edits the inter-class logic operation file 18, using a GUI (Graphical User Interface) that functions as a text or an editor unit. The inter-class logic formula file 18 edited by the logic formula editor unit 15 is output from the PLIB file output unit 14, and is stored in the RAM 103 or the HDD 104. In this manner, the function of the operation file storage unit is realized.
As described above, basically, the inter-class logic operation file 18 is converted so as to generate a new PLIB format dictionary file 19. Alternatively, an existing PLIB format dictionary file 19 is read by the PLIB file input unit 17, and is combined with the information recorded in the inter-class logic operation file 18 already evaluated by the logic formula evaluating unit 12. After the data model generating unit 13 combines the information as a new PLIB data model, the PLIB file output unit 14 outputs a new PLIB format dictionary file 19.
3. Logic Operation File in which Inter-class Logic Operations (Boolean Operations) are Described
Here, the logic operation file 18 in which inter-class logic operations (Boolean operations) are recorded is described in detail.
First, the property combining by inter-class Boolean operations is described. In this embodiment, instead of the inheritance of properties based on the concept of upper and lower classes, and imports (also referred to as “partial inheritance”) of the respective properties according to “Case of”, a new class is defined by a Boolean operation between classes, and a property other than the properties to be inherited is imported.
According to Thomas Jeck, “Set Theory”, Springer Verlag 1997, in the case of mathematical classes, the inter-class Boolean operations are defined as follows. When C1 represents class 1, and Φ1 (x) represents property conditions that should be satisfied by the class 1, the product between the classes (intersection), the sum (union), and the difference (subtraction) are defined by the following expressions (1) through (3), respectively:
C
1
∩C
2
≡{x|Φ
1(x)Φ2(x)} (1)
C
1
○C
2
≡{x|Φ
1(x)Φ2(x)} (2)
C
1
−C
2
≡C
1
∩
C
2
≡{x|Φ
1(x)Φ2(x)} (3)
Here, the property conditions of the class 1 are expressed as:
Φ1(x)≡φ11(x)φ12(x)φ13(x) . . . φ1k(x)
which is a logic product of k constituent properties φ1j(x) (1≦j≦k). Likewise, the property conditions of class 2 can be expressed by rewriting the expression (1) as the logic product of m constituent properties Φ2j(x) (1≦j≦m):
C
1∩C
2
≡{x|φ
11(x)φ12(x)φ13(x) . . . φ1k(x)φ21(x) φ22(x)φ23(x) . . . φ2m(x)} (4)
The logic product of the class 1 and the class 2 is a class that has all the properties of the class 1 and all the properties of the class 2. Hence, all the properties of the other class can be imported through the inter-class Boolean product operation.
The linkage of the logic products of classes can be expressed as:
C
1
∩C
2
∩C
3
≡[C
1
∩C
2
]∩C
3
≡{x|Φ
1(x)Φ2(x)Φ3(x)} (5)
if the properties are independent of one another. When the operation is repeated for other classes, i.e., the class 2, the class 3, and the class 4, sequentially, a class having the properties of a desired number of classes can be generated.
The import of the properties of other classes through Boolean operations can be replaced with the concept of equivalent subclasses, if the logic formula is formed only with a simple product of classes. However, the two concepts are not always equivalent. In other words, a class obtained as a result of a difference operation is not always a subclass of a class, though a difference operation can be included in the description of Boolean formulas.
If a class obviously has instances, in other words, if a class has members, the class is considered to be equivalent to a set, and the Boolean operation is considered to be a set operation. In the inter-class Boolean operations described here, however, attention is focused on the property conditions of classes after the operation, and the operation should not be confused with formulation of set products, set sums, and set differences of members (tuples) in relational algebras that are the bases of SQL, which is widely used for databases. In a relational database, a set operation merely produces a common set, a sum set, and a difference set of the members (tuples) between tables having the same properties. A Join operation which is the only operation between tables having different properties is generally expressed as a direct product. More strictly, however, the Join operation involves an ordered pair of sets of properties contained in two tables. When the Join operation is performed on two tables Ta and Tb, the result will be <Ta, Tb> or <Tb, Ta> depending on the order of the operand tables, and the form of the resulting table is different depending on the order of the operand tables.
On the other hand, when a new class is generated by logical multiplication in the inter-class set operation, C1 ∩C2 and C2∩C1 are generally equal to each other. This is because the two are the combinations of the same properties.
In the set operation, the following relational expressions hold. Since the logic difference expressed as the negation (complement set) of each property in accordance with the expression (3), can be replaced with logic products, the following expressions hold:
C
1
□C
1
=C
1 (61)
C
1
□C
2
=C
2
□C
1 (6-2)
*C1□C2)=C1□(C2□C3) (6-3)
where “□” represents a logic product or a logic sum, and Ci represents a class.
Also, the distributive law is satisfied between a logic product and a logic sum.
(C1∩C2)∩C3=(C1∩C3)∪(C2∩C3) (7)
The new class can be defined as a lower class (in an object-oriented data modeling) of one or more classes of an existing dictionary. However, independent from the concept of property inheritance among classes in the object-oriented data modeling, the new class may be formed below the root of the class tree as a class in which the Boolean formula is recorded as a property of the new class. In such a case, the Boolean formula is performed on one or more classes whose property is to be imported.
Alternatively, the new class may be provided as an “application class” belonging to a different category from the class in the existing reference dictionary (hereinafter referred to as the “reference class”). In any case, the properties to be actually introduced from another class to the new class are determined at the time of evaluation of the Boolean formula recorded as the attribute of the new class, and differ from the direct property inheritance. relation with the simple and multiple inheritances between classes in the object-oriented data modeling.
In brief, it is not essential that all inter-class inheritance relation be described in the data dictionary, or that import information of each property be described in advance. It is sufficient that all the specifications of the properties be clear at the time of input of the instances with respect to the classes for which actual contents creation is performed. Accordingly, when data is actually created based on the data dictionary, or when a template is created for actual data input, the Boolean formulas recorded in the classes in the dictionary may be evaluated, and the properties to be introduced from the class referred to by the formulas in the existing dictionary are determined. The information of the properties is thus collected, and is converted into a data input format in which all the necessary information for data creation and input is combined. The resultant data are displayed and stored, and may be provided for the input of property value by the user. However, in a structure for describing Boolean algebras and logic formulas, or in a program language, logic symbols such as , , and , are not provided (because they cannot easily be input through a keyboard). Therefore, to directly represent logic formulas as an information structure, it is necessary to record those symbols as character strings using the multiplication symbol (*), the addition symbol (+), and signs such as (−), instead of the above-mentioned symbols.
The import of properties based on the above-described inter-class Boolean operations, in other words, the import of the properties other than the properties to be inherited from the class immediately above the new class, is performed by conversion of each property into the importing format with the “Case of” defined by ISO13584, and output to a file. By doing so, a function that secures the compatibility between the dictionary and an external system that is compliant with ISO13584 can be provided. ISO13584 basically concerns simple inheritance involving only one parent class. In a case where a class C1 requires the properties of a class C3 that is not a parent class C2, the class 1 needs to be declared as the “Case of” of the class C3 in advance. When a dictionary compliant with ISO 13584 is created through inter-class logic operations according to the present invention, all the properties that are not inherited from the upper class are regarded as being imported using the “Case of”.
The methods of recording set operations can be roughly classified into two types. One (Recording Method 1) involves dividing classes into logic products and logic sums using the expressions (6) and (7), and reconstructing the classes according to certain rules. As represented by the following expression,
∪j=1n(∪i=1mCi)j
classes combined with one another by logic products are put together in a list of each constituent component (in the expression (6), in the set of jth logic product formulas put in the brackets, m classes are combined with logic product), and the logic sums having the set of joined classes as a term are enumerated. In the expression (6), j is determined and treated as one unit, and the number (n) is indicated by the list of logic sums, so that the Boolean algebras consisting of products and sums can be recorded in a certain format.
The other method (Recording Method 2) involves recording operations in the form of a tree having classes as leaves, with the inter-class logic operations being the upper nodes, as shown in
((C1∩C2)∪C3)∩(C3C4) (9)
The contents data (instances) are not necessarily input to all the classes described in the dictionary. Accordingly, the above described two recording methods involving inter-class logic formulas can eliminate the trouble and time of producing a detailed dictionary in which the property inheritance relation and the property importing relation among classes are described in advance, in comparison with the conventional technique where the property inheritance relation and the importing relation among classes are described in advance. Users do not need to grasp the specific rules and methods relating to the descriptions of inheritance and the property import. In addition, the amount of description concerning the property import in the data dictionary can be reduced.
The editing of the logic operation file 18 by the logic formula editor unit 15 is now described in detail. As mentioned earlier, using the inter-class logic operation file 18 which serves as a text, or utilizing the GUI, the logic formula editor unit 15 generates a new class, a derivative property, and a new identifier (Basic Semantic Unit (BSU)) through product operations.
More specifically, instead of recording a new property and its original property or information on those properties equally associated with each other by mapping or the like in a database or a file, a parent property (super property) equivalent to an higher concept of those properties is defined, and a conjugate property is defined as a derivative property which is a special form of the parent property (super property). The parent property and the conjugate property are then both recorded. By doing so, with the name and the identifier of the parent property (super property) serving as the base, the function of handling derivative properties as the same properties can be achieved. At the same time, with the name and the identifier of each of the original properties serving as the base, the function of handling the derivative properties as different properties can be realized.
When properties having the same identifiers generated through inheritance or import of one property are to be identified, the probability of a duplication of those properties is automatically or semiautomatically detected and is then presented visually to users in a distinguished manner through GUI, to prompt the user to confirm the derivation of properties. New identifiers generated through the property derivation can be automatically or semiautomatically set, and the relation between the original properties and the derivative properties is recorded. Thus, the derivative properties can be treated as the same properties. In addition, the derivative properties can be treated as different properties, based on the name and the identifier of each of the original properties. According to ISO13584 standard, the difference between the two properties can be determined by the difference determined by the following expression in which identifiers are joined to one another:
Information_supplier_identifier.Class_identifier.Property_identifier (10)
However, the class identifier described above is the identifier of a class having an originally defined property, and is different from the identifier of a class actually having exported its property or the identifier of a class actually having imported a property according to the present invention.
As described above, in this embodiment, a property to be introduced from an existing class to a new class is determined through a logic operation between classes described in the logic operation file, and the determined property is converted into a hierarchical dictionary data model to be output as a hierarchical dictionary file in a predetermined format. Accordingly, inheritance or “Case of” import of all properties is not necessary in practice. Instead, only the relation between classes is described with operators, and instances are actually created. Here, only the class to which an actual data value is to be input in accordance with the property needs to be converted into a complete hierarchical dictionary file. Accordingly, the trouble and the time of creating a detailed dictionary in which the property inheritance relations and import relations among classes are described can be eliminated, unlike with the conventional method in which the property inheritances and imports among classes need to be described in advance. Users do not need to grasp the specific rules and methods relating to the description of the inheritances and the imports of the properties, and the amount of descriptions as to property imports in the dictionary can be reduced. Thus, the dictionary file can be simplified, and the computing time required for combining data at the time of dictionary creation can be shortened.
It is of course possible to convert the inter-class set operation tree created as described above into an actual inheritance relation or “Case of (partial inheritance)” relation to be output at any time.
Next, a second embodiment of the present invention is described. The same components as those of the first embodiment are denoted by the same reference numerals as those used in the first embodiment, and explanation of them is not repeated.
In the first embodiment, when the duplicating properties are detected, a super property equivalent to a higher concept of the properties is defined. In the second embodiment, on the other hand, when two or more properties having the same identifiers exist in existing classes in an existing dictionary, and the range of the actual values of the properties is limited or restricted to a narrower range than the value range of the properties in the original definitions by information supplied from the outside or an analysis of the structural, semantic, or actual value range, other identifiers are automatically given to the properties to be imported from the existing classes, or are given to the properties in accordance with an instruction from a user, so that the properties can be distinguished from one another.
In
As for the relation among classes, the class “C010: Transportation Products” is a lower class of the class “C001: Products”, and inherits the properties “P001: Manufacturer Name” and “P002; Product Name” defined in the class “C001: Products”. These properties are also inherited by the class “C011: Motor Vehicles” which is the lower class of “C010: Transportation Products.” Since the class “C011: Motor Vehicles” has the self-defined properties “P011: Engine Size”, “P012: Suitable Tire Size”, and “P013: Vehicle Height”, the properties that can be used in the class “C011: Motor Vehicles” are the five properties P001, P002, P011, P012, and P013, including those inherited.
The class “C012: Two-Wheeled Motor Vehicles” has three lower classes “C013: Two-Wheeled Heavy Motor Vehicles”, “C014: Two-Wheeled Standard-Sized Motor Vehicles”, and “C015: Two-Wheeled Light Motor Vehicles”. For these three classes, there are constraint conditions as to the property “P011: Engine Size” inherited from the class “C011: Motor Vehicles”. Normally, the properties may be handled with the same identifiers, even if the constraint conditions are different from one another. In the second embodiment, however, different identifiers (derivative identifiers) not duplicating one another in the hierarchical structure are automatically allotted to the properties having the constraint conditions at the time of input to the database of the hierarchical structure. Users may be allowed to set the range (classes) and the timing of allotting derivative identifiers.
In the second embodiment, derivative identifiers are allotted to all the three properties having constraint conditions. As shown in
In
Although whether the derivative properties are to be searched for is determined collectively in this example, it is also possible to make a decision on each of the derivative properties separately. Further, on any screen displaying the classes having the derivative properties or the derivative properties, instead of the search condition setting screen, the corresponding properties should be indicated with tools such as pop-ups or balloons.
Next, a third embodiment of the present invention is described. The same components as those of the first embodiment are denoted by the same reference numerals as those used in the first embodiment, and explanation of them is not repeated.
select * from T01, T02 where T01.P012=T01.P092 (SQL)
where T01 represents the content table of
In a regular relational database, the column name of each schema is closed in the table. Even if a schema having the same column name exists in another table, the equivalence of the schema columns having the same name is not guaranteed between the tables. Other than the name, each schema column has information such as the data type including units. In a hierarchical database according to the present invention, the property corresponding to a schema column defines various kinds of information, such as the codes internationally uniquely representing the properties, the definition, the definition source, and remarks, other than the name and the data type. Since the property is uniquely identified, the same property codes guarantee the same properties between different tables. If there are two schemas having the same column name in the result of an operation, one or both of the column names are changed, so as to form tables without a duplication.
However, if the properties of the results obtained through operations duplication with each other in a hierarchical database, changing only the property names (or property identifiers) causes the following problems:
1. The fact that the original properties are the same is not guaranteed.
2. To form a content table belonging to a class in a hierarchical structure, it is necessary to define new properties in the hierarchical structure, instead of changing property names.
3. A content table needs to be put in the class having all the properties necessary for a resultant content table.
In the following, the measures to solve these problems are described.
As a first measure to solve the problems, a new class is created as a lower class of one of the classes to which a content table after an operation belongs. For properties duplicating each other, the property appearing from the table of a class other than the parent class is defined as a new property in the new class.
In each of the examples shown in
The relation obtained in this case is stored as information in a database (or a file), as shown in
In this manner, the handling related with the derivative property and its original property can be regarded as the same as those shown in
The relation between the properties represented by the row starting with #300 may be complementarily added by an additional file or the like.
As a second measure to solve the problems, a new class may be created at a completely different location from both classes that are the operation sources, and new derivative identifiers may be allotted to both of the duplicating properties.
Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the 5 specific details and representative embodiments shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2005-276647 | Sep 2005 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2006/309186 | 4/26/2006 | WO | 00 | 7/18/2006 |