<commit_before>Table Structure
---------------

This file documents the structure of backend tables
used for storing elements, properties, etc.

**Note (29 Dec 2014): This documentation is out of date.**

## Vertex Table

Row ID | Column Family | Column Qualifier | Value
---|---|---|---
VertexID | Label Flag | Exists Flag | [empty]
VertexID | INVERTEX | OutVertexID_EdgeID | Edge Label
VertexID | OUTVERTEX | InVertexID_EdgeID | Edge Label
VertexID | Property Key | [empty] | Serialized Value

## Edge Table

Row ID | Column Family | Column Qualifier | Value
---|---|---|---
EdgeID|Label Flag|InVertexID_OutVertexID|Edge Label
EdgeID|Property Key|[empty]|Serialized Value

## Edge/Vertex Index
Row ID | Column Family | Column Qualifier | Value
---|---|---|---
Serialized Value|Property Key|VertexID/EdgeID|[empty]

## Metadata Table

Row ID | Column Family | Column Qualifier | Value
---|---|---|---
Index Name| Index Class |[empty]|[empty]<commit_msg>Initial commit of table structure documentation; still needs work<commit_after>AccumuloGraph Table Schema
==========================

AccumuloGraph uses a number of backing tables for data storage.
This file documents the structure and organization of these
tables. The tables and records are structured in such a way as
to implement the Blueprints operations in terms of efficient Accumulo
operations, i.e., prefix searches, contiguous scans, and
batch operations.
For our purposes, Accumulo entries consist of four fields:
row (R), column family (CF), column qualifier (CQ), and value (V).
For more information on Accumulo's schema and how to
access records efficiently, see the
[Accumulo documentation](https://accumulo.apache.org/1.5/accumulo_user_manual.html).

The tables used by AccumuloGraph are prefixed by the configured graph
name and can be classed as element/property tables, and
index tables.  Their structure is discussed below.

Elements and properties
-----------------------

Vertex and edge information, along with their properties, are stored
in the *graphname*\_vertex and *graphname*\_edge tables respectively.

| R | CF | CQ | V |
|---|----|----|---|
| *vertex_id* | `_LABEL_` | `_EXISTS_`| *[empty]* |

| R | CF | CQ | V |
|---|----|----|---|
| *edge_id* | `_LABEL_` | *in_vertex_id*`_DELIM_`*out_vertex_id* | *edge_label* |

| R | CF | CQ | V |
|---|----|----|---|
| *in_vertex_id* | `_IN_EDGE_` | *out_vertex_id*`_DELIM_`*edge_id* | *edge_label* |
| *out_vertex_id* | `_OUT_EDGE_` | *in_vertex_id*`_DELIM_`*edge_id* | *edge_label* |

| R | CF | CQ | V |
|---|----|----|---|
| *element_id* | *property_key* | *[empty]* | *property_value* |

Indexes
-------

Relevant table names:

1. *graphname*\_vertex\_key\_index - Vertex property key index
2. *graphname*\_edge\_key\_index - Edge property key index
3. *graphname*\_indexed\_keys - List of indexed keys
4. *graphname*\_index\_names - List of named index names
5. *graphname*\_index\_*indexname* - Named index

| R | CF | CQ | V |
|---|----|----|---|
| *property_value* | *property_key* | *element_id* | *[empty]* |

| R | CF | CQ | V |
|---|----|----|---|
| *property_key* | *element_class* | *[empty]* | *[empty]* |

| R | CF | CQ | V |
|---|----|----|---|
| *index_name* | *element_class* | *[empty]* | *[empty]* |
{'fraction_non_alphanumeric': 0.18226600985221675, 'fraction_numerical': 0.0040024630541871924, 'mean_word_length': 3.5250696378830084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5067408', 'n_tokens_mistral': 1050, 'n_tokens_neox': 1013, 'n_words': 334}