Method and apparatus for storing semi-structured data in a structured manner
First Claim
1. A method in a computer system for converting semi-structured data to structured data, the method comprising:
- providing a mapping data structure that maps elements of the semi-structured data to elements of the structured data;
generating a structured schema for the structured data based on the provided mapping data structure; and
storing the semi-structured data as structured data in accordance with the generated structured schema wherein different mapping data structures can be provided to convert semi-structured data to structured data in accordance with different generated structured schemas.
7 Assignments
0 Petitions
Accused Products
Abstract
In response to the provision of a collection of semi-structured data (or its schema), a mapper generates a structured organization to store the collection of semi-structured data. The mapper further collaterally generates a description of how the semi-structured data are stored under the structured organization. In one embodiment, normalized relational tables are used for the structured organization. In alternate embodiments, non-normalized relational tables or other structured organization may also be used. The reverse, that is, the creation of a semi-structured data organization for a collection of structured data may also be performed.
218 Citations
77 Claims
-
1. A method in a computer system for converting semi-structured data to structured data, the method comprising:
-
providing a mapping data structure that maps elements of the semi-structured data to elements of the structured data;
generating a structured schema for the structured data based on the provided mapping data structure; and
storing the semi-structured data as structured data in accordance with the generated structured schema wherein different mapping data structures can be provided to convert semi-structured data to structured data in accordance with different generated structured schemas. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
retrieving stored structured data; and
storing the retrieved structured data as semi-structured data in accordance with the provided mapping data structure.
-
-
8. The method of claim 1 wherein the provided mapping data structure includes for each parent and child relationship in the semi-structured data, a mapping from a parent identifier and a child identifier of the parent and child relationship to a table identifier of a table in the structured data that corresponds to the parent and child relationship.
-
9. The method of claim 8 wherein each mapping further includes a parent key identifier and a child key identifier of the table that correspond to the parent identifier and child identifier of the mapping.
-
10. The method of claim 9 wherein each mapping further includes an indicator of whether a child of the parent and child relationship is an attribute or an element.
-
11. The method of claim 8 wherein the mapping supports recursive definition of elements of the semi-structured data.
-
12. The method of claim 8 wherein the mapping includes for each child of a parent and child relationship that is also not a parent, a mapping from the child identifier of that child to a table identifier of a table in the structured data.
-
13. The method of claim 12 wherein the mapping from the child identifier of that child also maps to a child key identifier in the table.
-
14. The method of claim 12 wherein the mapping from the child identifier of that child also maps to an indicator as to whether the child is an attribute or an element of its parent.
-
15. The method of claim 12 wherein the mapping from the child identifier of that child also maps to a child value identifier in the table.
-
16. A method in a computer system for converting data stored in an XML format into data stored in a relational format, the method comprising:
-
providing a mapping description between the data in the relational format and the data in the XML format wherein for each parent and child relationship in the XML data, the provided mapping description includes a mapping from a parent identifier and a child identifier of the parent and child relationship to a table identifier of a table defined by the relational schema that corresponds to the parent and child relationship;
generating a relational schema for the data in the relational format based on the provided mapping description; and
storing the data in the XML format as data in the relational format in accordance with the generated relational schema and the provided mapping description. - View Dependent Claims (17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)
retrieving data stored in the relational format; and
storing the retrieved data in the XML format in accordance with the provided mapping description.
-
-
21. The method of claim 16 wherein each mapping further includes a parent key identifier and a child key identifier of the table that correspond to the parent identifier and child identifier of the mapping.
-
22. The method of claim 21 wherein each mapping further includes an indicator of whether a child of the parent and child relationship is an attribute or an element.
-
23. The method of claim 16 wherein the mapping supports recursive definition of elements of the data in XML format.
-
24. The method of claim 16 wherein the mapping includes for each child of a parent and child relationship that is also not a parent, a mapping from the child identifier of that child to a table identifier of a table in the structured data.
-
25. The method of claim 24 wherein the mapping from the child identifier of that child also maps to a child key identifier in the table.
-
26. The method of claim 24 wherein the mapping from the child identifier of that child also maps to an indicator as to whether the child is an attribute or an element of its parent.
-
27. The method of claim 24 wherein the mapping from the child identifier of that child also maps to a child value identifier in the table.
-
28. A method in a computer system for converting structured data to semi-structured data, the method comprising:
-
providing a mapping data structure that maps elements of the structured data and elements of the semi-structured data; and
generating a semi-structured schema for the semi-structured data based on the provided mapping data structure;
storing structured data as semi-structured data in accordance with the generated semi-structured schema wherein different mapping data structures can be provided to convert the structured data to semi-structured data in accordance with different generated semi-structured schemas. - View Dependent Claims (29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42)
retrieving stored semi-structured data; and
storing the retrieved semi-structured data as structured data in accordance with the provided mapping data structure.
-
-
35. The method of claim 28 wherein the provided mapping data structure includes for each parent and child relationship of the semi-structured schema, a mapping from a parent identifier and a child identifier of the parent and child relationship to a table identifier of a table in the structured data that corresponds to the parent and child relationship.
-
36. The method of claim 35 wherein each mapping further includes a parent key identifier and a child key identifier of the table that correspond to the parent identifier and child identifier of the mapping.
-
37. The method of claim 36 wherein each mapping further includes an indicator of whether a child of the parent and child relationship is an attribute or an element.
-
38. The method of claim 37 wherein the mapping supports recursive definition of elements of the semi-structured data.
-
39. The method of claim 37 wherein the mapping includes for each child of a parent and child relationship that is also not a parent, a mapping from the child identifier of that child to a table identifier of a table in the structured data.
-
40. The method of claim 39 wherein the mapping from the child identifier of that child also maps to a child key identifier in the table.
-
41. The method of claim 39 wherein the mapping from the child identifier of that child also maps to an indicator as to whether the child is an attribute or an element of its parent.
-
42. The method of claim 39 wherein the mapping from the child identifier of that child also maps to a child value identifier in the table.
-
43. A method in a computer system for converting data stored in a relational format into data stored in an XML format, the method comprising:
-
providing a mapping description that maps the data in the relational format to the data in the XML format wherein for each parent and child relationship in the XML data, the generated mapping description includes a mapping from a parent identifier and a child identifier of the parent and child relationship to a table identifier of a table defined by the relational schema that corresponds to the parent and child relationship;
generating an XML schema for the data in the XML format based on the provided mapping description; and
storing the data in the relational format as data in the XML format in accordance with the generated XML schema and the generated mapping description. - View Dependent Claims (44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54)
retrieving data stored in the XML format; and
storing the retrieved data in the relational format in accordance with the generated mapping description.
-
-
48. The method of claim 43 wherein each mapping further includes a parent key identifier and a child key identifier of the table that correspond to the parent identifier and child identifier of the mapping.
-
49. The method of claim 48 wherein each mapping further includes an indicator of whether a child of the parent and child relationship is an attribute or an element.
-
50. The method of claim 43 wherein the mapping supports recursive definition of elements of the semi-structured data.
-
51. The method of claim 43 wherein the mapping includes for each child of a parent and child relationship that is also not a parent, a mapping from the child identifier of that child to a table identifier of a table in the structured data.
-
52. The method of claim 51 wherein the mapping from the child identifier of that child also maps to a child key identifier in the table.
-
53. The method of claim 51 wherein the mapping from the child identifier of that child also maps to an indicator as to whether the child is an attribute or an element of its parent.
-
54. The method of claim 51 wherein the mapping from the child identifier of that child also maps to a child value identifier in the table.
-
55. A computer system for converting data comprising:
-
a mapping means for mapping between structured data and semi-structured data;
means for storing semi-structured data as structured data in accordance with the mapping means; and
means for storing structured data as semi-structured data in accordance with the mapping means. - View Dependent Claims (56, 57, 58, 59, 60, 61, 62, 63)
-
-
64. A method in a computer system for converting data between a semi-structured format and a structured format, the method comprising:
-
providing a mapping data structure that maps elements of the structured format and elements of the semi-structured format;
retrieving data in one of the formats; and
storing the retrieved data in the other format in accordance with the provided mapping data structure wherein different mapping data structures can be used to convert data having one schema to data having another schema. - View Dependent Claims (65, 66, 67, 68, 69)
-
-
70. A method in a computer system for storing data in a semi-structured format and a structured format, the method comprising:
-
providing a mapping between the structured format and the semi-structured format;
converting data in the structured format to data in the semi-structured format in accordance with the provided mapping; and
converting data in the semi-structured format to data in the structured format in accordance with the provided mapping wherein different mappings can be used to convert the same data into different formats. - View Dependent Claims (71, 72, 73, 74, 75, 76, 77)
-
Specification