Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Android Data Persistence CRUD Operations with SQLite Retrieving Data

Jessica Soruco
Jessica Soruco
5,843 Points

what do they mean by "cursor" at 05:41??

It seems to refer to something in a database but not sure what it refers to exactly

Daniel Andersson
Daniel Andersson
11,181 Points

It's a kind of iterator and it is used for browsing trough data. Here is a guide for more info :) http://www.tutorialspoint.com/java/java_using_iterator.htm

1 Answer

Tonnie Fanadez
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 Points

A cursor is a pointer to the result set from a database query. It provides read access to the rows and columns .Android uses cursor class as a return value for queries. Using Cursor enables android to more efficiently manage rows and columns as needed with no need to load all data to memory

Once a cursor has been returned from a database query, an app needs to iterate over the result set and read the column data from the cursor using the Cursor Class methods.

Internally, the cursor stores the rows of data returned by the query along with a position that points to the current row of data in the result set.