{"id":26319002,"url":"https://github.com/wittyicon29/in-memory-db","last_synced_at":"2025-03-15T15:17:16.947Z","repository":{"id":269149567,"uuid":"906570356","full_name":"wittyicon29/In-Memory-DB","owner":"wittyicon29","description":"An in-memory database using C++ is a system that stores data primarily in RAM for fast access and manipulation. It supports basic CRUD operations and may include features for concurrency control and optional data persistence.","archived":false,"fork":false,"pushed_at":"2024-12-21T09:29:42.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-21T10:24:45.185Z","etag":null,"topics":["data-structures","oops-in-cpp","regex"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wittyicon29.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":"2024-12-21T09:15:06.000Z","updated_at":"2024-12-21T09:29:45.000Z","dependencies_parsed_at":"2024-12-21T10:35:16.573Z","dependency_job_id":null,"html_url":"https://github.com/wittyicon29/In-Memory-DB","commit_stats":null,"previous_names":["wittyicon29/in-memory-db"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wittyicon29%2FIn-Memory-DB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wittyicon29%2FIn-Memory-DB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wittyicon29%2FIn-Memory-DB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wittyicon29%2FIn-Memory-DB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wittyicon29","download_url":"https://codeload.github.com/wittyicon29/In-Memory-DB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243746242,"owners_count":20341204,"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":["data-structures","oops-in-cpp","regex"],"created_at":"2025-03-15T15:17:16.192Z","updated_at":"2025-03-15T15:17:16.941Z","avatar_url":"https://github.com/wittyicon29.png","language":"C++","readme":"# In-Memory Database Project\n\nWelcome to the **In-Memory Database Project**, an implementation of a simple yet powerful in-memory database in C++. This project demonstrates various computer science concepts like Object-Oriented Programming (OOP), data structures, operator overloading, and regular expressions.\n\n---\n\n## Features\n\n- **SET Operation**: Add or update key-value pairs in the database.\n- **GET Operation**: Retrieve values by their corresponding keys.\n- **DELETE Operation**: Remove key-value pairs from the database.\n- **DISPLAY Operation**: View all the key-value pairs stored in the database.\n- **FIND Operation**: Search for specific keys or values.\n\n---\n\n## Concepts Used\n\n### 1. **Object-Oriented Programming (OOP)**\n   - Encapsulation: The database and query engine functionalities are encapsulated within their respective classes (`Database` and `QueryEngine`).\n   - Abstraction: Users interact with the database via simple commands executed by the `QueryEngine`.\n   - Inheritance and Polymorphism: Extensible structure for future enhancements, such as adding more operations or derived classes.\n\n### 2. **Data Structures**\n   - **HashMap (std::unordered_map)**: Efficient storage and retrieval of key-value pairs.\n   - **String Manipulation**: To parse and process queries using C++ string utilities.\n\n### 3. **Regular Expressions (Regex)**\n   - Used for parsing and validating user queries in the `QueryEngine`.\n   - Ensures robustness in handling various input formats.\n\n### 4. **Operator Overloading**\n   - Custom behavior for certain operators (e.g., assignment or comparison) can be implemented for database objects if needed.\n\n---\n\n## Prerequisites\n\nMake sure you have the following installed:\n- **GCC** (GNU Compiler Collection) with C++17 support\n- **Make** build automation tool\n\n---\n\n## Build and Run Instructions\n\n### Step 1: Clone the Repository\n```\ngit clone \u003crepository-url\u003e\ncd in-memory-database\n```\n\n### Step 2: Build the Project\nUse the provided `Makefile` to compile the project:\n```\nmake\n```\n\n### Step 3: Run the Executable\nAfter successful compilation, execute the program:\n```\nmake run\n```\n\n### Step 4: Clean Up\nTo remove compiled files, use:\n```\nmake clean\n```\n\n---\n\n## Sample Usage\n\n1. **Add Key-Value Pairs**:\n   ```\n   SET name John\n   SET age 30\n   SET city \"New York\"\n   ```\n2. **Display Database Contents**:\n   ```\n   DISPLAY\n   ```\n3. **Retrieve Values**:\n   ```\n   GET name\n   GET city\n   ```\n4. **Delete Key-Value Pairs**:\n   ```\n   DELETE age\n   ```\n5. **Find Specific Keys or Values**:\n   ```\n   FIND name\n   FIND \"New York\"\n   ```\n\n---\n\n## Future Enhancements\n- Add support for complex data types (e.g., arrays or nested objects).\n- Implement persistence to allow saving and loading database contents from a file.\n- Introduce multi-threading for handling concurrent queries.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwittyicon29%2Fin-memory-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwittyicon29%2Fin-memory-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwittyicon29%2Fin-memory-db/lists"}