{"id":18416902,"url":"https://github.com/rpdevjesco/oohdb","last_synced_at":"2025-08-21T08:17:34.150Z","repository":{"id":247159058,"uuid":"825157916","full_name":"RPDevJesco/OOHDB","owner":"RPDevJesco","description":"Object-Oriented Hierarchical Database (OOHDB)","archived":false,"fork":false,"pushed_at":"2024-07-07T00:43:29.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T05:26:13.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RPDevJesco.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-07-07T00:40:50.000Z","updated_at":"2024-07-07T00:43:31.000Z","dependencies_parsed_at":"2024-07-07T01:49:15.512Z","dependency_job_id":null,"html_url":"https://github.com/RPDevJesco/OOHDB","commit_stats":null,"previous_names":["rpdevjesco/oohdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RPDevJesco/OOHDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FOOHDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FOOHDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FOOHDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FOOHDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RPDevJesco","download_url":"https://codeload.github.com/RPDevJesco/OOHDB/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RPDevJesco%2FOOHDB/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271448405,"owners_count":24761441,"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-08-21T02:00:08.990Z","response_time":74,"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":[],"created_at":"2024-11-06T04:07:40.446Z","updated_at":"2025-08-21T08:17:34.134Z","avatar_url":"https://github.com/RPDevJesco.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Object-Oriented Hierarchical Database (OOHD)\n\n## Project Overview\n\nThe Object-Oriented Hierarchical Database (OOHD) is a C++ implementation that combines the hierarchical structure of tree-based databases with the flexibility and richness of object-oriented databases. This design allows each record to have a single parent, maintaining a clear hierarchical structure, while storing data as objects to support complex data types and relationships.\n\n## Key Features\n\n1. **Hierarchical Structure**: Data is organized in a tree-like hierarchy, where each record has a single parent and potentially multiple children.\n\n2. **Object-Oriented Data Storage**: Each node in the hierarchy represents an object, storing complex data types and supporting object-oriented principles such as encapsulation and inheritance.\n\n3. **Flexible Schema**: Supports a flexible schema, enabling different types of objects to coexist within the hierarchy.\n\n4. **Advanced Query System**: Implements a flexible query system that allows for complex searches based on object types, attributes, and hierarchical relationships. Supports SQL-like queries with SELECT, FROM, WHERE, and LIMIT clauses.\n\n5. **Caching**: Includes a query cache to improve performance for repeated queries, while ensuring up-to-date results for queries with LIMIT clauses.\n\n6. **Serialization**: Supports saving the database to a file and loading it back, with basic encryption to protect the data.\n\n7. **Dynamic Objects**: Utilizes a DynamicObject class to represent any type of object in the database, allowing for runtime-defined schemas.\n\n## Project Structure\n\nThe project is organized into the following main components:\n\n- `DatabaseObject`: Represents a node in the hierarchical structure.\n- `DynamicObject`: A flexible object type that can represent any kind of entity in the database.\n- `Query`: Implements the query system for searching the database.\n- `QueryResult`: Handles the results of queries, including sorting and limiting.\n- `OOHD`: The main database class that manages the overall structure and operations.\n- `OOHDQuery`: Parses and executes SQL-like queries.\n\n## Building and Running\n\nThis project uses CMake for building. To build and run the project:\n\n1. Create a build directory: `mkdir build \u0026\u0026 cd build`\n2. Run CMake: `cmake ..`\n3. Build the project: `make`\n4. Run the executable: `./oohd`\n\n## Appropriate Datasets\n\nThe OOHD system is particularly well-suited for datasets with the following characteristics:\n\n1. **Hierarchical Structure**: Data that naturally fits into a parent-child relationship structure.\n2. **Flexible Attributes**: Datasets where different objects may have varying attributes.\n3. **Moderate Size**: Currently optimized for datasets with thousands to tens of thousands of objects.\n4. **Complex Querying Needs**: Datasets that require a mix of attribute-based and hierarchical queries.\n\nExamples of appropriate datasets include:\n\n- Organizational structures (companies, departments, employees)\n- File systems (directories and files)\n- Product catalogs with categories and subcategories\n- Geographic data (continents, countries, cities)\n- Family trees or genealogical data\n- Decision trees and other hierarchical AI models\n- Game development scenarios, such as:\n    - Game world hierarchies (regions, areas, locations)\n    - Character skill trees\n    - Quest and dialogue trees\n    - Item crafting recipes and upgrade paths\n    - Tech trees in strategy games\n- XML-like document structures\n- Menu systems and UI hierarchies\n- Small to Medium sized Datasets\n\nThe OOHD system is particularly valuable for decision trees and game development for the following reasons:\n\n1. **Decision Trees**:\n    - Naturally represents the hierarchical structure of decision nodes\n    - Supports different attributes for different types of nodes (e.g., decision nodes vs. leaf nodes)\n    - Allows for efficient traversal and querying of the tree structure\n    - Facilitates easy updates and modifications to the decision tree\n\n2. **Game Development**:\n    - Flexible schema allows for diverse game entities with varying attributes\n    - Hierarchical structure suits many game design patterns (e.g., entity-component systems)\n    - Efficient querying supports common game operations like collision detection or AI decision-making\n    - Supports complex relationships between game objects (e.g., inventory systems, character relationships)\n    - Allows for dynamic addition and modification of game elements during runtime\n\nThese use cases benefit from OOHD's combination of hierarchical structure and object-oriented design, allowing for intuitive modeling of complex, nested structures while maintaining flexibility in object attributes and behaviors.\n\n## Recent Improvements\n\n1. Enhanced query parsing and execution for SQL-like queries.\n2. Improved caching mechanism that ensures up-to-date results for queries with LIMIT clauses.\n3. Added detailed debugging output for query execution.\n4. Implemented a more robust hash function for query caching.\n5. Enhanced the DynamicObject class to handle various attribute types.\n\n## Future Enhancements\n\nWhile the current implementation provides a solid foundation for an object-oriented hierarchical database, there are several areas where it could be expanded and improved:\n\n1. **Advanced Querying**: Implement more complex query operations, such as joins between different object types and support for OR conditions.\n2. **Indexing**: Add support for indexing to improve query performance, especially for large datasets.\n3. **Concurrency**: Implement thread-safety and support for concurrent operations on the database.\n4. **Transactions**: Add support for ACID transactions to ensure data integrity.\n5. **Persistence**: Improve the current serialization method, possibly using a more standardized format like Protocol Buffers.\n6. **Query Optimization**: Implement a query plan optimizer for more efficient execution of complex queries.\n7. **Data Modification Operations**: Add support for INSERT, UPDATE, and DELETE operations.\n8. **Flexible Query Language**: Develop a more comprehensive query language parser for even more flexible querying capabilities.\n\nThis repository contains the C++ library version of the OOHDB (see https://github.com/RPDevJesco/OOHD for the pure C++ console version), It contains the C# wrapper library project and a small test project to showcase it working. There is detailed logging included.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Foohdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpdevjesco%2Foohdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpdevjesco%2Foohdb/lists"}