×

Database structure for distributed key-value pair, document and graph models

  • US 10,255,378 B2
  • Filed: 03/18/2015
  • Issued: 04/09/2019
  • Est. Priority Date: 03/18/2015
  • Status: Active Grant
First Claim
Patent Images

1. A computer-implemented method for defining a NoSQL database structure that supports wide-column, document, and graph data models, the method comprising executing on a processor the steps of:

  • defining a plurality of documents, each with a unique key that is different from a key of any other of the documents;

    defining a plurality of columns, one for each of a plurality of document rows, within a wide-column store, wherein the columns each have a field comprising a pair of a name and a value that is selected from the group consisting of a nested object and an array, wherein each of the column fields have different column names;

    indicating a data type of the column field values via a type of notation;

    storing each of the plurality of documents to different rows in the wide-column store by mapping the unique keys directly to different row keys of the wide-column store and adding a first prefix to each of the different column names of the columns of the fields comprising the pairs of the name and the values;

    defining a graph edge as a function of a relationship between a first source document and a second of the documents as a tuple of a source, a target, a tag and a value, wherein the source is the first source document key, the target is the second document key, the tag is a label of the relationship, and the value is an object associated with the relationship; and

    storing the graph edge as a graph column within the row of the first source document with a name that is different from names of other columns within said row of the first source document by adding a second prefix to the graph column name that is different from the first prefix;

    wherein the array value is an ordered list of a plurality of array values, and wherein the defining the plurality of columns for the field pair of the name and the array comprises defining a cell value of the column fields as a size of the array, and defining a plurality of additional columns for the row for each of the array values in recursively named columns of a form of [“

    name[0]”

    , “

    name[1]”

    , . . . , “

    name [n−

    1]”

    ], where “

    n”

    is the array value; and

    wherein the nested object comprises a quantity of “

    y”

    of a plurality of sub fields, and wherein the defining the plurality of columns for the field pair of the name and the nested object comprises defining a cell value of the column fields as a combination of the nested object sub fields, and defining the plurality of additional columns for the row for each of the array values in recursively named columns of a form of [“

    name.subfield-1”

    , “

    name.subfield-2”

    , . . . “

    name.subfield-y”

    ].

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×