-
Couldn't load subscription status.
- Fork 12
Add Lab data modeling page #1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| --- | ||
| title: Data modeling | ||
| description: Create, edit, and manage visual graph schemas in Memgraph Lab with an intuitive schema builder for data modeling. | ||
| --- | ||
|
|
||
| import { Callout } from 'nextra/components' | ||
| import { CommunityLinks } from '/components/social-card/CommunityLinks' | ||
|
|
||
| # Data modeling | ||
|
|
||
| **Data modeling** feature in Memgraph Lab provides a versatile platform for creating, editing, and managing visual representations of your graph schemas. | ||
| It's designed to allow developers and data engineers to structure complex relationships clearly and intuitively, offering flexibility in organizing and visualizing their ideas. | ||
| Users can easily save, load, and revisit their models, making it simple to manage multiple projects or iterations. | ||
|
|
||
|  | ||
|
|
||
| ## How it works | ||
|
|
||
| ### Create elements | ||
|
|
||
| Schemas can be expanded in several intuitive ways. You can create completely new nodes on the canvas, or quickly grow your schema by connecting nodes with edges. | ||
|
|
||
| {<h4 className="custom-header">Nodes</h4>} | ||
|
|
||
| **Create a node** <br/> | ||
| Double-click on an empty space to create a new node. | ||
|
|
||
| **Drag from a handler** <br/> | ||
| When you drag from a handler of an existing node into empty space, a new node is created. | ||
|
|
||
| **Quick expansion** <br/> | ||
| If you simply click a handler, a new node will appear automatically in one of the four directions. | ||
|
|
||
| **Preview mode** <br/> | ||
| Press `n` (or use the toolbox) to see where the next node will appear before creating it. | ||
|
|
||
| {<h4 className="custom-header">Edges</h4>} | ||
|
|
||
| **Create an edge** <br/> | ||
| Drag from a handler of one node to an existing node to connect them with an edge. | ||
|
|
||
| **Automatic edges** <br/> | ||
| Every time you create a new node from an existing one, an edge is automatically generated. This makes schema expansion fast and seamless. | ||
|
|
||
| This enables the rapid construction of both simple and complex schemas directly on the canvas. | ||
|
|
||
| ### Edit elements | ||
|
|
||
| Once created, nodes and edges can be styled and adjusted to better reflect the structure of your data. | ||
| Editing can be done directly on the canvas, through the toolbox, or via the sidebar for more detailed control. | ||
|
|
||
| {<h4 className="custom-header">Nodes</h4>} | ||
|
|
||
| **Toolbox options** <br/> | ||
| When you select a node, the toolbox appears with options to delete it or change its color and size. | ||
|
|
||
| **Sidebar editing** <br/> | ||
| The node sidebar provides more detailed editing, including labels and properties. | ||
|
|
||
| **Inline labels** <br/> | ||
| Labels on the canvas can also be edited directly. | ||
|
|
||
| {<h4 className="custom-header">Edges</h4>} | ||
|
|
||
| **Toolbox options** <br/> | ||
| When you select an edge, the toolbox allows you to delete it or change its direction. | ||
|
|
||
| **Sidebar editing** <br/> | ||
| The edge sidebar lets you edit the edge label and properties. | ||
|
|
||
| **Inline labels** <br/> | ||
| Edge labels on the canvas can also be edited directly. | ||
|
|
||
| This flexibility allows you to quickly adjust both the **visual style** and the **semantic information** of your model without leaving the canvas. | ||
|
|
||
| ### Shortcuts | ||
|
|
||
| | Shortcut | Action | | ||
| | ------------ | --------------------------- | | ||
| | **N** | Enter node preview mode | | ||
| | **Delete** | Delete selected node/edge | | ||
| | **Ctrl + Z** | Undo last action | | ||
| | **Ctrl + Y** | Redo the last undone action | | ||
|
|
||
| ## Manage data models | ||
|
|
||
| All models created using the data modeling can be accessed and managed from the **Saved models** tab. | ||
| This view provides a table that lists all previously stored models along with their key information: | ||
|
|
||
| - **Name**: The model name defined when it was created. | ||
| - **State**: Shows whether the model is valid or invalid. | ||
| - **Last modified**: The date and time when the model was last updated. | ||
| - **Actions**: Each entry includes the following actions: | ||
| - **Edit:** Opens the model in edit mode. | ||
| - **Delete**: Permanently removes the model from the list. | ||
|
|
||
| This centralized overview makes it easy to keep track of multiple models, quickly jump back into editing, or clean up unused models. | ||
| A search option is also available, allowing you to filter models by name. | ||
|
|
||
| ## Import and export models | ||
|
|
||
| ### Export model | ||
|
|
||
| Models can be exported only if they are in a **valid** state. | ||
|
|
||
| The export option is available from the menu next to the editor. Three formats are supported: **SVG**, **PNG**, and **JSON**. | ||
| While SVG and PNG provide static visual representations of the model, the JSON export contains both the model data (aligned with the `SHOW SCHEMA INFO` output) and additional metadata such as styles. | ||
|
|
||
| ### Import from JSON | ||
|
|
||
| Currently, only JSON files exported from the application can be imported back. | ||
| These files include both the model data definition and metadata required to restore the original layout and styles. | ||
| Importing a JSON file always creates a new model, populated with the information contained in the file. | ||
|
|
||
| ### Import from the current graph schema | ||
|
|
||
| Models can also be created directly from the current graph schema. | ||
| This option is available via the **Edit schema** button in the **Graph schema** tab. Selecting it generates a new model populated with the data present in the graph schema at that moment, making it easy to start editing based on the live graph structure. | ||
|
|
||
| <Callout type="warning"> | ||
| Importing from a very large graph (>1k nodes) is not recommended, as it can significantly slow down the application. | ||
| </Callout> | ||
|
|
||
| <CommunityLinks/> |
Binary file added
BIN
+136 KB
public/pages/data-visualization/features/data-modeling/data-modeling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.