Manual:在MediaWiki管理数据

本頁使用了標題或全文手工轉換
From mediawiki.org
This page is a translated version of the page Manual:Managing data in MediaWiki and the translation is 75% complete.
Outdated translations are marked like this.

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)
社群 超过145位开发者[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查询(可通过特殊扩展获得,例如RDFIOLinkedWiki 有,带有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

可选比较

参考资料

参阅