I must take data in the Facebook Graph API and evaluate it to discover roughly how close one individual would be to another. I'm trying to make use of the Pylons framework with SqlAlchemy (right it is now mounted on a SQLite database) to keep information in the Graph API to ensure that I makes it open to my other programs using a Peaceful web service. I'm wondering what will be the ultimate way to examining the information.

For instance, must i create objects similar towards the nodes and edges within the Graph API (customers, posts, statuses, etc.) and evaluate them, then store just the aftermath of this analysis within the database, possibly the UIDs of every node and it is connections with other nodes? Or must i store less, and just possess a database from the customers as well as their close buddies? Or must i undergo step-by-step and store each one of the objects through the ORM mapper within the database making the analysis in the database after getting filled it?

What types of concerns enter in the creating of the database in situations such as this? How should objects relate/map towards the model? Where if the analysis be happening throughout the operation of getting data and storing it?

I'd store whenever possible, dump all you can. Attempt to keep up with the associations between nodes so that you can traverse/evaluate them later. This offers the chance to evaluate your computer data set around you would like, again and again and check out various things. If you wish to use SQLAlchemy you could utilize an easy self-referential relationship: http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships. That method for you to keep up with the connections between objects easily, and simply traverse them. It's also wise to consider using MongoDB. It's pretty nice with this kind of factor, you are able to virtually just dump the JSON reactions you receive from Facebook into MongoDB. Additionally, it includes a great python client. Here's the MongoDB paperwork on storing a tree in MongoDB: http://www.mongodb.org/display/DOCS/Trees+in+MongoDB. You will find a few approaches which make sense there.