Connected graph to database