Document relational mapping
First Claim
1. A computer-implemented method for decomposing a document to update a data store having data organized as tables, the tables comprising a first table and a second table, with the first table comprising a first column and a first row and the second table comprising a second column and a second row, the method being implemented in a computer system comprising one or more physical processors, the method comprising:
- defining, by one or more computers, a document mapping command related to a tree-structured document, the document mapping command comprising a reference to the first table, a follow command that associates the first column with the second column, an object field name, and a column name, wherein the columns have a foreign key relationship;
creating, by one or more computers, a root of the document based on the reference to the first table;
retrieving, by one or more computers, an item in the document, the item being identified by the object field name and containing a field value; and
updating, by one or more computers, based on the field value in the retrieved item, the data store using the document mapping command, wherein an object can have transformations or edits performed on it, such that aspects of it can be altered without access to an underlying data store, wherein the updating of the data store comprises;
resolving, by one or more computers, the follow command to identify the second column as being part of the second table and thereby identifying the second table, wherein resolving the follow command involves (1) associating the first column with the first row by specifying a value in the first column that is a key in the first row, or (2) scanning multiple field values in one or more columns one at a time as part of scanning the first table in whole or in part and retrieving, for the scanned field values, a row that has a value as a key;
identifying, by one or more computers, the second row based on a value in a third column of the second row matching the field value;
modifying, by one or more computers, a fourth column of the second row; and
using triggers to delete a document, by one or more computers, wherein the triggers are used to cascade deletion of one row to all other rows that reference the deleted row, the triggers configured to delete data that was not visible when getting that document, wherein the steps of retrieving the item in the document, resolving the follow command, identifying the second row, and modifying the fourth column are performed iteratively for each item that corresponds to an element in an array of elements.
4 Assignments
0 Petitions
Accused Products
Abstract
Described is technology to translate between tree-structured documents and electronic storage such as a relational data store. A document may be composed from the data store or decomposed to a data store using a document mapping command. The document mapping command includes follow commands that associate the columns in one table with columns in another table and resolve these associations during composition or decomposition. These follow commands allow for the retrieval of data from the data store and for inserting and/or modifying the data store by way of applying deltas to the data store.
27 Citations
11 Claims
-
1. A computer-implemented method for decomposing a document to update a data store having data organized as tables, the tables comprising a first table and a second table, with the first table comprising a first column and a first row and the second table comprising a second column and a second row, the method being implemented in a computer system comprising one or more physical processors, the method comprising:
-
defining, by one or more computers, a document mapping command related to a tree-structured document, the document mapping command comprising a reference to the first table, a follow command that associates the first column with the second column, an object field name, and a column name, wherein the columns have a foreign key relationship; creating, by one or more computers, a root of the document based on the reference to the first table; retrieving, by one or more computers, an item in the document, the item being identified by the object field name and containing a field value; and updating, by one or more computers, based on the field value in the retrieved item, the data store using the document mapping command, wherein an object can have transformations or edits performed on it, such that aspects of it can be altered without access to an underlying data store, wherein the updating of the data store comprises; resolving, by one or more computers, the follow command to identify the second column as being part of the second table and thereby identifying the second table, wherein resolving the follow command involves (1) associating the first column with the first row by specifying a value in the first column that is a key in the first row, or (2) scanning multiple field values in one or more columns one at a time as part of scanning the first table in whole or in part and retrieving, for the scanned field values, a row that has a value as a key; identifying, by one or more computers, the second row based on a value in a third column of the second row matching the field value; modifying, by one or more computers, a fourth column of the second row; and using triggers to delete a document, by one or more computers, wherein the triggers are used to cascade deletion of one row to all other rows that reference the deleted row, the triggers configured to delete data that was not visible when getting that document, wherein the steps of retrieving the item in the document, resolving the follow command, identifying the second row, and modifying the fourth column are performed iteratively for each item that corresponds to an element in an array of elements. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A system configured to decompose a tree-structured document to update a data store having data organized as tables, the tables comprising a first table comprising a first column and a first row and a second table comprising a second column and a second row, the system comprising:
-
a document mapping command related to a tree-structured document, the document mapping command comprising a reference to the first table, a follow command that associates the first column with a the second column, an object field name, and a column name, wherein the columns have a foreign key relationship; one or more processors configured by machine-readable instructions to; create a root of the document based on the reference to the first table; retrieve an item in the document, the item being identified by the object field name and containing a field value; and update, based on the field value in the retrieved item, the data store using the document mapping command, wherein an object can have transformations or edits performed on it, such that aspects of it can be altered without access to an underlying data store, wherein the updating of the data store comprises; resolving the follow command to identify the second column as being part of the second table and thereby identifying the second table, wherein resolving the follow command involves (1) associating the first column with the first row by specifying a value in the first column that is a key in the first row, or (2) scanning multiple field values in one or more columns one at a time as part of scanning the first table in whole or in part and retrieving, for the scanned field values, a row that has a value as a key; identifying the second row based on a value in a third column of the second row matching the field value; modifying a fourth column of the second row; and using triggers to delete a document, wherein the triggers are used to cascade deletion of one row to all other rows that reference the deleted row, the triggers configured to delete data that was not visible when getting that document, wherein the steps of retrieving the item in the document, resolving the follow command, identifying the second row, and modifying the fourth column are performed iteratively for each item that corresponds to an element in an array of elements.
-
Specification