Semantic MediaWiki/data/smw text2

About

 * Version: 1.7
 * Documentation status: unofficial; confirmed only by testing
 * Purpose: defines semantic relationships between property-names and property-values, where the value-type is long text or data of some kind (no SMW ID)
 * Fields:
 * s_id: SMW ID of source page (page where property is being set)
 * p_id: SMW ID of property (name of property being used)
 * value_blob: the value to which the property has been set for this page

SQL
CREATE TABLE `smw_text2` ( `s_id` int(8) unsigned NOT NULL,  `p_id` int(8) unsigned NOT NULL,  `value_blob` mediumblob,  KEY `s_id` (`s_id`),  KEY `p_id` (`p_id`) ) ENGINE=InnoDB DEFAULT CHARSET=binary;

Examples
SELECT s_id, p_id , CAST(s.smw_title AS char) AS s_title , CAST(p.smw_title AS char) AS p_title , CAST(t.value_blob AS char) AS t_value FROM (smw_text2 AS t   LEFT JOIN smw_ids AS s ON t.s_id=s.smw_id) LEFT JOIN smw_ids AS p ON t.p_id=p.smw_id;