Graph databases make natural connections between customers, suppliers, orders, competitors, genes, crimes, documents, networked devices—and all the other connected elements of the modern world—to make recommendations, discover opportunities, expose hidden connections, and drive revenues in new and creative ways.
A graph database’s unique ability to exploit relationships between elements in diverse datasets makes it ideally suited to represent, query and manage the connected data of modern business.
A Visual and Natural Way to Manage Data
At the heart of every Neo4j graph database is a property graph that depicts the dataset’s entities, or nodes, and the relationships that connect them. This flexible, visual structure can be used to model a full spectrum of datasets and environments in uniquely powerful ways.
Elements of a Property Graph
A property graph is similar to an entity-relationship diagram, and contains simple but powerful objects that describe a database’s data elements and their connections.
- Nodes are used to represent entities—which can include people, companies, orders, products and data elements—can be labeled with descriptions of their roles in the database.
- Relationships are named objects that describe how the entities relate to each other.
- Nodes and relationships can contain properties and metadata expressed as key-value pairs.
- Constraints can be applied to either nodes or relationships to enforce data integrity, existence and uniqueness requirements.
Relationships: The Key Ingredient
Relationships are named connections between two entities in a graph, and are the real magic in graph databases. A graph relationship always has a start node, an end node, a direction and a type. The blue-circle nodes in the property graph above show how an order includes a product, and the product is part of a category.
Like nodes, relationships can have properties. In most cases, those properties are quantitative measures such as weights, costs, distances, ratings, time intervals, or strengths. In a native graph database like Neo4j, nodes can share any number or type of relationships without sacrificing performance. And note that although relationships are directional, graph queries can navigate them in either direction.
A Natural Way to Communicate
Unlike the cryptic table-and-join diagrams used to design relational database schemas, Neo4j labeled property graphs look remarkably like the diagrams we draw to visualize business workflows. Circles and boxes represent nodes, and relationships appear as arrows between the nodes.[/vc_column_text][/vc_column][/vc_row][vc_row padding=”0px;”][vc_column width=”1/2″][vc_column_text]So the pictures that system architects, developers and users sketch on whiteboards to describe application requirements are the same as the data models implemented inside a graph database. This similarity ensures that:
- Users, architects and developers leave application design meetings with consistent clarity
- Developers have a clear understanding of what users need
- Developed applications function as expected—the first time
- Modifications and enhancements are much easier to negotiate, design and implement
Simplicity and Clarity Yields Power and Efficiency
Property graphs and these simple graph objects are all we need to create rich, sophisticated Neo4j data models for real-world applications. The property graphs enable us to clarify requirements, design solutions and document systems–and they make graph databases easy and fast to design, implement and maintain.
Going Beyond the Property Graph
Once we develop the data models for a graph database, we can build query and transactional applications using Cypher, Neo4j’s industry-standard graph query language.