cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Query Results

myrights99
Graph Buddy

Hello:

I am doing self learning from Neo4j Graph Academy and I am seeing that examples and exercises output results are more in Table form rather than Graph.

My questions is, why all results are not done in graph rather than table. If I want my output\results in table than why i will use Neo4j???

I believe that Neo4j is graph database and all results should be 100% in graph.

Can somebody help me to clarify my doubts and limitation that table should be used instead of graph?

Thanks

1 ACCEPTED SOLUTION

clem
Graph Steward

The Browser can display results either as a graph or as a table (and you can switch between them.)

Sometimes a Table is better, especially if you want a list of Nodes and their properties. Sometimes it's a graph.

The thing that is a bit cumbersome, is if you RETURN the Node instead of the explicit Node Properties. Then you get a table of JSON's which isn't as easy to look at.

View solution in original post

3 REPLIES 3

some cypher statements do not lend themselve to graph vizualization. For example

match (n:Person) return count(n);

simply says to report the number of nodes which have a label of :Person. The query is asking to return a number and not something that can be expressed visually.

Further a query similar to

match (n:Person) where n.status='active` return n.name, n.email order by n.age;

is asking to find all Nodes with a :Person label but do not return the node itself rather simply return the properties of the node named name and email and present the results in order by n.age this would lend itself to a table like display. I'm not sure how you would get this to display in a graph and demonstrate order.

Now if you changed

match (n:Person) where n.status='active` return n.name, n.email;

to

match (n:Person) where n.status='active` return n;`

which is the samw query as above but rather than return certain properties it is returning the entire node, then yes this would not default to a table display.

Thank you Dan for your reply. As i just started learning about Neo4j, this are all doubts are getting clear.

I may be wrong but for me Graph is like "A Picture Says a Thousand Words".

At least I came to learn that just variable without properties will give me a graph and with properties will give me table.

Thank you again.

clem
Graph Steward

The Browser can display results either as a graph or as a table (and you can switch between them.)

Sometimes a Table is better, especially if you want a list of Nodes and their properties. Sometimes it's a graph.

The thing that is a bit cumbersome, is if you RETURN the Node instead of the explicit Node Properties. Then you get a table of JSON's which isn't as easy to look at.