# Database-like searching/querying with BigMap/BigSearch

**URL:** <https://forum.dfinity.org/t/database-like-searching-querying-with-bigmap-bigsearch/1977>\
**Category:** Developers\
**Created:** [February 11, 2021, 1:18am UTC](https://forum.dfinity.org/t/database-like-searching-querying-with-bigmap-bigsearch/1977 "2021-02-11T01:18:57Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Gabriel](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gabriel/32/546_2.png) [@Gabriel](https://forum.dfinity.org/u/Gabriel)\
**Post date:** [February 11, 2021, 8:15pm UTC](https://forum.dfinity.org/t/database-like-searching-querying-with-bigmap-bigsearch/1977/11 "2021-02-11T20:15:55Z")

</div>

> Now my question is, what is the best architecture to choose for this database?

Mostly because you don’t have any other options. Unless you get TCP/HTTP the only option for now is in memory db’s. sqllite option could work as well but I’m fairly sure it won’t scale. (eg: augur core).

> So a graph database architecture seems like a good choice. But is it the best choice? What other architectures have you considered? What led you to the graph database?

For scaling if @cryptoschindler suggestion can be implemented then we’re gold. Also most of the benchmarks shows that graph databases are way faster. Check :::[https://www.researchgate.net/publication/220996559\_A\_comparison\_of\_a\_graph\_database\_and\_a\_relational\_database\_A\_data\_provenance\_perspective](https://www.researchgate.net/publication/220996559_A_comparison_of_a_graph_database_and_a_relational_database_A_data_provenance_perspective)

> You mentioned creating an ORM. Personally, I’m more interested in just having the query language or the low-level API.

The ORM in question is not the magic ORM you’re thinking of.

Basically I want the graph structure be a simple structure and the ORM part to be added on top of the graph. For example for our own API we need custom validations per field per action, sanitisation and a lot of custom logic. See [Idea for CRUD types - feedback appreciated](https://forum.dfinity.org/t/idea-for-crud-types-feedback-appreciated/1054)

> The idea is to create the ultimate GraphQL generator.

For a graph database a GraphQL layer is esentially useless. Because you don’t need custom resolvers for complex queries, parsers etc. See Cypher is the best example as why you don’t need it. [Connecting your React app to Neo4j with React Hooks | Neo4j Developer Blog](https://medium.com/neo4j/connecting-to-react-app-to-neo4j-148881d838b8)

Baby steps.

PS: @cryptoschindler I’ll be in touch over a message once I clean my stuff.

---

_[View the full topic](https://forum.dfinity.org/t/database-like-searching-querying-with-bigmap-bigsearch/1977)._
