{"id":15195100,"url":"https://github.com/erictherobot/tinydb-julia","last_synced_at":"2026-02-15T16:35:18.294Z","repository":{"id":183121153,"uuid":"669635206","full_name":"erictherobot/tinydb-julia","owner":"erictherobot","description":"An extremely simple database written in the Julia Programming Language.","archived":false,"fork":false,"pushed_at":"2023-07-22T23:41:25.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T14:41:37.260Z","etag":null,"topics":["database","julia","julia-database","julia-language","tinydb"],"latest_commit_sha":null,"homepage":"https://ericdavidsmith.com/blog/software/tinydb-julia","language":"Julia","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/erictherobot.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":"2023-07-22T23:41:18.000Z","updated_at":"2023-07-23T00:10:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d7e2500-af86-4442-bea4-80e0c800390e","html_url":"https://github.com/erictherobot/tinydb-julia","commit_stats":null,"previous_names":["erictherobot/tinydb-julia"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erictherobot/tinydb-julia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictherobot%2Ftinydb-julia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictherobot%2Ftinydb-julia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictherobot%2Ftinydb-julia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictherobot%2Ftinydb-julia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erictherobot","download_url":"https://codeload.github.com/erictherobot/tinydb-julia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erictherobot%2Ftinydb-julia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278614466,"owners_count":26015967,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","julia","julia-database","julia-language","tinydb"],"created_at":"2024-09-27T23:06:32.737Z","updated_at":"2025-10-06T12:58:16.826Z","avatar_url":"https://github.com/erictherobot.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TinyDB Julia\n\nAn extremely simple database written in the Julia Programming Language. This is a very rudimentary database and lacks many features you would expect in a production-ready system, such as indexing for fast lookups, transactions, concurrency control, error handling, data integrity checks, and more. It is intended to be used for small projects where you need a database but don't want to deal with the overhead of setting up a full-fledged database.\n\n## Installation\n\nSince this is a simple project, there is no installation process per se. You just need to clone the repository and ensure you have Julia installed on your system.\n\n```bash\ngit clone https://github.com/erictherobot/tinydb-julia.git\n```\n\n## Usage\n\nThis project provides a `TinyDB` struct that represents the database and `store` and `retrieve` functions to interact with the database.\n\nHere is a basic example:\n\n```julia\ninclude(\"src/TinyDB.jl\")\n\n# create a new database\ndb = TinyDB(\"mydb.txt\")\n\n# store a key-value pair in the database\nstore(db, \"Hello\", \"World\")\n\n# retrieve the value for a given key\nprintln(retrieve(db, \"Hello\"))  # prints \"World\"\n```\n\nThe database is stored in a text file. The file format is very simple: each line contains a key-value pair separated by a colon. For example, the following file contains two key-value pairs:\n\n## Running the Example\n\nTo run the example, use the following command:\n\n```bash\njulia example.jl\n```\n\nThis will create a database file called `mydb.txt` and store the key-value pair `\"Hello\": \"World\"` in the database. It will then retrieve the value for the key `\"Hello\"` and print it to the console.\n\n## Tests\n\nThis project includes a small set of tests. You can run the tests with the following command:\n\n```bash\njulia test/runtests.jl\n```\n\nwhich should produce the following output:\n\n```bash\nTest Summary: | Pass  Total  Time\nTinyDB Tests  |    3      3  0.1s\n```\n\nThese tests verify basic functionality such as storing and retrieving key-value pairs, and overwriting existing keys with new values. They also test that the database file is created if it does not already exist.\n\n## Future Work\n\nWhile this project is intentionally simple, there are many ways it will be extended:\n\n- Add error handling: Currently, if an error occurs during a file operation, the program will crash. It would be better to catch these errors and handle them gracefully.\n- Support more data types: Right now, this database can only store strings. It would be useful to support other data types, such as integers, floats, and booleans.\n- Indexing: To improve lookup speed, an index could be added. This would be especially beneficial for large databases.\n- Transactions: Adding support for transactions would make the database more robust and allow for complex operations that involve multiple reads and writes.\n- Concurrency control: If multiple processes are accessing the database at the same time, there is a risk of data corruption. Adding concurrency control would prevent this.\n- Data integrity checks: It would be useful to add some sort of checksum to the database file to ensure that it has not been corrupted.\n- More tests: The test suite could be expanded to cover more functionality and edge cases.\n- Benchmarks: It would be interesting to compare the performance of this database to other databases.\n- Documentation: This project could benefit from more documentation, including a description of the database format and how to use the database.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## Author\n\n[Eric David Smith](https://ericdavidsmith.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferictherobot%2Ftinydb-julia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferictherobot%2Ftinydb-julia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferictherobot%2Ftinydb-julia/lists"}