Hackolade is the pioneer in data modeling for NoSQL databases, having developed a visual tool to perform the schema design of hierarchical and graph structures.
Hackolade is a Neo4j schema design software that dynamically forward-engineers Cypher scripts as the user visually builds a Neo4j data model. It can also reverse-engineer an existing Neo4j instance to derive the schema so a data modeler or information architect can enrich the model with descriptions, metadata, and constraints.
Building on the capabilities of Neo4’s db.schema() command, Hackolade persists the state of the instance data model, and generates HTML documentation of the database schema to serve as a platform for a productive dialog between analysts, designers, architects, developers, and DBAs. The Neo4j schema design tool supports several use cases to help enterprises manage their databases.
Describe the Data Model in Terms of Application Needs
To identify the entities and relationships, it is useful to make an inventory of the questions that will be asked of the data. This approach is often called “query-driven” or “access patterns”-oriented. Agile user stories express the needs which influence the shape and content of the graph data model.
By developing the data model in a test-driven approach, the understanding of the domain is documented, so as to validate that queries behave correctly. With test-driven data modeling, unit tests are based on small, representative example graphs drawn from the domain. Query performance tests are written alongside unit tests.
Nodes for Things, Relationships for Connections
Nodes are usually defined to represent the entities -- the things of interest in the application domain. The node properties represent the attributes and metadata of the entities.
Relationships are defined to express the links or connections between the entities, and to structure the domain by establishing the semantic context for each entity. The direction of the relationship further clarifies the relationship semantics. The relationship properties represent the quality or strength of the relationship, plus necessary metadata.
A relationship must have a start and an end node, and obviously cannot link more than these 2 entities. If it turns out that something that’s been modeled as a relationship needs to be connected to more than 2 entities, that would be a sign that the relationship needs to be refactored into its own node, and that the data model needs to evolve.
In terms of graph traversal performance, it is preferable to define distinct relationship types if there is a limited enumeration of relationship qualifiers. That’s because relationship type properties are stored separately and hence require an additional storage access. If the enumeration is not limited, then properties best represent qualifiers for the relationship type, for example for shorted-weighted-path algorithms.
Conventional relational databases visualize a schemas in Entity-Relationship Diagram. One of the shortcomings is that traditional ER diagrams only allow single, undirected relationships between entities, while in the real-world, relationships between entities are numerous and semantically rich.
With Hackolade, the limits of entity-relationship model conventions are stretched to accommodate the needs of NoSQL document databases and graph databases.
Neo4j Graph Schema Visualization
Graph users and developers prefer to look at structures with circles and curves lines, rather than blocks and straight lines. In effect, the 2 approaches are conceptually similar, with just visual differences. Nevertheless, it is important for a graph data modeling tool to provide the interactions that are most intuitive to users.
A graph view provides a compact, high-level diagram of the graph schema structure:
Properties for node labels and relationship types are available by drilling into the graph:
Entity Relationship Diagram (ERD)
For users who prefer a more traditional ER view, Hackolade was adapted to allow relationships be directed, and have properties. It also lets users define multiple relationships between nodes.
Hierarchical View of Nested Objects
It is not advised to store blobs of data in Neo4j. And Neo4j does not support map data types (equivalent to JSON sub-objects.) But Neo4j does support lists (JSON arrays) but not lists of maps.
Properties (attributes) of either node labels of relationship types can be maintained within the graph diagram, the ER diagram, or in an additional hierarchical tree view with focus on the entity at hand, where metadata, descriptions, and constraints are easily viewed and maintained, along with a log of team comments gathered as the model adapts over time for the schema evolution.
Outputs of a Data Modeling Tool for Neo4j
Hackolade dynamically generates the Cypher script derived from the data model created via mouse clicks. When applied to an instance, the script creates a sample graph with nodes and relationships, including constraints and indexes.
A rich HTML documentation provides a human-readable report that includes diagrams, node label details, relationships types, and all their metadata. Many additional features have been developed to help data modelers.
Information stored in databases drives businesses decisions. Data modeling becomes critical to leverage data as a corporate asset, understand data interrelationships, and its rules. Hackolade increases agility of a data-centric architecture by making its structure transparent and by facilitating its evolution. The benefits of data modeling for Neo4j are extensive and measurable.
NoSQL schema design is a best practice so applications can evolve, scale, and perform well. An effective data model contributes to the reduction in development time, the increase in application quality, and the lowering of execution risks across the enterprise.
To experience the first Neo4j data modeling tool and try Hackolade free for 14 days, download the latest version and install it on your desktop. There's no risk, no obligation, and no credit card required! The software runs on Windows, Mac, and Linux, plus it supports several other leading NoSQL databases.
Try Hackolade free for 14 days
There's no risk, no obligation, and no credit card required!
Download the latest version of Hackolade and install it on your desktop.