Ideally, where would an application like Facebook store its \"Friends\" data? In a database table? in an xml file?
check out this blog: http://highscalability.com/ many real-world examples of systems architecures to learn from