US 9,811,579 B1
Document relational mapping
Christopher A. Olson, San Francisco, CA (US)
Assigned to Christopher A. Olson, San Francisco, CA (US)
Filed by Christopher A. Olson, San Francisco, CA (US)
Filed on Nov. 21, 2012, as Appl. No. 13/683,694.
Int. Cl. G06F 17/30 (2006.01)
CPC G06F 17/30595 (2013.01) 11 Claims
OG exemplary drawing
 
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.