Skip to content
Open
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
10 changes: 10 additions & 0 deletions modules/ddl-and-loading/pages/defining-a-graph-schema.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,16 @@ For example:
CREATE DIRECTED EDGE Member_Of (FROM Person, TO Org | FROM Org, TO Org, joined DATETIME)
----

=== Multi-edges

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@priyankagunaki-cloud The ticket said to add a section, so you did. Now consider the resulting page.
You have a new Heading 3 section about Multi-edges, which describes why they are useful and then says the way to create them is with a Discriminator. There is an example, which was copied from the Discriminator section. This is immediately followed by a Heading 3 section (same level) which describes Discriminators. It again shows the same example.

Does this not seem redundant to you?

This is why I say do not blindly follow tickets. A ticket is trying to describe a problem or need. Understand the need, then figure out the best way to address it. The person who wrote the ticket may not have put in the time to understand the full context, or they may not be the best writer or explainer.


By default, an edge type allows only one edge of a given type between the same source and target vertices. This is suitable for relationships where only a single connection is required between two vertices.

Some graph models require multiple edges of the same type between the same pair of vertices. For example, a person may study at the same university during different academic years. Each `Study_At` relationship represents a distinct edge between the same source and target vertices.

Multiple edges between the same pair of vertices can be defined by specifying a `DISCRIMINATOR` in the edge type definition. The discriminator uniquely identifies each edge instance while allowing multiple edges of the same type to exist between the same source and target vertices.

For information on defining discriminators, see xref:#discriminator[DISCRIMINATOR].

=== `DISCRIMINATOR`
A discriminator is an attribute or a set of attributes that can be used to uniquely identify an edge.
The `DISCRIMINATOR` keyword defines a discriminator in an edge type definition to allow multiple instances of an edge type between two vertices.
Expand Down