Extract freebase graph to relational database