Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ziglibs/zdb
Allocator-free document oriented database management. WIP
https://github.com/ziglibs/zdb
Last synced: 3 months ago
JSON representation
Allocator-free document oriented database management. WIP
- Host: GitHub
- URL: https://github.com/ziglibs/zdb
- Owner: ziglibs
- License: mit
- Created: 2023-02-28T09:21:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T22:08:54.000Z (almost 2 years ago)
- Last Synced: 2024-08-04T04:07:33.170Z (6 months ago)
- Language: Zig
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - zdb🗒️Allocator-free document oriented database management
README
# zdb
Allocator-free document oriented database management, heavily inspired by [TinyDB](https://github.com/msiemens/tinydb).
## Abstract
Warning
|-
This library is still in development. Please use at your own expense.zdb is inspired by TinyDB, meaning this library also utilises JSON files
as its main storage. zdb is also designed and meant to go hand-in-hand with
[zorm](https://github.com/ziglibs/zorm), interoperable with one another.## Structure
The architecture of this database design has been shrinked for maximising
efficiency and optimisation strategies.Here's a mockup example for a lack of better words:
```md
Database {
Table {
Item {
T (type)
v (T) -> undefined
}size (u64) -> undefined
items (array of Item)search(T or expr)
add(T or expr)
remove(T or expr)
clear(?T)
}tables (array of Table) -> undefined
}Query {
where(expr) !Item
exists(T) !bool
}
```### Caviats
Simplicity and ease-of-use are the primary goals of zdb. You may not
want to use this if:- You need the database cached during realtime
- Are seeking to use your own alloc for memory allocation
- Needing to hook in-between transactions with middleware## Building
zdb runs on 0.11.0-dev and higher versions of Zig.
It is recommended to install and build from source:
```bash
$ git clone --recursive https://github.com/ziglibs/zdb
$ cd ./zdb
$ zig build
```