{"id":25602808,"url":"https://github.com/aviat-at/ramdb1","last_synced_at":"2026-06-13T21:31:34.609Z","repository":{"id":278227851,"uuid":"934918649","full_name":"Aviat-at/ramdb1","owner":"Aviat-at","description":"ramdb is a lightweight, in-memory database built using Python's memory-mapped file capabilities.","archived":false,"fork":false,"pushed_at":"2025-02-18T16:52:21.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T17:42:08.765Z","etag":null,"topics":["cloud-computing-concepts","databse","devops-team","opensource-projects","python3","ramdb"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Aviat-at.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}},"created_at":"2025-02-18T16:03:50.000Z","updated_at":"2025-02-18T16:52:25.000Z","dependencies_parsed_at":"2025-02-18T17:42:10.340Z","dependency_job_id":"4db6ce2c-91d6-48cc-a67a-b8aae2323b44","html_url":"https://github.com/Aviat-at/ramdb1","commit_stats":null,"previous_names":["aviat-at/ramdb1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aviat-at%2Framdb1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aviat-at%2Framdb1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aviat-at%2Framdb1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aviat-at%2Framdb1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aviat-at","download_url":"https://codeload.github.com/Aviat-at/ramdb1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240056097,"owners_count":19741074,"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":["cloud-computing-concepts","databse","devops-team","opensource-projects","python3","ramdb"],"created_at":"2025-02-21T17:24:09.660Z","updated_at":"2025-11-10T21:32:32.867Z","avatar_url":"https://github.com/Aviat-at.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ramdb\n\nramdb is a lightweight, in-memory database built using Python's memory-mapped file capabilities. It simulates a simple database system by loading data (e.g., from MySQL) into RAM, enabling rapid query responses and benchmarking comparisons between traditional MySQL queries and in-memory queries.\n\n## Features\n\n- **In-Memory Data Storage:** Utilizes a memory-mapped file to simulate a RAM database.\n- **MySQL Integration:** Load data directly from MySQL tables (e.g., the departments table from an employees database) into RAM.\n- **Fast Query Execution:** Offers a query engine that performs bit-address based lookups for fast data retrieval.\n- **Performance Benchmarking:** Compare query execution times between MySQL and ramdb.\n- **Debug and Testing Tools:** Includes scripts for testing MySQL connections, loading data, and debugging RAM storage.\n- **Swap System:** Contains a simple mechanism to move data from RAM to disk (SSD) when memory is limited.\n\n## File Overview\n\n- **benchmark_ram_vs_mysql.py:** Benchmarks and compares the query performance of MySQL versus the in-memory ramdb.\n- **test_mysql_loader.py:** Loads the departments table from MySQL into ramdb and prints all stored records for verification.\n- **query_engine.py:** Provides methods for inserting and fetching records using bit-address lookup.\n- **memory_manager.py:** Manages the low-level memory mapping, including allocation and fetching of records.\n- **debug_ram_storage.py:** Debug utility that reloads data into ramdb and prints stored records for troubleshooting.\n- **mysql_loader.py:** Connects to a MySQL database and loads selected table data into the in-memory ramdb.\n- **test_mysql_connection.py:** Verifies the connection to the MySQL database and lists available tables.\n- **swap_system.py:** Implements a basic swap mechanism to offload records from RAM to disk when needed.\n\n## Installation\n\n### Prerequisites\n\n- Python 3.6 or higher\n- MySQL Server\n\n### Python Packages\n\n- `mysql-connector-python`\n\n### Setup Steps\n\n1. **Clone the Repository:**\n\n✅ **Engage with the open-source community** to improve RAMDB’s performance.\n\n📢 **Want to contribute?** Check out our [GitHub Issues](#) and [Discussions](#). 🚀\n\n\n   ```bash\n   git clone https://github.com/Aviat-at/ramdb.git\n   cd ramdb\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviat-at%2Framdb1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faviat-at%2Framdb1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faviat-at%2Framdb1/lists"}