shubho2706 / graphkin

Core of Graphkin - A simple graph based database.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Graphkin


The core of a simple graph based database engine. The data is stored in memory in a graph based data structure with Node and Relationship between nodes being the main storage enitites for the data. A node represents a unit of data stoage while a relationship represents the semantic link between two nodes. The detailed core desgin of the database is elaborated below.

Core design


Database

  • Is a logical entity encapsulating different graphs.
  • Has a unique name (of data type string).
  • Identifiable only by the name.
  • Searchable only by name.

Example


Graph

  • Is a logical entity encapsulating different nodes.
  • Has a unique name (within database) (of data type string).
  • Identifiable only by name.
  • Searchable only by name.

Example

Node

  • Core entity that stores data.
  • Identifiable by: id
  • ‘Id’ (numeric) is either provided as input or autogenerated.
  • ‘Type’ (string) provides the semantic information about the data stored in the node.
  • ‘Data’ (free-form JSON object) stores the body of the information that is to be persisted.
  • Searchable by: type and id.
  • Filtrable by: any parameter inside the data object.

Example


Relationship

  • The entity that links two nodes with some additional data describing the relation between them.
  • Has a reference to the left node (start) and right node (end).
  • Identifiable by: id
  • ‘Id’ (numeric) is either provided as input or autogenerated.
  • ‘Type’ (string) provides the semantic information about the link between the nodes.
  • ‘Data’ (free-form JSON object) stores the body of the information that is to be persisted.
  • Searchable by: type and id.
  • Filtrable by: any parameter inside the data object.

Example

About

Core of Graphkin - A simple graph based database.

License:MIT License


Languages

Language:TypeScript 97.4%Language:JavaScript 2.6%