Storing and processing json documents in a sql database table
AssigneeDell Products L.P.
InventorsCollin LeGault, Vinay Sawal, Bruce Amberden
Life of this patent
Estimating the term…
Abstract
Embodiments for storing a JSON document tree in a single SQL database table by defining a schema to store JSON nodes in the table and converting each JSON document into a corresponding set of rows in the table using the schema to encode a hierarchical relationship of nodes and sub-nodes into a path that specifies a node path to a root node for each node. Embodiments further receiving a SQL query to retrieve a specific sub-document, responding to the query by returning all rows of the table belonging to the sub-document, and inflating the returned rows back into a JSON expression using the path to guide reconstruction of the original JSON document tree.
Claims20
A method comprising:
- defining a schema to store JavaScript Object Notation (JSON) nodes in a Structured Query Language (SQL) database table in a memory storage device;
- and
- converting each JSON node into a corresponding row of the SQL database table using the schema to encode a hierarchical relationship of nodes and sub-nodes into a path that specifies a node path to a root node for each node.
A system comprising:
- an application executed in a networked computer to perform tasks using data processed in the system;
- an application adapter providing application-level JSON (JavaScript Object Notation) storage handling functions;
- a JSON adapter converting JSON documents embodying the data into corresponding rows of a SQL database table and inflates the rows of the table back into corresponding documents in response to a SQL query for the corresponding documents;
- a database driver communicating between the JSON adapter and a database engine;
- a storage device storing the data in the SQL database table as specified by the database engine.
A method comprising:
- creating a JSON-style table in a SQL database;
- writing a JSON document to the database by deflating the JSON document and executing a single insert query to write the entire JSON document to the database in this single query;
- and
- reading the JSON document by executing a select query to request the document by its identifier (id), wherein the select query reads an entire JSON document sub-tree from the database, and inflating the JSON rows returned by the database into the JSON document.
Dependencies are inferred from the claim text.