Manual:在MediaWiki管理数据
Appearance
Outdated translations are marked like this.
MediaWiki是用来管理几乎所有文字信息的,并且目前做得非常出色。 然而,存储结构化内容的唯一方式是通过命名空间 、子页面 和分类 。
如果你需要在MediaWiki管理结构化数据,比如数字和日期,有以下几种途径,通过特制的扩展。
下表的扩展会在MediaWiki数据库中存储数据,用户可以查询数据。 参见下方以了解使用“外部”数据或存储数据而不可查询的扩展。 |
区别和相似点显示在下列表格中:
功能 | Semantic MediaWiki |
Wikibase |
Cargo |
VisualData |
---|---|---|---|---|
主要使用情况 | 使用MediaWiki安装以管理数据,基于语义网标准。 | 用于维基数据 | 在MediaWiki安装内管理数据。 | Managing data within a MediaWiki installation based on JSON-schema. |
方法 | 数据(属性)是在标准的维基文本中或者通过模板来注解的。 若数据类型为“reference”,则属性可以用来使用statements来描述项。[1] | 属性是使用statements来定义的并用于描述项。 | 数据存储在数据库表中,每个表对应一个模板。 | Data are stored in a dedicated slot with JSON content model |
最早可用时间 | 2005 | 2012 | 2015 | 2022 (formerly known as PageProperties ) |
活跃安装数 | 1000[2] | 100[3][4][5] | 100[6] | n/a (new extension or unknown) |
社群 | 超过190位开发者[7] | 超过172位开发者[8] | 超过63位开发者[9] | (main developer) |
存储 | MediaWiki数据库、Elasticsearch、5个不同的SPARQL存储[10] | MediaWiki数据库、Elasticsearch、SPARQL存储(Blazegraph用于wikidata.org) | MediaWiki数据库(或者单独的数据库)[11] | MediaWiki database |
属性定义 | 通过输入维基文本。 属性可以自由产生。 这些属性默认为数据类型页面并且可以稍后定义。 Datatypes can be changed any time. | 使用属性之前需要先定义,不能随意改变。[12] | 不使用属性,数据表是使用每个表的预定义好(但可以重新配置)的字段集合定义的。 | Properties are defined through one or more json-schema defined through a SchemaBuilder |
值声明 | 行内([[MyProperty::MyValue]] )或使用模板。 带有Page Forms 的基于表格的数据项。
|
Wikibase默认为类似于表格的输入界面。 | 使用模板中的解析器函数 带有Page Forms 的基于表格的数据项。 | Inline or popup OOUI forms automatically generated from JSON-schemas |
预定义的数据类型 | 18[13] | 17[14][15] | 18 | 4 (basic JSON-schema types) + 15 string formats |
属性管理 | 类型定义、约束模式、本体导入 | 自定义或导入维基数据本体 | 不使用属性,数据表是使用每个表的预定义好(但可以重新配置)的字段集合定义的。 | through a graphical interface (dedicated SchemaBuilder ) |
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 |
行内查询 | 有,有解析器函数 | 无(外部SPARQL查询); 计划中 由第三方扩展LinkedWiki 支持 |
有,使用解析器函数 | yes, with parser functions |
外部查询 | 是的,使用API或SPARQL查询(可通过特殊扩展获得,例如RDFIO和LinkedWiki) | 有,带有SPARQL查询服务 | 有,使用API | yes, with an API (not yet documented) |
结果格式[16] | ~ 75[17] | 无原生的结果显示;数据可以通过以下方式可视化:
查询服务或外部工具 通过Lua在wiki上访问数据(不提供查询)
|
约25[18] | 6 (table, datatables, json, jsonraw, query, template) |
开发 | GitHub | Gerrit | Gerrit | Gerrit |
补充扩展 | 28[19] ~ 51[20], e.g. Semantic Result Formats , Semantic Bundle , Semantic Scribunto | ~12[21], e.g. 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.[22] | Extension:ContactManager |
可选比较
- Cargo和Semantic MediaWiki
- Semantic MediaWiki vs Wikibase vs Cargo by Professional.Wiki, updated February 2023 or later
参考资料
- ↑ https://www.semantic-mediawiki.org/wiki/Help:Reference_and_provenance_data
- ↑ https://wikiapiary.com/wiki/Extension:Semantic_MediaWiki
- ↑ https://wikiapiary.com/wiki/Extension:WikibaseRepository
- ↑ https://wikibase.world
- ↑ https://addshore.com/2020/05/wbstack-2020-update-2/
- ↑ https://wikiapiary.com/wiki/Extension:Cargo
- ↑ https://www.openhub.net/p/smw
- ↑ https://github.com/wikimedia/mediawiki-extensions-Wikibase
- ↑ https://github.com/wikimedia/mediawiki-extensions-Cargo
- ↑ https://www.semantic-mediawiki.org/wiki/Help:SPARQLStore
- ↑ 扩展:Cargo/下载与安装
- ↑ d:Help:Data type#Changing datatype
- ↑ https://www.semantic-mediawiki.org/wiki/Help:List_of_datatypes
- ↑ d:Special:ListDatatypes
- ↑ Some datatypes are defined by other extension: Math and Score both define one datatype, JsonConfig defines two, WikibaseLexeme defines three, and Wikibase defines ten.
- ↑ “结果格式”指的是wiki以多种格式(例如表、日历、地图、时间线等)显示数据(行内查询结果)的能力
- ↑ https://www.semantic-mediawiki.org/wiki/Help:Result_formats
- ↑ Extension:Cargo/Display formats
- ↑ https://github.com/SemanticMediaWiki
- ↑ 分类:Semantic MediaWiki扩展
- ↑ Category:Wikibase扩展
- ↑ Extension:Cargo/Cargo and Semantic MediaWiki.
参阅
- Multi-Content Revisions - 通过对MediaWiki后端的技术更改,能够在同一wiki页面上管理不同的独立内容对象。
- WikiDB – 提供資料庫功能,有點類似於語義屬性。
- JsonConfig – 在wiki页面中存储JSON(包括表格和地图数据),并允许通过Lua访问数据,没有查询支持
- External Data - 从外部URL、本地文件、SQL或MongoDB数据库(可能包含非MediaWiki网站的数据)访问数据
- Structured data across Wikimedia – ongoing (as of 2021) project for improving structured data support in MediaWiki
- Category:Data management extensions