# IC DBMS Canister

[](https://opensource.org/licenses/MIT)
[](https://github.com/veeso/ic-dbms-canister/stargazers)
[](https://crates.io/crates/ic-dbms-canister)
[](https://crates.io/crates/ic-dbms-canister)
[](https://ko-fi.com/veeso)
[](https://conventionalcommits.org)
[](https://github.com/veeso/ic-dbms-canister/actions)
[](https://coveralls.io/github/veeso/ic-dbms-canister)
[](https://docs.rs/ic-dbms-canister)
This project is in a very early stage of development. The goal is to provide a framework for building database canisters on the Internet Computer.
## Overview
IC DBMS Canister is an Internet Computer framework which provides an easy way to implement a database canister by just providing the database schema.
The user can just define the data entity by defining the tables
```rust
#[derive(Table)]
struct User {
#[primary_key]
id: Uint64,
name: Text,
email: Text,
age: Nullable<Uint32>,
}
```
This will provide for the user the following API:
todo...
You can also define relationships between tables:
```rust
#[derive(Table)]
struct Post {
#[primary_key]
id: Uint64,
title: Text,
content: Text,
#[foreign_key(table = "User", column = "id")]
author_id: Uint64,
}
```
And once you have defined all your tables, you can instantiate the database canister:
```rust
ic_dbms_canister!(User, Post);
```
And you will have a fully functional database canister with all the CRUD operations implemented for you.
The canister API will be automatically generated based on the defined tables, with the following methods:
todo...
## Features
- [x] Define tables with common attributes
- [x] CRUD operations
- [x] Complex queries with filtering and pagination
- [x] Relationships between tables with foreign keys
- [x] Transactions with commit and rollback
- [x] Access Control Lists (ACL) to restrict access to the database
- [ ] JOIN operations between tables (coming soon)
- [ ] Migrations to update the database schema without losing data (coming soon)
- [ ] Indexes on columns to optimize queries (coming soon)
## Documentation
- [Memory Management](./docs/memory.md)
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.