{"id":21070200,"url":"https://github.com/mattheusv/tinydb","last_synced_at":"2025-05-16T05:30:40.887Z","repository":{"id":41056087,"uuid":"412293396","full_name":"mattheusv/tinydb","owner":"mattheusv","description":"A database implementation from scratch in Rust","archived":false,"fork":false,"pushed_at":"2023-03-11T17:04:09.000Z","size":257,"stargazers_count":42,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-14T01:59:15.455Z","etag":null,"topics":["database","postgresql","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattheusv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-10-01T02:05:40.000Z","updated_at":"2025-04-17T13:43:14.000Z","dependencies_parsed_at":"2023-11-21T14:50:16.224Z","dependency_job_id":"799387fa-a9e7-484f-8794-9fe14803aac0","html_url":"https://github.com/mattheusv/tinydb","commit_stats":null,"previous_names":["mattheusv/tinydb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattheusv%2Ftinydb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattheusv%2Ftinydb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattheusv%2Ftinydb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattheusv%2Ftinydb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattheusv","download_url":"https://codeload.github.com/mattheusv/tinydb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254473740,"owners_count":22077160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","postgresql","rust"],"created_at":"2024-11-19T18:44:32.111Z","updated_at":"2025-05-16T05:30:40.146Z","avatar_url":"https://github.com/mattheusv.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinydb\nA database implementation from scratch in Rust for study purpose.\n\n---\nThe most implementations is based on Postgresql implementation itself. Some design choices are:\n\n- Buffer pool manager written from scratch (Tinydb don't use mmap)\n- [LRU](https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU) algorithm implementation for buffer victim \n- [Heap](https://en.wikipedia.org/wiki/Heap_(data_structure)) file format is used to store database files.\n- [NULL values are handled using a bitmap](https://www.highgo.ca/2020/10/20/the-way-to-store-null-value-in-pg-record/) \n- [Postgres Wire Protocol implementation](https://www.postgresql.org/docs/current/protocol-flow.html) \n\n\n## Building\nTinydb is develop in Rust, so it's necessary to have the [Rust build toolchain installed](https://www.rust-lang.org/tools/install).\n\nOnce you have installed the Rust toolchanin, just clone the repository, build the binary and run.\n\n- `git clone https://github.com/msAlcantara/tinydb`\n- `cargo install --path .`\n\n## Usage\n Tinydb is a server database that implements the [PostgreSQL Wire Protocol](https://www.postgresql.org/docs/current/protocol-flow.html) so any PostgreSQL client can be used with tinydb.\n\n The database directory should be initialized when running tinydb for the first time: `tinydb --init`\n\n For second run, you can just type `tinydb` to start the server with default configurations.\n\n And them you can connect using psql or any other Postgres client:\n\n `psql -h localhost -p 6379 -d tinydb`\n\n## Data types\n\n The supported data types are \n - INT\n - VARCHAR\n - BOOL\n\n## Example\n\n```sql\nCREATE TABLE t(a int, b varchar, c boolean);\n\nINSERT INTO t(a, b, c) VALUES(42, 'tinydb', true);\n\nSELECT * FROM t;\n\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattheusv%2Ftinydb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattheusv%2Ftinydb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattheusv%2Ftinydb/lists"}