# What is a row?

**URL:** https://community.neo4j.com/t/what-is-a-row/35532
**Category:** Cypher
**Tags:** cypher
**Created:** [March 19, 2021, 7:47am UTC](https://community.neo4j.com/t/what-is-a-row/35532 "2021-03-19T07:47:10Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:53am UTC](https://community.neo4j.com/t/what-is-a-row/35532/21 "2021-03-19T07:53:31Z")

</div>

andrew.bowman mentioned...

As mentioned, a record and a row are referring to the same thing in Cypher. We don't have tables, so we're never referring to a table structure kept as part of the durable graph data.

"Record" is more correct for the reasons you mentioned, and I'd argue that we should probably change the language in our query plans to use "records" and not "rows", that's something I can push for, and it aligns with our usage of "record" in other parts of the Neo4j Browser. It makes sense to standardize the language we use.

That said, when we return these, the most intuitive return format looks a lot like a row. And these rows as a whole appear to make up a table, so we won't completely escape the similarities. We even have a Table result view in the browser.

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:53am UTC](https://community.neo4j.com/t/what-is-a-row/35532/22 "2021-03-19T07:53:53Z")

</div>

andrew.bowman mentioned...

And for clarification, a pattern is like what you provide for a `MATCH`, it's the "this is what you're looking for" instruction to the db.

A path is a piece of the graph data that matches the desired pattern. An instance of a pattern, if you like.

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:54am UTC](https://community.neo4j.com/t/what-is-a-row/35532/23 "2021-03-19T07:54:03Z")

</div>

oren214 mentioned...

Yeah, I'm not trying to complain (too much) about semantics. I get why "rows" is totally relevant and helpful, especially for folks coming from table based databases. It's familiar.

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:54am UTC](https://community.neo4j.com/t/what-is-a-row/35532/24 "2021-03-19T07:54:29Z")

</div>

oren214 mentioned...

so couldn't we get a collection of paths instead of a collection of records? wouldn't that open some doors?

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:55am UTC](https://community.neo4j.com/t/what-is-a-row/35532/25 "2021-03-19T07:55:08Z")

</div>

andrew.bowman mentioned...

Sure...if you `collect()` the paths. But now you have a single list of paths. How do you refer to the elements in each path that you are interested in?

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:55am UTC](https://community.neo4j.com/t/what-is-a-row/35532/26 "2021-03-19T07:55:24Z")

</div>

oren214 mentioned...

well, in the browser when you look at the table view, you see what is basically a collection of hashes. We all know how to dig into a hash, and no reason we couldn't have a dot syntax for that too.

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:55am UTC](https://community.neo4j.com/t/what-is-a-row/35532/27 "2021-03-19T07:55:43Z")

</div>

oren214 mentioned...

Same with text view

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:55am UTC](https://community.neo4j.com/t/what-is-a-row/35532/28 "2021-03-19T07:55:56Z")

</div>

andrew.bowman mentioned...

Sure...but we basically have a single column for all the paths. But people don't want to work with a list of paths, they want to use separate variables referring to the parts of the paths (usually nodes) that they are interested in. And they want to perform aggregations, and calculations, and projections, so you're usually not going to be working with pure paths at the end.

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:56am UTC](https://community.neo4j.com/t/what-is-a-row/35532/29 "2021-03-19T07:56:09Z")

</div>

oren214 mentioned...

I mean, now that I think about it, it could really be represented the way we represent a graphql response...

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:56am UTC](https://community.neo4j.com/t/what-is-a-row/35532/30 "2021-03-19T07:56:31Z")

</div>

oren214 mentioned...

I guess that's dgraph's approach, if I understand what they are doing over there (I don't).

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:56am UTC](https://community.neo4j.com/t/what-is-a-row/35532/31 "2021-03-19T07:56:51Z")

</div>

andrew.bowman mentioned...

GraphQL responses aren't that much different than Cypher results...it's just a JSON representation of the results. But returning just a giant JSON structure of results isn't really the best when you're anticipating a lot of results, or if you're trying to do something like export to a CSV

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:57am UTC](https://community.neo4j.com/t/what-is-a-row/35532/32 "2021-03-19T07:57:05Z")

</div>

oren214 mentioned...

but I'm not saying a giant json structure of results. I'm saying a collection of json structures of paths

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:57am UTC](https://community.neo4j.com/t/what-is-a-row/35532/33 "2021-03-19T07:57:37Z")

</div>

oren214 mentioned...

and I would want a convenience syntax so I don't have to feel like I'm dealing with json

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:57am UTC](https://community.neo4j.com/t/what-is-a-row/35532/34 "2021-03-19T07:57:53Z")

</div>

oren214 mentioned...

anyhow. I've wasted enough of your time with my ponderings. I'm so grateful for your explanations and time.

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:58am UTC](https://community.neo4j.com/t/what-is-a-row/35532/35 "2021-03-19T07:58:07Z")

</div>

andrew.bowman mentioned...

If you want that you can get that.

```auto
MATCH path = (:Movie)&lt;-[:ACTED_IN]-(:Person)
RETURN path   

```

Or `relationships(path)`, or `nodes(path)` if you're interested in just the nodes, or just the relationships.

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:58am UTC](https://community.neo4j.com/t/what-is-a-row/35532/36 "2021-03-19T07:58:35Z")

</div>

oren214 mentioned...

It's been extremely helpful

---

<div class="post-metadata">

### Author: ![oren](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oren/32/12471_2.png) [@oren](https://community.neo4j.com/u/oren)
#### Post date: [March 19, 2021, 7:58am UTC](https://community.neo4j.com/t/what-is-a-row/35532/37 "2021-03-19T07:58:46Z")

</div>

oren214 mentioned...

I guess I was just saying I wish that was the default instead of an option because FOR ME it makes it easier to think about

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:59am UTC](https://community.neo4j.com/t/what-is-a-row/35532/38 "2021-03-19T07:59:01Z")

</div>

andrew.bowman mentioned...

Got it. It does depend upon what is important to each user, for what they want returned. For some paths are the most important. And it also varies for the kinds of queries you want to run.

We're flexible, but that flexibility introduces complexity, no real way around that.

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:59am UTC](https://community.neo4j.com/t/what-is-a-row/35532/39 "2021-03-19T07:59:14Z")

</div>

andrew.bowman mentioned...

Glad to help!

---

<div class="post-metadata">

### Author: ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)
#### Post date: [March 19, 2021, 7:59am UTC](https://community.neo4j.com/t/what-is-a-row/35532/40 "2021-03-19T07:59:31Z")

</div>

andrew.bowman mentioned...

I guess put a better way, if the result you desire are the paths, then work with the path variables in addition to the important components of the path.

But for many many queries, paths are just a means to an end, not the end itself. For example, if you only need, per movie, the movie title and the names of actors (and you have no need to visualize it graphically), then the paths don't matter in the end.

If you want to calculate the average ratings given to a movie, when returning the final results you don't care about all the tens of thousands or more :REVIEW relationships between people and the movie, you just want to output the movie, and the calculated average review score. Having to output all path results that were referenced to calculate the average isn't useful, and will make the query slower and output far more than what's needed.

[Previous page](https://community.neo4j.com/t/what-is-a-row/35532.md?page=1)
