I am building my app and have been annoyed concerning sessions storage. I am a newbie about sessions. I am working with Symfony2 and MySQL, and as Symfony is storage-agnostic, I am searching into the Drupal 7 diagram to find a good model.
So I wondered a couple of things :
- How to manage sessions in an Entity-Relationship diagram ?
- In drupal 7 diagram, what do sessions->fields mean ?
- Sessions -> uid (int(10)) -> OK
- Sessions -> sid (varchar(128)) ?
- Sessions -> ssid (varchar(128)) ?
- Sessions -> hostname (varchar(128)) -> OK
- Sessions -> timestamp (int(11)) -> guessing date of connection
- Sessions -> cache (int(11)) -> Why only an integer ?
- Sessions -> session (longblob) -> What do you put inside ?
As I imagined my own diagram, I had 2 tables :
- Session that stored the sessionId, cookie and establishing date
- User_Session, association between Sessions and Users, which stores IP address and DateInit.
Why not storing one session by Cookie and storing also each time the user connects ? If someone could help me understand and help me find the true entity-relationship model...