Skip to content

PotatoHD404/ParallelDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParallelDB

In memory database with parallelizing subqueries.

Frontend: Vue3 + Typescript (hosted on vercel)

Backend: C# + ASP.Net (hosted on aws lambda)

Usage example

CREATE TABLE Statement:

CREATE TABLE IF NOT EXISTS table1 (
    id int DEFAULT 1,
    name TEXT NOT NULL,
    state boolean NOT NULL DEFAULT true
);
CREATE TABLE IF NOT EXISTS table2 (
    id int DEFAULT 1,
    name TEXT NOT NULL,
    state boolean NOT NULL DEFAULT true
);

Syntax tree for table1:

alt text

INSERT TABLE Statement

INSERT INTO table1 (id, name, state) 
VALUES (1, 'A', true), (2, 'B', false), 
       (3, 'C', true), (4, 'D', false);
INSERT INTO table2 (id, name, state) 
VALUES (1, 'A', true), (2, 'B', true), 
       (3, 'C', true), (4, 'D', true);

Syntax tree for table1:

alt text

Query tree for table1:

alt text

SELECT TABLE Statement

SELECT * FROM table1 WHERE state = true LIMIT 1;

Result:

id name state
1 A true

Syntax tree:

alt text

Query tree:

alt text

SELECT name FROM table1 EXCEPT SELECT * FROM table2;

Result:

name
B
D

Syntax tree:

alt text

Query tree:

alt text

SELECT * FROM (SELECT * FROM table1), (SELECT * FROM table2);

Result:

id name state id name state
1 A true 1 A true
1 A true 2 B true
1 A true 3 C true
1 A true 4 D true
2 B false 1 A true
2 B false 2 B true
2 B false 3 C true
2 B false 4 D true
3 C true 1 A true
3 C true 2 B true
3 C true 3 C true
3 C true 4 D true
4 D false 1 A true
4 D false 2 B true
4 D false 3 C true
4 D false 4 D true

Syntax tree:

alt text

Query tree:

alt text

UPDATE TABLE Statement

UPDATE table1 SET name = 'X', state = false WHERE id = 1;

Result:

id name state
1 X false
2 B false
3 C true
4 D false

Syntax tree for table1:

alt text

Query tree for table1:

alt text

DELETE TABLE Statement

DELETE FROM table1 WHERE state = false;

Result:

id name state
3 C true

Syntax tree for table1:

alt text

Query tree for table1:

alt text

DROP TABLE Statement

DROP TABLE table1;

Syntax tree for table1:

alt text

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published