Skip to content

Modeling designs page review #451

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

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/ROOT/images/airport.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions modules/ROOT/images/bipartite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions modules/ROOT/images/double-linked-list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions modules/ROOT/images/flight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions modules/ROOT/images/head-tail-list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions modules/ROOT/images/hyperedge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions modules/ROOT/images/interleaved-list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions modules/ROOT/images/latest-aired.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions modules/ROOT/images/modeling_airport_flights-arr.svg

This file was deleted.

9 changes: 9 additions & 0 deletions modules/ROOT/images/monopartite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions modules/ROOT/images/multipartite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions modules/ROOT/images/multiple-structures.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions modules/ROOT/images/refactored-hyperedge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions modules/ROOT/images/sarah-email-after.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions modules/ROOT/images/sarah-email-before.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions modules/ROOT/images/sarah-email.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions modules/ROOT/images/sarah-emailed-intermediate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions modules/ROOT/images/sarah-emailed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions modules/ROOT/images/simple-linked-list.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions modules/ROOT/images/timeline-tree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
329 changes: 0 additions & 329 deletions modules/ROOT/pages/data-modeling/graph-model-refactoring.adoc

This file was deleted.

42 changes: 3 additions & 39 deletions modules/ROOT/pages/data-modeling/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,7 @@
Data modeling is a practice that defines the logic of queries and the structure of the data in storage.
A well-designed model is the key to leveraging the strengths of a graph database as it improves query performance, supports flexible queries, and optimizes storage.

== How to create a graph data model

To organize data into a <<data model>>, the first thing to do is to think about what questions you want to answer.

For example, assume that you work for a retail company and want to learn what products customers are buying.
To answer that, you need to:

* Have data on the products sold and the customers who bought them.
This process is known as "entity extraction".
* Understand how these entities relate to each other.
* Think about what other details that need to be provided, i.e. what properties should be added to these entities (e.g. customer name).
* Optionally, visualize the model before you create it using xref:data-modeling/data-modeling-tools.adoc[no-code data modeling tools].
* If satisfied, you can start writing the data into an database.

In this fictional scenario, you can start by adding this information to the graph:

[source,cypher]
--
CREATE (c:Customer {name: "John"})
CREATE (p:Product {name: “Camera”})
CREATE (c)-[:BUYS]->(p)
--

Then, you can test this model with a query (e.g. what did John buy):

[source,cypher]
--
MATCH (c:Customer {name: "John"})-[b:BUYS]->(p)
RETURN p
--

Keep in mind that graph data modeling is an iterative process.
Your initial graph data model is only a starting point.
As you learn more about your use cases or if they change, the model needs to adapt.

Additionally, you may find that, especially when the graph scales, you need to xref:data-modeling/graph-model-refactoring.adoc[refactor] your model to ensure it is aligned with your business needs as they evolve.

In summary, the process of creating a data model includes the following:
In summary, the process of creating a <<data model>> includes the following:

. Understand the domain and define specific use cases (questions) for the application.
. Develop an initial graph data model by extracting entities and decide how they relate to each other.
Expand All @@ -58,11 +21,12 @@ In summary, the process of creating a data model includes the following:
. Test the use cases, including performance against the graph.
. Refactor the graph data model due to changes in the key use cases or for performance reasons.

For a full tutorial, refer to xref:data-modeling/tutorial-data-modeling.adoc[Create a data model].

== Keep learning

For a more hands-on approach to data modeling, try the following resources:

// * xref:tutorials/tutorial-data-modeling.adoc[Tutorial: Create a graph data model]: a more in-depth tutorial that follows up to the example used here.
* link:https://graphacademy.neo4j.com/courses/modeling-fundamentals/?ref=docs[GraphAcademy: Data Modeling Fundamentals]: enroll to an interactive course.
* xref:data-modeling/relational-to-graph-modeling.adoc[From relational to graph]: learn how to adapt data from a relational to a graph data model.
* xref:data-modeling/data-modeling-tools.adoc[Data modeling tools]: see a list of tools you can use to create your data model.
Expand Down
Loading