Extensible property graph database stored in JSON-LD.
GraphletDB calls its records "nodes" and enforces bidirectional relationships between connected nodes by requiring each node holds the id of the related node in a property.
At a minimum, each node must contain the properties included in the CoreTemplateObject
.
Of these, @id
must be unique within the dataset and @type
must not be an empty string. While the examples here include context prefixes for type values, context is not required.
@date
, @text
and rel__nodes
must both be lists, but
they can be empty.
"gdb:CoreTemplateObject": {
"gdb:@date": [
""
],
"gdb:@id": "",
"@type": "gdb:CoreTemplateObject",
"gdb:@text": "",
"gdb:rel__nodes": []
}
GraphletDB supports creating custom types of nodes consisting of properties that are typed by one of the following prefixes:
Prefix | Definition |
---|---|
bool__ | boolean |
int__ | integer |
radio__ | list of string options |
rel__ | list of “id” strings |
str__ | string |
list__ | list |
Property | Type | Example |
---|---|---|
@type gdb:@date gdb:@id gdb:@text gdb:rel__nodes |
string list of strings string string list of id strings |
Person ["202402010658jenner"] e95bc8c502 John Random [] |
str__firstName str__lastName rel__worksCreated |
string string list of id strings |
"John" "Rando" ["c2092618aa3840"] |
Property | Type | Example |
---|---|---|
@type gdb:@date gdb:@id gdb:@text gdb:rel__nodes |
string list of strings string string list of id strings |
Book ["2023081102301jenner"] c2092618aa3840 The Wandering Wizard [] |
str__title int__copiesSold bool__awarded rel__writtenBy |
string integer boolean list of id strings |
"The Wandering Wizard" 4 false ["e95bc8c502"] |
"@graph": {
"dc:Person": {
"@type": "gdb:TypeCollection",
"gdb:typeName": "Person",
"gdb:entries": [
{
"gdb:@date": [
"202402010658jenner"
],
"gdb:@id": "e95bc8c502",
"@type": "Person",
"gdb:@text": "John Random",
"str__firstName": "John",
"str__lastName": "Random",
"rel__worksCreated": [
"c2092618aa3840"
],
"gdb:rel__nodes": []
}
]
},
"dc:Book": {
"@type": "gdb:TypeCollection",
"gdb:typeName": "Book",
"gdb:entries": [
{
"gdb:@date": [
"2023081102301jenner"
],
"gdb:@id": "c2092618aa3840",
"gdb:@text": "The Wandering Wizard",
"@type": "Book",
"str__title": "The Wandering Wizard",
"int__copiesSold": 4,
"bool__awarded": false,
"rel__writtenBy": [
"e95bc8c502"
],
"gdb:rel__nodes": []
}
]
}
}