Patent Description:
The subject matter for which protection is sought is defined by the independent claims.

Various embodiments of methods, systems, and computer-readable media for global column indexing in a graph database are described. A graph database service stores elements of data in a graph database. Elements of data in the graph database represent triples or rows A triple includes a subject identifier, a column name, and a value. In one embodiment, the triples in a graph database may be used to represent nodes and edges (relationships) in a graph of connected items. Columns are strongly typed such that values in a particular column may share the same data type. Column names are globally scoped in the graph database, such that the same column name may not be represented more than once in the graph database and may not be limited to a particular sub-table of the graph database. The graph database service uses a partitioned indexing scheme to enable querying of the graph database. Indices are created and maintained for global columns in the primary table in the graph database. A per-column index may be a table or other columnar data structure that includes multiple rows, and each row includes the values associated with the column corresponding to the index. The indices are partitioned by column name. The generation and maintenance of indices is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the indexing tasks. The per-column indices are used to perform queries of the graph database. To perform a query, a query planner refers to the indices corresponding to columns associated with the query. Statistics are generated and maintained for the indices in order to optimize queries. The statistics for an index may represent distributions of values within the corresponding column. To optimize a query, the order of indices to be used may be determined based (at least in part) on the statistics for the per-column indices. Statistics may be maintained automatically and in real time or near-real time to enable optimized query processing using up-to-date information.

<FIG> illustrates an example system environment for global column indexing in a graph database. A graph database service <NUM> stores elements of data in a graph database <NUM>. The graph database may also be referred to as a graph data store or a triple store. A graph represented by the graph database service is a data structure that is suitable for representing relationships, connections, and dependencies within data. Typical examples of domains in which graphs can model data may include social networks or communication networks, biological networks, time series applications, and metadata management. A graph may include nodes (vertices) and edges (relationships) as well as properties associated with those vertices and edges. In one embodiment, a node may represent a concept or an object. An edge may represent a relationship between vertices. A vertex may have various properties such as a name. An edge may have various properties such as a type of relationship. For example, in a graph within a social network, User1, User2, and User3 may be entities, and a "friendOf" relationship between them may define the "edges" of this small graph. In one embodiment, the User1, User2, and User3 entities may have properties like "name" and "age," and the relationship properties may include "start_date," "source," and so on. Large volumes of such connected data may be generated from modern applications, mobile and messaging apps, and IoT devices. Such data tends to be dynamic, such that the relationships, entities, and their properties may be constantly changing.

Schema-based relational data stores may not be able to change rapidly enough; schema-less stores like key-value stores may be unable to work with sophisticated query languages. Traditional key-value data stores and relational data stores may often be unwieldy for managing data that is rich and highly connected. For example, key-value stores may support accessing discrete objects that do not necessarily represent rich data or relationships. As another example, relational data stores may be too inflexible to adequately represent the fluid relationships in highly connected data. When relational databases are used to store such data, developers may be required to store the data in tables with rigid structures and write complex SQL queries using multiple joins. Such complex queries may prove difficult to maintain and may not scale adequately when run on large datasets. As the data scale increases, some graphs may become billion-edge structures that challenge prior hardware and software solutions. In one embodiment, the graph database service may query such data efficiently using per-column (property-scoped) indices 160A-160N. Although indices 160A-160N are illustrated for purposes of example, any suitable number and configuration of indices may be used in the graph database.

The elements of data in the graph database represent triples or rows in a columnar format. Triples such as triples 151A through 151Z are stored in a triple table <NUM>; the triple table may represent a primary table in the graph database. Although triples 151A-151Z are illustrated for purposes of example, any suitable number and configuration of triples may be used in the graph database. For example, a triple includes an identifier, a column name, and a value. Triples may include different elements in addition to an identifier, column, name, and value. The identifier may also be referred to as a subject identifier. In one embodiment, the identifier may indicate the particular row (e.g., in a relational view of the data) or record that holds the combination of the column name and the value in the triple. The same subject identifier may be reused for multiple triples, e.g., if the corresponding row or record includes values in multiple categories. The column name may indicate a distinct and separate category of data, and the value may represent one of the allowable values within the category. In one embodiment, the triples in a graph database may be used to represent nodes and edges (relationships) in a graph of connected items. The graph database may store one graph or multiple graphs. The triples are also stored with graph identifiers that indicate particular graphs or sub-graphs to which the triples belong.

Columns are strongly typed such that values in a particular column share the same data type, and an enforcement mechanism may ensure that values in the particular column are limited to being expressed in the data type associated with the column. Data types may differ from column to column. All the rows and columns in the graph database may effectively belong to the same primary table, e.g., the triple table. Column names are globally scoped in the graph database, such that the same column name may not be represented more than once in the graph database and may not be limited to a particular sub-table of the graph database. By way of contrast, column names in a conventional relational database are typically locally scoped to one of many tables.

The graph database service uses a partitioned indexing scheme to enable querying of the graph database. An index creation component <NUM> may create and maintain indices for every global column in the primary table in the graph database. The index creation component <NUM> may create and maintain indices for many but not necessarily all global columns in the primary table in the graph database, e.g., for columns that are intended to be queryable or searchable. A per-column index may be a table or other columnar data structure that includes multiple rows, and each row may include the values associated with the column corresponding to the index. A per-column index may also be referred to as a property-scoped index. Each row in a per-column index also includes a pointer to the corresponding row in the primary table in the graph database. The indices 160A-160N may be stored as separate data structures from each other and from the triple table <NUM>, e.g., in storage managed by or otherwise accessible to the graph database service. In one embodiment, the indices may effectively be partitioned by column name. By way of contrast, such per-column indexing in a conventional relational database would often be prohibitively expensive due to the vastly greater number of locally scoped columns that may be managed in a relational database management system. The generation and maintenance of indices is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the indexing tasks. By way of contrast, the generation and maintenance of indices for a conventional relational database is typically a manual task that requires user input to customize the indices.

The per-column indices are used to perform queries of the graph database. A client <NUM> may supply a query <NUM> and receive query results <NUM> from the graph database service. To perform a query, a query planner <NUM> may refer to the indices corresponding to columns associated with the query. A statistics generation component <NUM> generates and maintains statistics for the indices in order to optimize queries. The statistics generation component <NUM> generates and maintains sets of statistics corresponding to individual indices, such as statistics 121A-121N corresponding to the indices 160A-160N. The statistics may be stored using any suitable storage technologies, e.g., in storage managed by or otherwise accessible to the graph database service. The statistics for an index may represent distributions of values within the corresponding column. For example, the statistics may indicate how many times a particular value occurs within the column, how many triples having numeric values within a particular numeric range occur within the column, how many triples having string-typed values beginning with a particular character occur within the column, and so on.

To optimize a query, the order of indices to be used may be determined based (at least in part) on the statistics for the per-column indices. The query planner uses the most constraining index first, then the next most constraining index, and so on. The statistics may be maintained in real time or near-real time to enable optimized query processing using up-to-date information. The generation and maintenance of statistics for an index is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the statistics tasks. The client <NUM> may supply updates <NUM> to triples in the graph database. An index and the statistics for the index are generated or updated by the graph database service in response to the updating of one or more triples for the corresponding column in the graph database (e.g., the addition of one or more triples, the deletion of one or more triples, or the modification of one or more triples). The graph database service provides a query hint mechanism to optimize the performance of individual queries within specific applications.

Queries of the graph database include semantic queries. A semantic query may permit the retrieval of both explicitly and implicitly derived information from the graph database based on syntactic, semantic, and structural information embodied in the database. A semantic query may return a specific or precise result such as a single piece of information. A semantic query may return an answer to a "fuzzier" or less specific question through pattern matching and machine logic. By operating on the triples in the graph database, a semantic query may process the actual relationships between information and determine an answer from the network of connections in the graph database. A semantic query may operate on structured data and utilize features such as operators (e.g., >, <, and =), pattern matching, and so on. In one embodiment, semantic queries of the graph database are formatted in the syntax of a semantic query language such as SPARQL. A semantic query may be written without knowledge of a database schema in the graph database. A query of the graph database may be expressed in a graph traversal language or graph query language such as Neo4j or Gremlin.

The graph database is designed to effectively capture and analyze rich, dynamic data structures having complex relationships. For example, a simple social query such as "find all the friends of User1's friends" may be expressed as a one-line traversal in a graph database in a graph traversal language such as Gremlin: g. has('name','User1'). out('friend'). out('friend'). values('name'). However, using an SQL query to retrieve the same information from a relational database may be much more complex, such as the following query:.

The graph database service may support a simple text search on property values. In one embodiment, in the property graph model, the text search may search over node and edge properties. In the resource description framework (RDF) model, the text search may search over literal values. In one embodiment, the graph database service may employ logic to efficiently compress and store the data so that the storage costs are lowered.

The graph database service may be used by clients in varying domains such as social networks, recommendation engines, data management, network and IT management, fraud detection, medical applications, Online Transaction Processing (OLTP) and Online Analytics Processing (OLAP) workloads, and so on. The graph database service may be used for processing of streaming data that is rich (e.g., representing a large amount of information) and highly connected (e.g., representing many relationships). For example, clients in the financial sector may use the graph database service to process a stream of credit card transactions as graph queries to identify potential anomalies. As a more specific example, a client of the graph database service may supply a graph query to detect a purchase that takes place in one geographical region and is followed by one in another geographical region five minutes later. Detecting that a customer had two transactions that occurred closely together, but took place thousands of miles apart, the client of the graph database service may generate an alert and send it to the customer. As another example, the graph database service may be used by a retail company to make purchase recommendations for a customer based on purchasing behavior of the customer's friends. As yet another example, the graph database service may be used by a life sciences organization to analyze the relationships between different chemicals and compounds to detect drug interactions.

The graph database service may be used by clients for combining and analyzing the large quantities of relationship information aggregated in the clients' OLTP and OLAP applications. Beyond short interactive queries (e.g., for OLTP) and longer-running complex queries (e.g., for OLAP), graph analytics using the graph database service may produce new insights by analyzing entire collections of relationships. Graph analytics may use iterative algorithms to process very large graphs and mine them for new information. Examples of such graph analytics may include using search engine algorithms for detecting web page relevance, using a community detection algorithm to detect groups of similar users from a large social network, and executing a shortest path algorithm to find the lowest cost route from point A to point B on a network of roads. Such tasks may be computationally challenging for conventional databases (e.g., relational databases) because they often require visiting all of the relationships (edges) in the graph multiple times to converge on a result.

The graph database service supports incoming and outgoing streams of graph data. The graph database service may be used in conjunction with machine-learning and deep-learning applications and services such that relationship-rich data in the graph database can be analyzed to identify areas in which to use machine-learning algorithms. The graph database service may be used to represent and scale knowledge graphs. The graph database service provides native support for processing large quantities of relationship information. The graph database service natively supports both the property graph and resource description framework (RDF) graph models to permit flexibility in modelling data on behalf of clients. Queries may explore small parts of the graph (e.g. OLTP applications such as recommendation systems), explore large parts of the graph (e.g., lightweight OLAP applications such as fraud detection), or examine the whole graph repeatedly (e.g., graph analytics such as determining relevance via page rank).

The graph database service provides support for multiple availability zones within a provider network; if the primary cluster node fails, the graph database service may automatically detect the failure, select one from the available standby cluster nodes, and promote the standby to become the new primary. The graph database service may propagate the DNS changes of the promoted replica so that the client's application can keep writing to the primary endpoint. The graph database service may also provision a new node to replace the promoted standby node in the same availability zone of the failed primary one. In case the primary node failed due to temporary availability zone disruption, the new replica may be launched automatically by the graph database service once that availability zone has recovered. The graph database service supports snapshots (automatic and on-demand) that can be restored via the console and application programming interface (API).

The client <NUM> may encompass any type of client suitable to submit data and requests to the graph database service. The client may be one of many clients of the graph database service. The client may include one or more services or applications that seek to make use of the graph database service. The client may convey network-based service requests to the service via one or more networks. The network(s) may encompass any suitable combination of networking hardware and protocols necessary to establish network-based communications between the client and the graph database service. For example, the network(s) may generally encompass the various telecommunications networks and service providers that collectively implement the Internet. The network(s) may also include private networks such as local area networks (LANs) or wide area networks (WANs) as well as public or private wireless networks. For example, both the client and the graph database service may be respectively provisioned within enterprises having their own internal networks. The network(s) may include the hardware (e.g., modems, routers, switches, load balancers, proxy servers, etc.) and software (e.g., protocol stacks, accounting software, firewall/security software, etc.) necessary to establish a networking link between the given client and the Internet as well as between the Internet and the graph database service. The client may communicate with the graph database service using a private network rather than the public Internet.

The graph database service may include one or more computing devices, any of which may be implemented by the example computing device <NUM> illustrated in <FIG>, and any suitable storage resources. Similarly, the client may be implemented using the example computing device <NUM> illustrated in <FIG>. Portions of the described functionality of the service <NUM>, database <NUM>, and/or client <NUM> may be provided by the same computing device or by any suitable number of different computing devices. If any of the components are implemented using different computing devices, then the components and their respective computing devices may be communicatively coupled, e.g., via a network. Each of the illustrated components (such as the graph database service and its constituent components) may represent any combination of software and hardware usable to perform their respective functions. The graph database service and/or graph database may include additional components not shown, fewer components than shown, or different combinations, configurations, or quantities of the components shown.

<FIG> illustrates an example of a graph database usable with the example system environment, including the creation of per-column indices for globally scoped column names. The graph database service stores data as triples in a triple table <NUM>. The triples used in the graph database service may differ from the triples in the RDF graph model, in which a triple may include a subject, predicate, and an object. The storage model used by the graph database service can effectively store and process both the property graph model and the RDF model using its internal triples structure. In the illustrated example, the triple table includes at least the illustrated eleven triples. The triples include subject identifiers <NUM>, column names or properties <NUM>, and values <NUM> associated with the column names or properties. The subject identifiers are referred to as identifiers or row identifiers. The identifiers <NUM> may indicate the particular row (e.g., in a relational view of the data) or record that holds the combination of the column name and the value in the triple. As shown in the example of <FIG>, the same subject identifier may be reused for multiple triples, e.g., if the corresponding row or record includes values in multiple categories. The column names or properties <NUM> may indicate a distinct and separate category of data, and the values <NUM> may represent one of the allowable values within the category. The triples in the triple table may be used to represent nodes and edges (relationships) in a graph of connected items. For example, the rows including identifier P101 may represent a node for a particular person having properties such as the name "Firstname Lastname" and the age <NUM>. The node for identifier P101 may also be connected to a node for a personal address (myAddr) A201. As shown in the example, the address A201 has additional triples in the triple table indicating values for street address, city, and zip code properties. Similarly, the rows including identifier B101 may represent a node for a particular business having properties such as the name "AtoZ Corporation" and a connection to a node for a business address (busAddr) A202.

Columns are strongly typed such that values in a particular column share the same data type, and an enforcement mechanism may ensure that values in the particular column are limited to being expressed in the data type associated with the column. Data types may differ from column to column. As shown in the example of <FIG>, the "name" column may be associated with a string data type, while the "zip" column may be associated with a numeric data type. Clients are permitted to create columns that appear to be locally scoped but are actually implemented in the graph database with a global scope, e.g., by automatically appending an additional term to a potentially non-unique column name to ensure that the combination is unique in the graph database.

The index creation component may create and maintain indices for every global column in the triple table. The index creation component may create and maintain indices for many but not necessarily all global columns in the triple table, e.g., for columns that are intended to be queryable or searchable. As shown in the example of <FIG>, the index creation component may create and maintain a "name" index 160A corresponding to the column name or property "name," a "city" index 160B corresponding to the column name or property "city," a "zip" index 160C corresponding to the column name or property "zip," an "age" index 160D corresponding to the column name or property "age," a "myAddr" index 160E corresponding to the column name or property "myAddr," a "busAddr" index 160F corresponding to the column name or property "busAddr," and a "street" index <NUM> corresponding to the column name or property "street. " The per-column or property-scoped indices 160A-<NUM> be tables or other columnar data structures that include one or more rows, and each row may include the values associated with the column corresponding to the index. Each row in a per-column index also includes a pointer to the corresponding row in the primary table in the graph database; the pointer may take the form of a subject identifier. The indices may effectively be partitioned by column name. By way of contrast, such per-column indexing in a conventional relational database would often be prohibitively expensive due to the vastly greater number of locally scoped columns that may be managed in a relational database management system. The generation and maintenance of indices is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the indexing tasks. By way of contrast, the generation and maintenance of indices for a conventional relational database is typically a manual task that requires user input to customize the indices.

The data elements in the graph database may include elements in addition to the subject identifiers, column names (also known as properties or predicates), and values (also known as objects or relationships). The data elements may be referred to as quads, e.g., when each row potentially stores four different units of data. As illustrated in <FIG>, the data elements also include graph identifiers <NUM> that indicate particular graphs or sub-graphs to which the triples belong. As illustrated in <FIG>, the data elements also include one or more types of annotations 205A-<NUM>. The triple table <NUM> stores annotations that characterize aspects of the triples, such as the values in the triples. As shown in the example of <FIG>, a series of annotation fields such as annotation 205A through <NUM> may be stored in the triple table. However, any suitable number and configuration of annotation fields may be used in the graph database in various embodiments. The annotations may represent user-defined or user-supplied values for aspects of data such as data quality values, access rights, expiration times, and so on. For a given annotation field, not all of the triples or rows may include a value for that annotation field. In the example shown in <FIG>, only the "P101"-"name"-"Firstname Lastname" and "B101"-"name"-"AtoZ Corporation" triples include values for the annotation field 205A. Also in the example shown in <FIG>, a greater number of the triples happen to have values for the annotation field <NUM>.

<FIG> illustrates an example of a graph database usable with the example system environment, including a relational view of data elements in the graph database, according to one embodiment. The graph database is sufficiently flexible to describe rich interrelated object and relationship centric data while also achieving query performance using property-scoped, strongly typed indices. As shown in the example of <FIG>, the graph database may reflect or represent a relational view <NUM> of data along with its associated per-column, property-scoped indices. For example, the rows including identifier P101 may represent a row in the relational view for a particular person <NUM> having properties such as the name "Firstname Lastname," the age <NUM>, and the personal address (myAddr) A201. Similarly, the rows including identifier B101 may represent a row in the relational view for a particular business <NUM> having properties such as the name "AtoZ Corporation" and a business address (busAddr) A202. The relational view may also include a table for the addresses <NUM> referenced in the person <NUM> and business <NUM> rows.

<FIG> illustrates an example of a graph database usable with the example system environment, including an entity view of data elements in the graph database. The graph database may reflect or represent an entity view <NUM> of data along with its associated per-column, property-scoped indices. The entity view may include one or more entities expressed according to JavaScript Object Notation (JSON). For example, the rows including identifier P101 may represent an entity <NUM> in the entity (JSON) view for a particular person having properties such as the name "Firstname Lastname," the age <NUM>, and the personal address (myAddr) A201 with nested values for a city, street, and zip code. Similarly, the rows including identifier B <NUM> may represent another entity <NUM> in the entity (JSON) view for a particular business having properties such as the name "AtoZ Corporation" and a business address (busAddr) A202 with nested values for a city, street, and zip code.

<FIG> illustrates the generation of statistics associated with per-column indices for globally scoped column names. As previously shown in the example of <FIG>, the index creation component may create and maintain a "name" index 160A corresponding to the column name or property "name," a "city" index 160B corresponding to the column name or property "city," a "zip" index 160C corresponding to the column name or property "zip," an "age" index 160D corresponding to the column name or property "age," a "myAddr" index 160E corresponding to the column name or property "myAddr," a "busAddr" index 160F corresponding to the column name or property "busAddr," and a "street" index <NUM> corresponding to the column name or property "street. " The statistics generation component generates and maintains statistics for the indices 160A-<NUM> in order to optimize queries. The statistics are incrementally generated by being updated periodically as triples are added, deleted, or modified. The statistics generation component generates and maintains sets of statistics corresponding to individual indices, such as statistics 121A-<NUM> corresponding to the indices 160A-<NUM>. The statistics may be stored using any suitable storage technologies, e.g., in storage managed by or otherwise accessible to the graph database service. The statistics for an index may represent distributions of values within the corresponding column. For example, the statistics may indicate how many times a particular value occurs within the column, how many triples having numeric values within a particular numeric range occur within the column, how many triples having string-typed values beginning with a particular character occur within the column, and so on.

To optimize a query, the order of indices to be used may be determined based (at least in part) on the statistics 121A-<NUM> for the per-column indices 160A-<NUM>. The query planner uses the most constraining index first, then the next most constraining index, and so on. The statistics may be maintained in real time or near-real time to enable optimized query processing using up-to-date information. The generation and maintenance of statistics for an index is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the statistics tasks. An index and the corresponding statistics for the index are updated by the graph database service in response to the updating of one or more triples for the corresponding column in the graph database (e.g., the addition of one or more triples, the deletion of one or more triples, or the modification of one or more triples).

<FIG> is a flowchart illustrating a method for global column indexing in a graph database. As shown in <NUM>, elements of data may be stored or updated in a graph database. The elements of data in the graph database may represent triples or rows in a columnar format. For example, a triple may include an identifier, a column name, and a value. Triples may include different elements in addition to an identifier, column, name, and value. The identifier may also be referred to as a subject identifier. The identifier may indicate the particular row (e.g., in a relational view of the data) or record that holds the combination of the column name and the value in the triple. The same subject identifier may be reused for multiple triples, e.g., if the corresponding row or record includes values in multiple categories. The column name may indicate a distinct and separate category of data, and the value may represent one of the allowable values within the category. The triples in a graph database may be used to represent nodes and edges (relationships) in a graph of connected items. The graph database may store one graph or multiple graphs. The triples are also stored with graph identifiers that indicate particular graphs to which the triples belong.

Columns are strongly typed such that values in a particular column share the same data type, and an enforcement mechanism may ensure that values in the particular column are limited to being expressed in the data type associated with the column. Data types may differ from column to column. All the rows and columns in the graph database may effectively belong to the same primary table. Column names are globally scoped in the graph database, such that the same column name may not be represented more than once in the graph database and may not be limited to a particular sub-table of the graph database. By way of contrast, column names in a conventional relational database are typically locally scoped to one of many tables.

As shown in <NUM>, indices may be created or updated for the globally scoped columns in the primary table in the graph database. Indices are created and maintained for many but not necessarily all global columns in the primary table in the graph database, e.g., for columns that are intended to be queryable or searchable. A per-column index may be a table or other columnar data structure that includes multiple rows, and each row may include the values associated with the column corresponding to the index. A per-column index may also be referred to as a property-scoped index. Each row in a per-column index also includes a pointer to the row in the primary table in the graph database. The indices may be stored as separate data structures from each other and from the primary table, e.g., in storage managed by or otherwise accessible to the graph database service. The indices may effectively be partitioned by column name. By way of contrast, such per-column indexing in a conventional relational database would often be prohibitively expensive due to the vastly greater number of locally scoped columns that may be managed in a relational database management system. The generation and maintenance of indices is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the indexing tasks. By way of contrast, the generation and maintenance of indices for a conventional relational database is typically a manual task that requires user input to customize the indices.

As shown in <NUM>, statistics may be generated or updated incrementally for the indices, e.g., in order to optimize queries. The statistics may be stored using any suitable storage technologies, e.g., in storage managed by or otherwise accessible to the graph database service. The statistics for an index may represent distributions of values within the corresponding column. For example, the statistics may indicate how many times a particular value occurs within the column, how many triples having numeric values within a particular numeric range occur within the column, how many triples having string-typed values beginning with a particular character occur within the column, and so on. The statistics may be maintained in real time or near-real time to enable optimized query processing using up-to-date information. The generation and maintenance of statistics for an index is performed by the graph database service automatically, e.g., without being directly prompted by user input directing the statistics tasks. An index and the statistics for the index are updated by the graph database service in response to the updating of one or more triples for the corresponding column in the graph database (e.g., the addition of one or more triples, the deletion of one or more triples, or the modification of one or more triples).

As shown in <NUM>, it may be determined whether a query has been received, e.g., from a client or any user who has suitable access privileges to submit a query to the graph database service. If not, then the method may await update requests to the graph database and eventually return to <NUM> to perform the updates (e.g., the addition of one or more triples, the deletion of one or more triples, or the modification of one or more triples). If a query has been received, then as shown in <NUM>, the query may be performed on the graph database. The query is performed (e.g., by a query planner) using the indices corresponding to column names associated with the query. To optimize a query, the order of indices to be used may be determined based (at least in part) on the statistics for the per-column indices. The query planner uses the most constraining index first, then the next most constraining index, and so on. The query may return one or more data elements from the graph database, potentially including one or more of the values.

A computer system that implements a portion or all of one or more of the technologies described herein may include a computer system that includes or is configured to access one or more computer-readable media. <FIG> illustrates such a computing device <NUM> in one embodiment. Computing device <NUM> includes one or more processors 3010A-3010N coupled to a system memory <NUM> via an input/output (I/O) interface <NUM>. Computing device <NUM> further includes a network interface <NUM> coupled to I/O interface <NUM>.

Computing device <NUM> may be a uniprocessor system including one processor or a multiprocessor system including several processors 3010A-3010N (e.g., two, four, eight, or another suitable number). Processors 3010A-3010N may include any suitable processors capable of executing instructions. For example, processors 3010A-3010N may be processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of processors 3010A-3010N may commonly, but not necessarily, implement the same ISA.

System memory <NUM> may be configured to store program instructions and data accessible by processor(s) 3010A-3010N. System memory <NUM> may be implemented using any suitable memory technology, such as static random access memory (SRAM), synchronous dynamic RAM (SDRAM), nonvolatile/Flash-type memory, or any other type of memory. Program instructions and data implementing one or more desired functions, such as those methods, techniques, and data described above, are shown stored within system memory <NUM> as code (i.e., program instructions) <NUM> and data <NUM>.

I/O interface <NUM> may be configured to coordinate I/O traffic between processors 3010A-3010N, system memory <NUM>, and any peripheral devices in the device, including network interface <NUM> or other peripheral interfaces. I/O interface <NUM> may perform any necessary protocol, timing or other data transformations to convert data signals from one component (e.g., system memory <NUM>) into a format suitable for use by another component (e.g., processor <NUM>). I/O interface <NUM> may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. The function of I/O interface <NUM> may be split into two or more separate components, such as a north bridge and a south bridge, for example. Some or all of the functionality of I/O interface <NUM>, such as an interface to system memory <NUM>, may be incorporated directly into processors 3010A-3010N.

Network interface <NUM> may be configured to allow data to be exchanged between computing device <NUM> and other devices <NUM> attached to a network or networks <NUM>. Network interface <NUM> may support communication via any suitable wired or wireless general data networks, such as types of Ethernet network, for example. Network interface <NUM> may support communication via telecommunications/telephony networks such as analog voice networks or digital fiber communications networks, via storage area networks such as Fibre Channel SANs, or via any other suitable type of network and/or protocol.

Claim 1:
A system, comprising:
a graph database service (<NUM>) comprising one or more processors (3010A-N) and a memory (<NUM>) to store computer-executable instructions that, when executed, cause the one or more processors to:
store a plurality of items of a graph database (<NUM>) in a triple store table, wherein individual items of the graph database comprise at least an identifier (<NUM>), a property (<NUM>) and a value for the property (<NUM>), wherein more than one item of the graph database comprises a same particular property, and wherein individual properties of the items are associated with a respective data type for the corresponding values for the property, such that all the values for the particular property of the graph database share the same data type that is associated with the particular property;
create indices (160A-G) corresponding to the properties, wherein an individual one of the indices corresponds to an individual one of the properties, and wherein the individual one of the indices comprises one or more of the values associated with the corresponding property; and
perform a query on the graph database, wherein the query on the graph database is performed using one or more of the indices corresponding to one or more of the properties associated with the query.