title: How to store graph data in a database?
body: <p>I am new to graphs and its very interesting.This question may be noob one but please site some good materials.</p>
  
  <p>I am trying to make a small social Network where each user is a node and has undirected connection with his friend.</p>
  
  <p>Its working fine but now I want to store it in a database.</p>
  
  <p>How can I store the data?How to store all the connected nodes(pointer) of a node.</p>
  
  <p>Is it better to delete the memory after the user log out and read it from database when he logs in or should logging in and logging out shouldnot have any impact on the node?</p>
  
  <p>I know its theoretical. Any references will be really helpful.</p>