Questions tagged [memgraphdb]

Use this tag for questions related to Memgraph streaming graph database.

Memgraph is an open source graph database built for real time streaming data, compatible with Neo4j. It is an in-memory graph database that uses Cypher as a query language. Memgraph can be extended with graph algorithms that are part of Memgraph Advanced Graph Extensions (MAGE). Graphs can be visualized using Memgraph Lab application.

390 questions
0
votes
0 answers

What happenes with relationships if I copy all node properties using Cypher?

If I use SET to copy the properties of one node/relationship to another, all the properties of the latter will be removed and replaced with new ones. But what happens with relationships? Are they also copied? Here is the code: CREATE (p1:Person…
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

How is the connection to fetch log files from Memgraph Lab working?

I saw an information on Memgraph's documentation that the port 7444 in Memgraph Platform image is used for connection to fetch log files from Memgraph Lab (only in version 2.0 and newer). Can somebody explain how that actually works and what is it…
KateLatte
  • 611
  • 1
  • 12
0
votes
1 answer

Can Memgraph be accessed with various drivers?

I am using Memgraph Platform Docker image 2.6.0, and I want to connect to the running Memgraph instance using Python and JavaScript. Is it possible to connect to Memgraph with various drivers? I have been using only GQLAlchemy for Python so far.
KateLatte
  • 611
  • 1
  • 12
0
votes
1 answer

What is the correct way to remove property from node using Cypher?

I have found two ways to remove the property from the node. The first one is REMOVE n.name, and the second one is SET n.name= NULL. Is there a recommendation for which of these two methods is better?
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

What is the correct way to count number of nodes using Cypher?

For both of these queries, I get the same result. Query 1: MATCH (e:Episode) RETURN COUNT(e); Query 2: MATCH (e:Episode) WITH COUNT(e) AS count RETURN count; What would be the correct way to count the number of nodes?
Taja Jan
  • 942
  • 1
  • 1
  • 11
0
votes
1 answer

How can I filter nodes by property values and labels in using Cypher query?

I'm trying to use Cypher to perform a graph search that includes node filtering based on property values and label constraints. I want to find all nodes with a name property that starts with "Mc" and is labeled as Manufacturer. I've tried the…
Taja Jan
  • 942
  • 1
  • 1
  • 11
0
votes
1 answer

Deleting a node and its relationships in a graph database using Cypher

I need to delete a node and all its relationships in a graph database using Cypher. Can you provide an example of how to do this, and is it possible to undo or roll back these changes if needed?
Taja Jan
  • 942
  • 1
  • 1
  • 11
0
votes
1 answer

Removing a constraint from node using Cypher

I know that the following code says that every node with the label City has a unique value for the location property. CREATE CONSTRAINT ON (c:City) ASSERT c.location IS UNIQUE; So this code forbids me to have two cities with the same name in one…
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

Creating platform on automating supply chain functions with Memgraph

I would like to know is Memgraph a good option to create platform on automating supply chain functions. Something like Procure-to-Pay as all documents within the process has highly connected data like purchase order number which ties up with all…
MPesi
  • 212
  • 8
0
votes
2 answers

When should I use CREATE and when MERGE in Cypher queries?

I've seen that sometimes CREATE is used to create nodes, and in other situations, MERGE is used. What's the difference, and when should one be used in place of another?
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

Does counting hops start from zero of from one?

When counting hops, has the first node (the one that is directly connected) the distance of one hop or zero hops? For example, in this code will return the results when the path is equal to or shorter than 3 hops: MATCH path=(n {id:…
KWriter
  • 1,024
  • 4
  • 22
0
votes
0 answers

How to triger an event only if certain node condition is met?

I know that I can use the following code to do some action right after the node is created: CREATE TRIGGER createVertex ON () CREATE AFTER COMMIT EXECUTE UNWIND createdVertices AS createdVertex SET createdVertex.created = timestamp() But is it…
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

Using DISTINC within aggregate functions in Memgraph?

Is there a way for me to simplify the following code: WITH DISTINCT n.prop as distinct_prop RETURN COUNT(distinct_prop) As you can see, I use an aggregation function with distinct values. Can I somehow "skip" the WITH clause? It seems kind of…
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

How can I migrate PostgreSQL database to Memgraph?

Can I migrate PostgreSQL database to Memgraph? Do I need to export the database in some format and then import it?
KWriter
  • 1,024
  • 4
  • 22
0
votes
1 answer

Installing Memgraph on Windows

I was wondering what would be the best way to install Memgraph on Windows? Docker seems to be an option, but is there a different/easier way?
MPesi
  • 212
  • 8