As the SMW code API is not yet stable or well-documented, it appears that going directly to the database may be the best way to utilize SMW data from code running within MediaWiki (typically as an extension).
All of this information has been reverse-engineered, mostly from examination of data in a single SMW instance. I was not able to find any data-structure documentation in the official code docs.
Note that the schema version numbers are generally higher than the corresponding SMW version.
schema version 3
These are present in SMW version 1.9 alpha:
schema version 2
These were present in SMW version 1.7, and may also be valid for 1.8 (but not 1.9):
Core tables are boldfaced; the others seem to be primarily for optimization or auxiliary purposes.
- I'm presuming that there was a schema version 1 based on the naming of the version 2 tables (they all end in '2'), but this may be incorrect. In any case, schema version 2 corresponds approximately to SMW v1.x, and schema version 3 to SMW 2.x (and some high-numbered 1.x beta releases).