Jump to content

Manual:Managing data in MediaWiki

From mediawiki.org

MediaWiki was designed to manage mostly free-form text and images. A limited amount of structure is available: namespaces , subpages and categories help to group similar pages together, while features like infoboxes and galleries help to structure the contents within each page.

However, MediaWiki by itself does not truly provide ways to manage structured data: data that can be queried, filtered, and in some cases displayed with visualizations including tables, charts, maps[1] and calendars. For that, a number of dedicated extensions exist.

The following table describes the extensions that can store the data edited by users in a MediaWiki database, from where it can then be queried.

This is not a list of all structured data functionality; the "See also" section lists other extensions and features that can be used for storing or displaying structured data.

Feature
Semantic MediaWiki

Wikibase

Cargo
VisualData Bucket NeoWiki
Main usecase Managing data within a MediaWiki installation, based on Semantic Web standards. Powering Wikidata and other editable graph databases. Managing data within a MediaWiki installation. Managing data within a MediaWiki installation based on JSON-schema. lightweight Lua interface for storing and accessing structured data on wiki pages Knowledge management system that combines collaborative editing and a knowledge graph
Approach Data (properties) are annotated within regular wikitext or by templates. With the datatype "reference", properties can be used to describe items using statements.[2] Properties are defined and used to describe Items using statements. Data is stored in database tables, with each table corresponding to a template. Data are stored in a dedicated slot with JSON content model Data is stored in buckets, which are database tables with specific columns that you can define Schemas can be defined and applied to wiki pages, stored in a dedicated slot as JSON data.
Available since 2005 2012 2015 2022 (formerly known as PageProperties ) 2025 2026
Active installations 1000s[3] 100s[4][5][6] 100s[7] n/a (new extension or unknown)
Community 190+ developers[8] 172+ developers[9] 63+ developers[10] (main developer) ECHOLOT project, Professinal Wiki, KM-A, BlueSpice Galaxy
Storage MediaWiki database, Elasticsearch, 5 different SPARQL stores[11] MediaWiki database, Elasticsearch, SPARQL store (Blazegraph for wikidata.org) MediaWiki database (or a separate database)[12] MediaWiki database MediaWiki database (MySQL/MariaDB) different SPARQL stores, currently Neo4J
Property definition By typing wikitext. Properties can be invented freely. They will be of datatype page by default and can be defined later. Datatypes can be changed any time. Properties have to be defined before usage and can not be changed easily.[13] Instead of using properties, data tables are defined with a predetermined (but reconfigurable) set of fields per table. Properties are defined through one or more json-schema defined through a SchemaBuilder Tables in the Bucket: namespace Form based schema editing
Value declaration Inline ([[MyProperty::MyValue]]) or with templates. Form-based data entry with Page Forms . Wikibase default form-like input interface. With parser functions in templates. Form-based data entry with Page Forms . Inline or popup OOUI forms automatically generated from JSON-schemas via Lua call of the bucket.put function Codex based form editing
Predefined data types 18[14] 17[15][16] 18 4 (basic JSON-schema types) + 15 string formats 5 [17]
Property management type definitions, constraint schemas, ontology import custom, or import of Wikidata ontology Instead of using properties, data tables are defined with a predetermined (but reconfigurable) set of fields per table. through a graphical interface (dedicated SchemaBuilder ) through a graphical interface
Page names and internal linking Pages have normal names and can be linked to with their names. Page names are stored with their Q-numbers (displaying labels in available languages). Internal linking must be done to the Q-number; you cannot link to a label. Pages have normal names and can be linked to with their names. Schemas are stored in a dedicated namespace and JSON-data in a dedicated slot associated to wiki articles. JSON-data can be accessed through an extension of the wiki interface MediaWiki pages can have schemas
Inline queries yes, with parser functions No (external SPARQL queries only), but planned Other extensions support inline querying of Wikibase data, including LinkedWiki and External Data . yes, with parser functions yes, with parser functions yes, with parser functions via the SQL store
External querying yes, with either an API or SPARQL querying (available through special extensions such as RDFIO and LinkedWiki) yes, with SPARQL Query service yes, with an API yes, with an API[18] API is not yet stable [19] yes, with an API or SPARQL endpoint
Result formats[20] ~ 75[21] no native result display; data may be visualized via:
  • Query Service or other external tools
  • on wiki data access via LUA (no query support)
  • Extension:LinkedWiki - third-party
~ 25[22] 12+ (Json, Table, Datatable, Template, Calendar, Carousel, Map, pageid, pagetitle, count, raw, Lua ) [23]
Development GitHub Gerrit Gerrit Gerrit GitHub GItHub
Complementary extensions ~ 40[24], e.g. Semantic Result Formats , Semantic Bundle , Semantic Scribunto ~12[25], e.g. Wikibase Repository , Wikibase Client , WikibaseLexeme , Query Service 2 (Page Forms, Page Schemas). Cargo provides some or all of the functionality of Semantic MediaWiki, Semantic Result Formats, Maps, Semantic Drilldown, Semantic Compound Queries, Semantic Internal Objects and Semantic Scribunto.[26] ContactManager Lua

Alternative comparisons

[edit]


References

[edit]
  1. see also Wikimedia Maps
  2. https://www.semantic-mediawiki.org/wiki/Help:Reference_and_provenance_data
  3. https://wikiapiary.com/wiki/Extension:Semantic_MediaWiki
  4. https://wikiapiary.com/wiki/Extension:WikibaseRepository
  5. https://wikibase.world
  6. https://addshore.com/2024/10/visualizing-wikibase-connections-using-wikibase-world/
  7. https://wikiapiary.com/wiki/Extension:Cargo
  8. https://www.openhub.net/p/smw
  9. https://github.com/wikimedia/mediawiki-extensions-Wikibase
  10. https://github.com/wikimedia/mediawiki-extensions-Cargo
  11. https://www.semantic-mediawiki.org/wiki/Help:SPARQLStore
  12. Extension:Cargo/Download and installation
  13. d:Help:Data type#Changing datatype
  14. https://www.semantic-mediawiki.org/wiki/Help:List_of_datatypes
  15. d:Special:ListDatatypes
  16. Some datatypes are defined by other extension: Math and Score both define one datatype, JsonConfig defines two, WikibaseLexeme defines three, and Wikibase defines ten.
  17. https://meta.weirdgloop.org/w/Extension:Bucket#Basic_usage
  18. Extension:VisualData/API
  19. https://meta.weirdgloop.org/w/Extension:Bucket
  20. "Result formats" mean the ability of the wiki to display data (results of an inline query) in various formats, e.g. tables, calendars, maps, timelines, etc.
  21. https://www.semantic-mediawiki.org/wiki/Help:Result_formats
  22. Extension:Cargo/Display formats
  23. Extension:VisualData/Result_formats
  24. Category:Semantic MediaWiki extensions
  25. Category:Wikibase extensions
  26. Extension:Cargo/Cargo and Semantic MediaWiki.

See also

[edit]