The graph database refers to the database systems using the graph data model. The term “data model” is about the way how a database system views and processes its data. For example, the relational data model views the data in terms of tables, that is the relation. The relation is a mathematical expression for the tables. In the relational model, the data is organized as rows with predefined columns.
When we model a real-world phenomena, we first determine entities and their relationships, and the result is the ER diagram. But this is not the end. We have to design table schemas for the entities and relationships. The ER diagram should be mapped to tables, but sometimes it is not intuitive to map the real-world data into tables because tables have very strict and rigid form. There exists some kinds of impedence mismatches between the real-world phenomena and the relational model.
But the graph data model views the data in terms of graphs. The graph data model consists of entities and their relationships, by themselves. That is, they are not mapped to tables. When using the graph data model, users can deal with the data by entities and relationships directly. So data modeling using the graph model is much easier and more intuitive than the relational data model.
Relational Model vs. Graph Model
Let’s view an example. This is a case for product sellers and their customers; a seller has inventories for their products, and a customer orders products and rates them. So we can make conceptual model for this situation like this. If we are using the relational model, we should make tables for the seller, product and customer, these are the tables for entities. And we also make tables for the relationships; inventory, product_rates and order. And there are several referential constraints between entity tables and relationship tables. We must care about the join key between tables in order to query these tables. This is a simple example so the schema is not very complex. But in many real cases, the schema can be huge and it is not easy to understand the complex table schemas.
However, in graph model, there is no need to design tables. Just make nodes for entities and relationships between them. Roughly we can use the ER diagram directly in the graph database. We don’t need to declare referential constraints, consider normalization/denormalization and no need to remember the join keys between tables. So it is much simpler to model complex real world situations as the graph model.
Simplicity of Graph Queries
The simple data model make the query also simple.
This is an example from an academic paper(Zhu, Y., Yan, E., & Song, I.-Y., The use of a graph-based system to improve bibliographic information retrieval: System design, implementation, and evaluation. Journal of the Association for Information Science & Technology 2016). This paper introduces a bibliographic search system which uses a graph database. And it compares the implementation to using mysql. This is comparison of queries for search an author’s information cited by database papers. Cyper query is more concise because we do not need to specify join predicates at all. It concludes that when using graph database, the query can be much simpler than relational databases.
The motivation of graph database is for simple and intuitive datamodel. Graph data model is very promising because of their simplicity and intuitiveness. And graph query language, like Cypher, can dramatically reduce developer’s efforts to make and debug complex SQL queries. This is the most important motivation of the graph database. And graph database is optimized to process complex connections because they are specialized to handle the complex connected data. And the graph analytics are also important. Graph data model can provide different visualization from other databases using graph traversals. So, data scientists can explore and traverse the graph data to discover valuable insights, and graph analysis algorithms can also help to discover hidden values from their connected data.
BITNINE GLOBAL INC., THE COMPANY SPECIALIZING IN GRAPH DATABASE
비트나인, 그래프 데이터베이스 전문 기업