寻求可嵌入应用的C++开源图数据库推荐(原采用OrientDB嵌入式版)
Hey there! Since you've been using OrientDB's embedded Java version but now need to switch to a C++-based solution due to the no-Java-libraries restriction, here are some great open-source options that fit the embedded use case:
LGraph
This is a lightweight, open-source embedded graph database written entirely in C++. It supports the property graph model, ACID transactions, and high-performance graph traversals/queries. Designed specifically for embedded scenarios, it has low resource overhead and integrates directly into your C++ application without requiring a separate server process. The API is intuitive, making it easy to transition from OrientDB's embedded workflow.Memgraph (Embedded Mode)
Memgraph is a high-performance in-memory graph database built with C++, and it offers an embedded mode that lets you run it directly within your application. It supports Cypher query language (similar to many popular graph databases), ACID transactions, and excels at real-time graph operations. The embedded mode eliminates the need for a separate database service, aligning perfectly with your requirements.Boost Graph Library (BGL)
While BGL is primarily a graph algorithm library, it can be extended with persistence (via Boost.Serialization) to act as a lightweight embedded graph store. If your use case leans more towards complex graph analysis rather than full-fledged database features like advanced transaction management, BGL is a robust choice. It’s part of the widely-used Boost ecosystem, so stability and documentation are top-notch, and it integrates seamlessly with existing C++ codebases.GraphFlow
A compact open-source embedded graph database for C++, GraphFlow supports both in-memory and disk-based storage. It offers a simple API for graph creation, traversal, and property management, along with basic transaction support. It’s ideal for resource-constrained embedded applications where you need a straightforward, no-fuss graph storage solution.
All these options are open-source and can be embedded directly into your C++ application, so they avoid any Java dependencies. Depending on your specific needs (like transaction complexity, query language support, or resource constraints), you can pick the one that best aligns with your project's goals.
Content sourced from Stack Exchange, question author: Soy

