Help:Configuration parameter "$smwgDefaultStore"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form (experimental)


Title $smwgDefaultStore
Description Sets the storage backend to be used for the semantic data
Default setting
SMWSQLStore3
(Other) available settings
SMWSparqlStore

Allows to set the usage of a RDF database to be used for the semantic data

Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Installation · Store settings
Keyword sqlstore · sparqlstore · store · sparql · sql

$smwgDefaultStore is a configuration parameter that is used to set the storage backend for the semantic data either SQL or SPARQL. The parameter was introduced in Semantic MediaWiki 1.0Released on 31 December 2007 and compatible with MW 1.9.x - 1.12.x..

From Semantic MediaWiki 1.2.0Released on 10 July 2008 and compatible with MW 1.11.x - 1.14.x. to Semantic MediaWiki 1.7.1Released on 5 March 2012 and compatible with MW 1.16.0 - 1.19.x. the default store was SMWSQLStore2 (relational database) which received legacy support in Semantic MediaWiki 1.8.0Released on 2 December 2012 and compatible with MW 1.17.0 - 1.22.x
(except 1.22.1).
and was dropped with Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x..

Default setting

$smwgDefaultStore = 'SMWSQLStore3';

This means that a relational database is being used as a data backend/store for Semantic MediaWiki which is suitable for most standard environments.

Available options

  • SMWSQLStore3 − Sets a relational database as a data backend/store, i.e. MySQL, SQLite or PostgreSQL
  • SMWSparqlStore − Sets a sparql database as the data backend/store, e.g. Blazegraph, Sesame, Fuseki etc.
NoteNote: See the help page on using SPARQL and RDF stores and the configuration parameter $smwgSparqlRepositoryConnectorIdentifies a database connector that ought to be used together with the semantic data store. for Semantic MediaWiki 2.0.0Released on 4 August 2014 and compatible with MW 1.19.0 - 1.24.x. and later for more information on this setting.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Change to a sparql database for data storage
$smwgDefaultStore = 'SMWSparqlStore';
Important noteImportant Note: If you change the setting for this configuration parameter, please ensure to run maintenance script "setupStore.php"Allows to set up the data backend/store followed by maintenance script "rebuildData.php"Allows to rebuild all the semantic data for a selected data backend/store.

See also