The primary data storage is document oriented, and very dumb. It's JSON blobs stored as wiki page content, using MediaWiki's standard content blob storage mechanism.
We have a live export to a triple store, and an open SPARQL endpoint.
These links may be helpful:
https://www.mediawiki.org/wiki/Wikibase/DataModel/JSON https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format https://www.wikidata.org/wiki/Wikidata:Data_access
If you want to play with the data, try http://query.wikidata.org/