Semantic MediaWiki/data/smw inst2: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
m moved smw inst2 to Semantic MediaWiki/data/smw inst2: forgot to prefix with /
tentative example SQL
 
Line 8: Line 8:
   KEY `o_id` (`o_id`)
   KEY `o_id` (`o_id`)
) ENGINE=InnoDB DEFAULT CHARSET=binary;</mysql>
) ENGINE=InnoDB DEFAULT CHARSET=binary;</mysql>
==Examples==
This is ''probably'' correct, based on field names and convention found in other tables, but still not sure what it means:
<mysql>
SELECT s_id, o_id
  , CAST(s.smw_title AS char) AS s_title
  , CAST(o.smw_title AS char) AS o_title
  FROM
    (smw_inst2 AS i
    LEFT JOIN smw_ids AS s ON i.s_id=s.smw_id)
    LEFT JOIN smw_ids AS o ON i.o_id=o.smw_id;
</mysql>

Latest revision as of 16:08, 17 December 2012

About

  • Version: 1.7

SQL

<mysql>CREATE TABLE `smw_inst2` (

 `s_id` int(8) unsigned NOT NULL,
 `o_id` int(8) unsigned DEFAULT NULL,
 KEY `s_id` (`s_id`),
 KEY `o_id` (`o_id`)

) ENGINE=InnoDB DEFAULT CHARSET=binary;</mysql>

Examples

This is probably correct, based on field names and convention found in other tables, but still not sure what it means: <mysql> SELECT s_id, o_id

 , CAST(s.smw_title AS char) AS s_title
 , CAST(o.smw_title AS char) AS o_title
 FROM
   (smw_inst2 AS i
   LEFT JOIN smw_ids AS s ON i.s_id=s.smw_id)
   LEFT JOIN smw_ids AS o ON i.o_id=o.smw_id;

</mysql>