Strictly speaking, the sessions that Bryan describes above are only the default implementation. You're able to supply your own session handling mechanisms and many people alter them to store the data in the database instead of in flat files. This is for a few reasons:
First, it removes the necessity of opening another resource (come on, you're already opening a database connection in most cases anyways, right?).
Second, it keeps all the data together in a nice, neat way.
Third, it's much easier to make transformations / informed reads against that data from within a database.