Graph schema
If you need to check the data model of the data currently in the database, you can generate a graph schema that will show all the node types and relationships between them.
By selecting a certain node or relationship type, Memgraph Lab will provide information about the current number of nodes or relationships of that type, as well as the percentage of existence of each property across the nodes and relationships of that type.
If you’re connected to a Memgraph instance running with the
--schema-info-enabled
configuration
flag, you’ll see the types for each
node and relationship property.
Generate a graph schema
To generate the graph schema, navigate to the Graph schema tab in the sidebar and click on the Reload button. Memgraph will analyze the entire dataset and create a visual representation of the data model. This includes:
- All detected node labels and relationship types.
- The connections between different node types based on existing relationships.
- A preview of how entities are structured in your graph.
This is especially useful when you’re working with new datasets or reverse-engineering an unknown data structure.
Inspect properties
Once the schema is generated, you can click on any node or relationship type in the graph to inspect its details. Lab displays:
- The total number of occurrences in the database.
- A breakdown of all the properties associated with that node or relationship type.
- The percentage of presence of each property (i.e., how often it appears across all instances).
This helps you understand which properties are consistently present, which ones might be optional or only apply in certain contexts and whether your data is uniform or varies between entries.