{"id":25044580,"url":"https://github.com/mantzaris/wundeedb.jl","last_synced_at":"2025-09-22T23:09:39.017Z","repository":{"id":275880122,"uuid":"927468824","full_name":"mantzaris/WunDeeDB.jl","owner":"mantzaris","description":"Your just-works / zero-config / embedded / WAL: vector database","archived":false,"fork":false,"pushed_at":"2025-06-20T21:56:42.000Z","size":835,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T07:55:11.782Z","etag":null,"topics":["embedded","julia","julialang","vector-database"],"latest_commit_sha":null,"homepage":"https://mantzaris.github.io/WunDeeDB.jl","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/mantzaris.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-05T02:17:28.000Z","updated_at":"2025-07-23T19:38:27.000Z","dependencies_parsed_at":"2025-02-20T04:20:37.572Z","dependency_job_id":"ebf955d9-0ff9-46ac-a7c2-1e7ceb202632","html_url":"https://github.com/mantzaris/WunDeeDB.jl","commit_stats":null,"previous_names":["mantzaris/wundeedb.jl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mantzaris/WunDeeDB.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantzaris%2FWunDeeDB.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantzaris%2FWunDeeDB.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantzaris%2FWunDeeDB.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantzaris%2FWunDeeDB.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mantzaris","download_url":"https://codeload.github.com/mantzaris/WunDeeDB.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mantzaris%2FWunDeeDB.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276487484,"owners_count":25651133,"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-09-22T02:00:08.972Z","response_time":79,"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":["embedded","julia","julialang","vector-database"],"created_at":"2025-02-06T05:18:35.605Z","updated_at":"2025-09-22T23:09:39.011Z","avatar_url":"https://github.com/mantzaris.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WunDeeDB.jl\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) \n[![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://mantzaris.github.io/WunDeeDB.jl/) \n[![Build Status](https://github.com/mantzaris/WunDeeDB.jl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mantzaris/WunDeeDB.jl/actions)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.08033/status.svg)](https://doi.org/10.21105/joss.08033)\n\n# WunDeeDB is a vector DataBase with a SQLite backend \n\n([link to docs](https://mantzaris.github.io/WunDeeDB.jl))\n\nWunDeeDB is a Julia package for **storing and querying embeddings** in a SQLite database. It supports a variety of numerical types (including `Float16`, `Float32`, `Float64`, and various integer types) and can integrate with approximate nearest neighbor indices (like **HNSW** or **LM‐DiskANN**). By default, the module provides a **linear fallback** for distance queries if no ANN method is enabled.\n\n**HNSW**: Malkov, Y. A., \u0026 Yashunin, D. A. (2018). Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. IEEE transactions on pattern analysis and machine intelligence, 42(4), 824-836.\n\n**LM-DiskANN**: Pan, Y., Sun, J., \u0026 Yu, H. (2023, December). Lm-diskann: Low memory footprint in disk-native dynamic graph-based ann indexing. In 2023 IEEE International Conference on Big Data (BigData) (pp. 5987-5996). IEEE.\n\n# Using the package (Quick examples for HNSW/LM-DiskANN, and linear)\n\n\n**Minimal code snippet** showing how to create a database, insert a couple embeddings, and then run searches with **HNSW**, **LM‐DiskANN**, and a **linear** fallback. (We assume each approach uses a separate DB for illustration.)\n\nInstall via: `(@v1.9) pkg\u003e add https://github.com/mantzaris/WunDeeDB.jl`\n\n```julia\nusing WunDeeDB\n\n#\n# 1) Example: HNSW\n#\nhnsw_db = \"temp_hnsw.sqlite\"\ninitialize_db(hnsw_db, 3, \"Float32\"; ann=\"hnsw\")\ninsert_embeddings(hnsw_db, \"node1\", Float32[0.0, 0.0, 0.0])\ninsert_embeddings(hnsw_db, \"node2\", Float32[1.0, 1.0, 1.0])\n\n# search for top-1 neighbor using HNSW adjacency\nfound_hnsw = search_ann(hnsw_db, Float32[0.1, 0.1, 0.1], \"euclidean\"; top_k=1)\nprintln(\"HNSW found: \", found_hnsw)\n\n#\n# 2) Example: LM-DiskANN\n#\nlmdiskann_db = \"temp_lmdiskann.sqlite\"\ninitialize_db(lmdiskann_db, 3, \"Float32\"; ann=\"lmdiskann\")\ninsert_embeddings(lmdiskann_db, \"nodeA\", Float32[0.5, 0.5, 0.4])\ninsert_embeddings(lmdiskann_db, \"nodeB\", Float32[0.8, 0.9, 0.7])\n\n# search for top-2 neighbors using LM-DiskANN adjacency\nfound_lmdiskann = search_ann(lmdiskann_db, Float32[0.55, 0.55, 0.35], \"euclidean\"; top_k=2)\nprintln(\"LM-DiskANN found: \", found_lmdiskann)\n\n#\n# 3) Example: Linear fallback (no ann)\n#\nlinear_db = \"temp_linear.sqlite\"\ninitialize_db(linear_db, 3, \"Float32\"; ann=\"\")\ninsert_embeddings(linear_db, \"X\", Float32[0.0, 1.0, 2.0])\ninsert_embeddings(linear_db, \"Y\", Float32[1.0, 1.0, 2.0])\n\n# fallback linear search:\nfound_linear = search_ann(linear_db, Float32[0.1, 1.0, 2.1], \"euclidean\"; top_k=2)\nprintln(\"Linear fallback found: \", found_linear)\n```\n\nand some more examples\n\n```julia\nusing WunDeeDB\n\n#\n# 1) Initialize a database, dimension=3, Float32, no ann\n#\ndb_path = \"my_demo.sqlite\"\ninitialize_db(db_path, 3, \"Float32\"; keep_conn_open=true, description=\"Demo DB\", ann=\"\")  \n\n#\n# 2) Insert Embeddings\n#    - single key =\u003e single embedding\n#    - multiple keys =\u003e vector-of-vectors\n#\ninsert_embeddings(db_path, \"key1\", Float32[0.1, 0.2, 0.3])\ninsert_embeddings(db_path, [\"key2\", \"key3\"], [Float32[1.0, 1.1, 1.2], Float32[9.0, 9.1, 9.2]])\n\n#\n# 3) Retrieve Embeddings\n#    - single key =\u003e single vector\n#    - multiple keys =\u003e dictionary of key =\u003e vector\n#\n# Single Key\nmy_embedding = get_embeddings(db_path, \"key1\")  \nprintln(\"key1 embedding: \", my_embedding)\n\n# Multiple keys\nsome_embeddings = get_embeddings(db_path, [\"key2\", \"key3\"])\nprintln(\"Retrieved keys: \", keys(some_embeddings))\nprintln(\"key2 embedding =\u003e \", some_embeddings[\"key2\"])\nprintln(\"key3 embedding =\u003e \", some_embeddings[\"key3\"])\n\n#\n# 4) Delete Embeddings by Keys\n#    - Single or multiple keys can be removed\n#\ndelete_embeddings(db_path, \"key1\")\ndelete_embeddings(db_path, [\"key2\", \"key3\"])\n\n# After deletion, retrieving them returns nothing or an error\ncheck_after_delete = get_embeddings(db_path, \"key1\")\nprintln(\"key1 after deletion =\u003e \", check_after_delete)  # likely nothing or error string\n\n#\n# 5) Close DB\n#\nclose_db()  # or close_db(db_path) if your code does that\n\n```\n\nread the documentation for more details on the variety of functions.\n\n\n### naming of the package\nIn his book How JavaScript Works, Douglas Crockford advocates for spelling the word \"one\" as \"wun\" to better align with its pronunciation. He argues that the traditional spelling does not conform to standard English pronunciation rules and that having the word for 1 start with a letter resembling 0 is problematic. Since a vector database is a database for 1-D objects, it is called **Wun-Dee-DB**. \n\nAlong with a simple name should be the simple approach for a: zero-config, embedded, WAL, just works vector database.\n\n# Citing this work\n\n- Mantzaris, A. V., (2025). WunDeeDB.jl: An easy to use, zero config, WAL, SQLite backend vector database. Journal of Open Source Software, 10(110), 8033, https://doi.org/10.21105/joss.08033\n\n- @article{Mantzaris2025, doi = {10.21105/joss.08033}, url = {https://doi.org/10.21105/joss.08033}, year = {2025}, publisher = {The Open Journal}, volume = {10}, number = {110}, pages = {8033}, author = {Alexander V. Mantzaris}, title = {WunDeeDB.jl: An easy to use, zero config, WAL, SQLite backend vector database}, journal = {Journal of Open Source Software} } \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantzaris%2Fwundeedb.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmantzaris%2Fwundeedb.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmantzaris%2Fwundeedb.jl/lists"}