database - Python, Pylons, and Sqlalchemy: Analyzing the Facebook Graph API -


i take data facebook graph api , analyze find out how close 1 person another. attempting use pylons framework sqlalchemy (right attached sqlite database) store information graph api can make available other applications via restful web service. wondering best approach analyzing data.

for example, should create objects analogous nodes , edges in graph api (users, posts, statuses, etc.) , analyze them, store aftermath of analysis in database, perhaps uids of each node , connections other nodes? or should store less, , have database of users , close friends? or should go through step step , store each of objects via orm mapper in database , make analysis database after having filled it?

what sorts of concerns go designing of database in situations this? how should objects relate/map model? should analysis taking place during whole process of grabbing data , storing it?

i'd store as possible, dump can. try maintain relationships between nodes can traverse/analyze them later. affords opportunity analyze data set as want, on , on , try different things. if want use sqlalchemy use simple self-referential relationship: http://www.sqlalchemy.org/docs/05/mappers.html#adjacency-list-relationships. way can maintain connections between objects easily, , traverse them. should think using mongodb. it's pretty nice sort of thing, can pretty dump json responses facebook mongodb. has great python client. here's mongodb docs on storing tree in mongodb: http://www.mongodb.org/display/docs/trees+in+mongodb. there couple approaches make sense there.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -