JSON

Drupal/Freebase Integration Notes

Freebase and Drupal connectedFreebase is an open database (CC-BY) of world information with a web service interface. Think Wikipedia with an API. I've been playing around Drupal/Freebase integration for a community project we have brewing, Semantic Web Community Barn Raising in Vancouver. This post contains some research results, in the form of PHP code, on integrating Freebase and Drupal.

This code is intended as a proof-of-concept example and jumping off point for other developers. It is not intended as an example of production-ready code.

If you have feedback or a better method, please leave a comment!

Freebase Background

Those of you familiar with Freebase can skip this part. If not, read on!

Freebase uses the Metaweb database. The Metaweb database is not a row/column style relational database, data is organized as an object graph. Documentation on Metaweb architecture is available at the Freebase reference guide: Chapter 2. Metaweb Architecture.

The language used to query Freebase is the Metaweb Query Language, MQL. MQL queries are written in JSON, and are nothing like SQL. The Metaweb documentation page, Freebase MQL Reference Guide, has details and examples of creating JSON MQL queries for reading and writing data.

Syndicate content Syndicate content