Hi Doug, Cookies, sessions and tokens are used in systems with authentication, which is a process to identify that users are who they say they are. That’s related to authorization which enables users to access data depending on who they are (once authenticated). Understanding those definitions was a huge a-ha moment for me! There’s a lot to this subject, but here’s some basic info.
Cookies, tokens, sessions are handy because a typical server request a stateless protocol which means that it treats each request as an independent one, with no knowledge of any previous request. When you have a cookie stored in the user’s browser, that cookie gets sent along with the request. You can define the cookie you send to the user to contain basic information so the server can recognize who the request came from. Ever notice how when you clear your cookies, you get logged out of your favorite sites? Cookies are also typically encrypted with hashing so that if the data is intercepted or the computer is lost, the data in the string can’t be understood. You should carefully consider what information you send in the cookie (AKA no passwords or personal information) since it’s possible to decode them. As JavaTheNutt pointed out, there are also size restrictions for cookies so they are generally not used as data storage for information otherwise hosted on a server.
As far as presenting the student data, I see a couple of routes you could take. If you can grab the information from the file system, you can load the data into local memory, manipulate it inside of a script, and then output it in a format and structure. This is handy if you’re looking to transform the data into a static form that can be used for a specific purpose, like say building a d3.js graph that shows how student performance relates to your variables.
The second option would be to transfer the data into database which becomes a permanent repository for the data. Then you can write queries to parse the data yourself and/or expose that database to users by building an API, which let’s users query the database through an interface that you build, like a web application.