Help:Contributing/entities: Difference between revisions
docs: migrate contribution guide §2-7 (entities) from docs/contribution-guide.md (via create-page on MediaWiki MCP Server) |
Document blank-clears and the clear/undo control on the Update forms (via update-page on MediaWiki MCP Server) |
||
| (9 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
This page explains the data model and how to create and edit items and properties. Start at the [[Help:Contributing]] hub if you are new here. | |||
== The data model in five minutes == | |||
Wikibase is the software behind Wikidata. Two entity types exist on this instance: | Wikibase is the software behind Wikidata. Two entity types exist on this instance: | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
! Entity !! ID !! URL form !! Example | |||
|- | |- | ||
| Item || <code>Q1</code>, <code>Q2</code>, … || <code>/wiki/Item:Q1</code> || a book, a person, a place | |||
|- | |- | ||
| | | Property || <code>P1</code>, <code>P2</code>, … || <code>/wiki/Property:P1</code> || "instance of", "date" | ||
|} | |} | ||
Each entity has: | Each entity has: | ||
* '''Terms''': a multilingual '''label''' (unique per language per type), a '''description''', and optional '''aliases'''. | |||
* '''Statements''': a '''property → value''' pair, optionally with '''qualifiers''' (details) and '''references''' (provenance), and a '''rank''' (preferred, normal, deprecated). | |||
* | |||
* | |||
Order of work: define '''properties first''' (the schema), then create '''items''' (the data). | |||
Order of work: define | |||
== | == Before you create anything == | ||
<ol> | <ol> | ||
<li> | <li>'''Search first''' — use the search box or [[Special:Search]]; do not create a duplicate item or property.</li> | ||
<li> | <li>'''Reuse existing properties''' — browse [[Special:ListProperties]] (sidebar → '''Semantic tools''' → '''Browse properties''') before proposing a new one. A property is expensive: its datatype is permanent.</li> | ||
<li> | <li>'''Labels are unique per language''' — an item cannot have two labels in the same language. Use the description to disambiguate.</li> | ||
</ol> | </ol> | ||
== | == Creating a property == | ||
<ol> | <ol> | ||
<li>Go to | <li>Go to [[Special:NewProperty]] (also in the sidebar → '''Semantic tools''' → '''Create new property''').</li> | ||
<li>Fill in at least a | <li>Fill in at least a '''label''' (for example <code>instance of</code>) and a '''description''' (for example <code>that class of which this subject is a particular example and member</code>). Add aliases (for example <code>is-a</code>, <code>isa</code>).</li> | ||
<li>Choose the | <li>Choose the '''datatype''' — the most important decision, and it '''cannot be changed after creation''':</li> | ||
</ol> | </ol> | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
! Datatype !! Use for !! Example value | |||
|- | |- | ||
| Item || link to another entity || <code>Q5</code> (a person) | |||
|- | |- | ||
| | | Property || link to another property || <code>P1</code> | ||
|- | |- | ||
| | | String || free text || <code>"ISBN-13"</code> | ||
|- | |- | ||
| < | | External identifier || identifier in another system || <code>Q1234</code> → <code>https://www.wikidata.org/wiki/Q1234</code> | ||
|- | |- | ||
| | | URL || web address || <code>https://example.org</code> | ||
|- | |- | ||
| | | Monolingual text || text with a language tag || <code>"hello"@en</code> | ||
|- | |- | ||
| | | Quantity || numbers with units || <code>3</code> (unit <code>Q11573</code>, kg) | ||
|- | |- | ||
| | | Time || dates || <code>2026-08-15T00:00:00Z</code> | ||
|- | |- | ||
| | | Globe coordinate || latitude and longitude || <code>48.85N 2.35E</code> | ||
|- | |- | ||
| | | Commons media || a file name || <code>File:Foo.jpg</code> | ||
|} | |} | ||
The dropdown in [[Special:NewProperty]] shows the full set of datatypes available here. | |||
The dropdown in | |||
For '''External identifier''', also set the '''formatter URL''' (formatter-url field), for example <code>https://www.wikidata.org/wiki/$1</code> — it makes values dereferenceable URIs in RDF. | |||
For | |||
Save: the property gets its permanent ID (<code>P1</code>, <code>P2</code>, …). Other editors can now use it in statements. | |||
Save: the property gets its permanent ID (< | |||
== | == Creating an item == | ||
<ol> | <ol> | ||
<li>Go to | <li>Go to [[Special:NewItem]] (also in the sidebar → '''Semantic tools''' → '''Create new item''').</li> | ||
<li>Fill in a | <li>Fill in a '''label''' (English at minimum — <code>en</code>; other languages welcome), a '''description''', and optional aliases.</li> | ||
<li>Save: the item gets its permanent ID (< | <li>Save: the item gets its permanent ID (<code>Q1</code>, <code>Q2</code>, …).</li> | ||
<li>Add statements (next section). An item with no statements is just a stub.</li> | <li>Add statements (next section). An item with no statements is just a stub.</li> | ||
</ol> | </ol> | ||
'''A classic page is created for you.''' Saving a new item at [[Special:NewItem]] also creates a wiki page in the main namespace titled with the item's label — an item labelled <code>Ada Lovelace</code> gets the page <code>Ada Lovelace</code> — and links the item to that page (the '''Sitelink''' tab then shows blue). If a page with that name already exists, the item is linked to the existing page instead of overwriting it; use the '''Sitelink''' tab if you need to correct a wrong link. The page title is derived from the label: characters MediaWiki forbids in page titles (<code># < > [ ] { } |</code>) become dashes, and the first letter is capitalised (<code>vector space</code> → the page <code>Vector space</code>); the item's label itself is stored unchanged. | |||
'''The reverse also happens: a new page gets an item.''' When you create a '''new page in the main namespace''' (the classic wikitext workflow), the wiki creates a matching item — labelled with the page title — and links the two, so the page's '''Sitelink''' tab turns blue. If an item with that label already exists, it is linked instead of duplicated. Pages in the <code>Source:</code>, <code>Person:</code>, <code>Collective:</code>, <code>FOSS:</code> and <code>Software:</code> namespaces are created by their own guided flows and are not affected. | |||
'''Deleting that page removes the auto-created stub item too.''' If the item still has only its label and page sitelink — no statements, description or aliases — deleting the Main-namespace page deletes the item with it. An item with any authored content is left alone. | |||
== Adding and editing statements == | |||
On an item page ([[Special:EntityPage/Q1]]): | |||
On an item page ( | |||
<ol> | <ol> | ||
<li>Click | <li>Click '''+ add statement''' (or '''+ add value''' for more values of one property).</li> | ||
<li> | <li>'''Property''': start typing <code>P1</code> or its label — autocomplete.</li> | ||
<li> | <li>'''Value''': depends on the datatype (item → start typing another entity's label).</li> | ||
<li> | <li>'''Qualifiers''' (optional): refine the statement, for example the <code>date</code> property (<code>P8</code>) on <code>population → 2.1 million</code>.</li> | ||
<li> | <li>'''References''' (recommended for facts — this is the provenance layer): '''Add reference''', for example the <code>source URL</code> property (<code>P7</code>) for a web source, <code>source</code> (<code>P28</code>) for a book or article, or <code>date</code> (<code>P8</code>) if the fact itself has a date. Every fact should say where it comes from.</li> | ||
<li> | <li>'''Rank''': mark conflicting or outdated values as '''deprecated''', the best value as '''preferred'''.</li> | ||
</ol> | </ol> | ||
Editing tips: | Editing tips: | ||
* Statement values are editable by clicking them; remove a statement with the ✕ control. | * Statement values are editable by clicking them; remove a statement with the ✕ control. | ||
* Terms (label, description, aliases) are edited directly in the entity header — click the pencil icon and choose the language tab. | * Terms (label, description, aliases) are edited directly in the entity header — click the pencil icon and choose the language tab. | ||
* Undo or roll back via the page | * Undo or roll back via the page '''history''' tab — every change is a wiki revision. | ||
</ | |||
== Deleting and merging == | |||
'''Merge''' two duplicate items: use '''merge''' on the item page (right: <code>item-merge</code>, granted to registered users). | |||
'''Delete''' an entity page: [[Special:DeletePage]] (<code>Item:Q12</code>) — admins only. Deleting a property is rare and breaks the statements that use it — prefer deprecating it instead. | |||
== Updating basic information with a form == | |||
Items created through the guided flows (persons, sources, collectives, software, fictional characters) can be edited in place with the same form that created them: | |||
< | * On the item page (<code>/wiki/Item:Q1</code>), the '''Update basic information''' button under the title opens the matching page — <code>Special:UpdatePerson</code>, <code>Special:UpdateSource</code>, <code>Special:UpdateCollective</code>, <code>Special:UpdateSoftware</code> or <code>Special:UpdateFictionalCharacter</code> (the page is chosen from the item's class). | ||
< | * The classic page the flow created (<code>Source:…</code>, <code>FOSS:…</code>, <code>Person:…</code>, <code>Collective:…</code>, <code>Software:…</code>) carries the '''same buttons''' under its title: '''Update basic information''', plus '''Copy citation''' and — for sources — '''Copy internal citation''' (the wikitext <code><ref>{{#cite:Q…}}</ref></code>). You can act on the item without opening its <code>Item:</code> page. A save started from the classic page returns there (also after a validation error), not to <code>Item:</code>. | ||
< | * The form shows the same fields as the creation flow, '''prefilled from the item's current statements'''. Change what needs changing and submit. | ||
</ | * '''What updates''': the item's English label and description, and the statements for the fields the form shows (authors, publisher, journal, dates, places, facts, …). Everything else — sitelinks, references on other statements, uploaded portraits/logos you did not replace — is left untouched. | ||
* '''A blank field removes its statements''' — clearing a field and saving deletes the statements it held, but only if the item has not been changed by someone else since the form opened (a concurrent edit is kept). Terms (label, description, aliases) keep their no-clobber rule: a blank term keeps the stored value. | |||
* '''Clear and undo''' — every editable field has a '''×''' button that blanks the field (and its place-label sibling where there is one). The button then becomes '''↶''' (undo), which restores the value the field had when the form opened; if the field holds different content by then, a confirmation warns that undoing discards it. | |||
* '''Renames''': if the new label differs, the classic page (e.g. <code>Person:Old Name</code>) is renamed to match, with a redirect left behind. | |||
* When a form field is filled automatically from fetched source data (for example a license from an image's metadata, or a publisher from a book record), the wiki shows a confirmation line — "{field} fetched from source: {value}, we think this corresponds to {label} (Q#)." — with '''Yes, that's right''' or '''No, let me correct'''. Say No to clear the field and pick another item yourself. | |||
Raw statement editing (add/remove values, qualifiers, references, ranks) is still done on the item page as described in [[#Adding and editing statements|Adding and editing statements]]. | |||
== | == See also == | ||
* [[Help:Contributing]] — the hub | |||
* [[Help:Contributing/access]] — who can do what | |||
* | * [[Help:Contributing/query]] — querying with SPARQL | ||
* | * [[Help:Contributing/house-rules]] — house rules for this instance | ||
* | * [[Help:Contributing/import]] — importing from external authorities | ||
* | * [[Help:Contributing/api]] — API and bulk editing | ||
* | |||
* | |||
Latest revision as of 11:02, 21 November 2026
This page explains the data model and how to create and edit items and properties. Start at the Help:Contributing hub if you are new here.
The data model in five minutes
Wikibase is the software behind Wikidata. Two entity types exist on this instance:
| Entity | ID | URL form | Example |
|---|---|---|---|
| Item | Q1, Q2, … |
/wiki/Item:Q1 |
a book, a person, a place |
| Property | P1, P2, … |
/wiki/Property:P1 |
"instance of", "date" |
Each entity has:
- Terms: a multilingual label (unique per language per type), a description, and optional aliases.
- Statements: a property → value pair, optionally with qualifiers (details) and references (provenance), and a rank (preferred, normal, deprecated).
Order of work: define properties first (the schema), then create items (the data).
Before you create anything
- Search first — use the search box or Special:Search; do not create a duplicate item or property.
- Reuse existing properties — browse Special:ListProperties (sidebar → Semantic tools → Browse properties) before proposing a new one. A property is expensive: its datatype is permanent.
- Labels are unique per language — an item cannot have two labels in the same language. Use the description to disambiguate.
Creating a property
- Go to Special:NewProperty (also in the sidebar → Semantic tools → Create new property).
- Fill in at least a label (for example
instance of) and a description (for examplethat class of which this subject is a particular example and member). Add aliases (for exampleis-a,isa). - Choose the datatype — the most important decision, and it cannot be changed after creation:
| Datatype | Use for | Example value |
|---|---|---|
| Item | link to another entity | Q5 (a person)
|
| Property | link to another property | P1
|
| String | free text | "ISBN-13"
|
| External identifier | identifier in another system | Q1234 → https://www.wikidata.org/wiki/Q1234
|
| URL | web address | https://example.org
|
| Monolingual text | text with a language tag | "hello"@en
|
| Quantity | numbers with units | 3 (unit Q11573, kg)
|
| Time | dates | 2026-08-15T00:00:00Z
|
| Globe coordinate | latitude and longitude | 48.85N 2.35E
|
| Commons media | a file name | File:Foo.jpg
|
The dropdown in Special:NewProperty shows the full set of datatypes available here.
For External identifier, also set the formatter URL (formatter-url field), for example https://www.wikidata.org/wiki/$1 — it makes values dereferenceable URIs in RDF.
Save: the property gets its permanent ID (P1, P2, …). Other editors can now use it in statements.
Creating an item
- Go to Special:NewItem (also in the sidebar → Semantic tools → Create new item).
- Fill in a label (English at minimum —
en; other languages welcome), a description, and optional aliases. - Save: the item gets its permanent ID (
Q1,Q2, …). - Add statements (next section). An item with no statements is just a stub.
A classic page is created for you. Saving a new item at Special:NewItem also creates a wiki page in the main namespace titled with the item's label — an item labelled Ada Lovelace gets the page Ada Lovelace — and links the item to that page (the Sitelink tab then shows blue). If a page with that name already exists, the item is linked to the existing page instead of overwriting it; use the Sitelink tab if you need to correct a wrong link. The page title is derived from the label: characters MediaWiki forbids in page titles (# < > [ ] { } |) become dashes, and the first letter is capitalised (vector space → the page Vector space); the item's label itself is stored unchanged.
The reverse also happens: a new page gets an item. When you create a new page in the main namespace (the classic wikitext workflow), the wiki creates a matching item — labelled with the page title — and links the two, so the page's Sitelink tab turns blue. If an item with that label already exists, it is linked instead of duplicated. Pages in the Source:, Person:, Collective:, FOSS: and Software: namespaces are created by their own guided flows and are not affected.
Deleting that page removes the auto-created stub item too. If the item still has only its label and page sitelink — no statements, description or aliases — deleting the Main-namespace page deletes the item with it. An item with any authored content is left alone.
Adding and editing statements
On an item page (Special:EntityPage/Q1):
- Click + add statement (or + add value for more values of one property).
- Property: start typing
P1or its label — autocomplete. - Value: depends on the datatype (item → start typing another entity's label).
- Qualifiers (optional): refine the statement, for example the
dateproperty (P8) onpopulation → 2.1 million. - References (recommended for facts — this is the provenance layer): Add reference, for example the
source URLproperty (P7) for a web source,source(P28) for a book or article, ordate(P8) if the fact itself has a date. Every fact should say where it comes from. - Rank: mark conflicting or outdated values as deprecated, the best value as preferred.
Editing tips:
- Statement values are editable by clicking them; remove a statement with the ✕ control.
- Terms (label, description, aliases) are edited directly in the entity header — click the pencil icon and choose the language tab.
- Undo or roll back via the page history tab — every change is a wiki revision.
Deleting and merging
Merge two duplicate items: use merge on the item page (right: item-merge, granted to registered users).
Delete an entity page: Special:DeletePage (Item:Q12) — admins only. Deleting a property is rare and breaks the statements that use it — prefer deprecating it instead.
Updating basic information with a form
Items created through the guided flows (persons, sources, collectives, software, fictional characters) can be edited in place with the same form that created them:
- On the item page (
/wiki/Item:Q1), the Update basic information button under the title opens the matching page —Special:UpdatePerson,Special:UpdateSource,Special:UpdateCollective,Special:UpdateSoftwareorSpecial:UpdateFictionalCharacter(the page is chosen from the item's class). - The classic page the flow created (
Source:…,FOSS:…,Person:…,Collective:…,Software:…) carries the same buttons under its title: Update basic information, plus Copy citation and — for sources — Copy internal citation (the wikitext[1]). You can act on the item without opening itsItem:page. A save started from the classic page returns there (also after a validation error), not toItem:. - The form shows the same fields as the creation flow, prefilled from the item's current statements. Change what needs changing and submit.
- What updates: the item's English label and description, and the statements for the fields the form shows (authors, publisher, journal, dates, places, facts, …). Everything else — sitelinks, references on other statements, uploaded portraits/logos you did not replace — is left untouched.
- A blank field removes its statements — clearing a field and saving deletes the statements it held, but only if the item has not been changed by someone else since the form opened (a concurrent edit is kept). Terms (label, description, aliases) keep their no-clobber rule: a blank term keeps the stored value.
- Clear and undo — every editable field has a × button that blanks the field (and its place-label sibling where there is one). The button then becomes ↶ (undo), which restores the value the field had when the form opened; if the field holds different content by then, a confirmation warns that undoing discards it.
- Renames: if the new label differs, the classic page (e.g.
Person:Old Name) is renamed to match, with a redirect left behind. - When a form field is filled automatically from fetched source data (for example a license from an image's metadata, or a publisher from a book record), the wiki shows a confirmation line — "{field} fetched from source: {value}, we think this corresponds to {label} (Q#)." — with Yes, that's right or No, let me correct. Say No to clear the field and pick another item yourself.
Raw statement editing (add/remove values, qualifiers, references, ranks) is still done on the item page as described in Adding and editing statements.
See also
- Help:Contributing — the hub
- Help:Contributing/access — who can do what
- Help:Contributing/query — querying with SPARQL
- Help:Contributing/house-rules — house rules for this instance
- Help:Contributing/import — importing from external authorities
- Help:Contributing/api — API and bulk editing
- ↑ No entity id given. Usage: GraphQL. (n.d.)..