You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 12-comparisons/02-graph-databases-and-typedb.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,15 +69,15 @@ As relationships are directed, they always have a start and an end node. To give
69
69
However, the graph model doesn't directly map to a conceptual model or ER diagram, as nodes and edges don't always directly map to entities and relationships. Graph databases also offer no native support for concepts such as, for example, ternary relations, n-ary relations or roles. Therefore, to implement a graph model, we must first go through a normalisation process and map our conceptual model (ER diagram) to the graph model.
*In a graph database we need to map our conceptual model the graph model.*
72
+
*In a graph database we need to map our conceptual model to the graph model.*
73
73
74
74
### Concept Level Modelling
75
75
76
76
TypeDB provides a concept-level schema that fully implements the Entity-Relationship (ER) model. TypeDB's schema is a type system that implements the principles of knowledge representation and reasoning.
77
77
78
78
Unlike in a graph database, this means that we can map any ER Diagram directly to how we implement it in TypeQL, avoiding the need to go through a normalisation process. In TypeDB, we create a direct mapping of the ER Diagram with entities, relations, attributes and roles to how we implement it later in code. By modelling at the conceptual level using a type system, we avoid the need to go through a normalisation process that would otherwise be required in a graph database.
*TypeDB's type system is a direct implementation of a conceptual model.*
82
82
83
83
@@ -131,7 +131,7 @@ This is how we would create a `supplying` (intermediary) node that would connect
131
131
132
132
In TypeDB, instead of creating an intermediate node, we create one `supplying` relation that relates to the supplier, buyer and the part that's being supplied:
@@ -172,7 +172,7 @@ In a graph database, we cannot create nested relations. Instead, we can model a
172
172
173
173
TypeDB's type system natively supports nested relations as modelling constructs. For the model above, we would create a relation `located` that connects the relation `marriage` with the `city` "London". This would look like this:
0 commit comments