Implementation, load testing, comparison of popular ways of storing graphs and searching by them in databases.
You can download the installation package:
The purpose of the package is to search and analyze the ways of storing graphs in SQL databases. SQLite is used as the database and SQL language of the package, as the most universal representative of the SQL family.
- Random graph generator for tests
- Random graph settings for different stress tests (% chance of select current variant in others)
- maxLeaves n
- operations n 1000
- insert
- chance % 1
- source
- new % 1 - Create new node
- old % 1 - Find random node
- leave %
- root % 0 - Use root nodes in trees (nodes without incoming links), if exists
- edge %
- null %
- target
- new % 1 - Create new node
- old % 1 - Find random node
- leave %
- root % 0 - Use root nodes in trees (nodes without incoming links), if exists
- edge %
- null %
- update
- chance % 1
- insertIfBroken +
- source
- ignore % 1
- new % 1 - Create new node
- old % 1 - Find random node
- leave %
- root % 0 - Use root nodes in trees (nodes without incoming links), if exists
- edge %
- null %
- target
- ignore % 1
- new % 1 - Create new node
- old % 1 - Find random node
- leave %
- root % 0 - Use root nodes in trees (nodes without incoming links), if exists
- edge %
- null %
- delete
- chance % 1
- insertIfBroken +
- Recursive implementation (R)
- Nested set
- Nested set implementation (NS)
- Nested set with multi position implementation for multi parents and recursions (NS+M)
- Nested set with merges and inherits implementation for multi parents and recursions (NS+MI)
- Adjacency list
- Adjacency list implementation (AL)
- Adjacency list in 36 bit (AL36)
- Adjacency list with multi position implementation for multi parents and recursions (AL+M)
- Adjacency list in 36 bit with multi position implementation for multi parents and recursions (AL36+M)
- Adjacency list with merges and inherits implementation for multi parents and recursions (AL+MI)
- Adjacency list in 36 bit with merges and inherits implementation for multi parents and recursions (AL36+MI)
To perform a self-assembly project or add your own turbo add-on, follow these simple steps:
- Clone the repository and prepare it for work:
git clone https://github.com/AncientSouls/SqlGraph.git ancient-sql-graph
cd ./ancient-sql-graph
NODE_ENV=development npm install
-
In this step, make the necessary changes to the code, if required.
-
After making the changes, perform the code check with the parser:
npm run check
- Perform functional testing of the code:
npm run test
- After successfully passing the tests, compile the source code:
npm run build
- Done! If required, create a package to install and distribute your version:
npm pack
MIT. Copyright (c) AncientSouls.