[RFC] Find a way to make global item ids
Closed, DeclinedPublic


When we have different WikibaseRepo installations on several wikis they all have their own items and item ids. These should be globally unique and identify the wiki they belong to because they might also be used within each other wiki.

Example: commons:File:xxx.jpg uses wikidata:Q123 as author

There are several options how this can be implemented:

using different prefixes (Q => Wikidata, C => Commons, Z => Wikiquote)
+ item ids do not get more complicated

  • you need the mapping of prefixes to wikis on every place you handle item ids
  • the mapping only works for wikimedia projects but third party users might have same prefixes for different things

adding the domain/interwiki prefix to the item ids (wikidata:Q123 or d:Q123)
+ creates globally unique identifiers in the wikimedia projects

  • hard to read and not "handy", also takes more space/characters

using full urls for item ids (www.wikidata.org/entity/Q123)
+ creates globally unique identifiers throughout the web

  • hard to read and not "handy", takes even more space/characters


bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz71996.
bzimport added a subscriber: Unknown Object (MLST).
Bene created this task.Oct 13 2014, 2:37 PM

We probably want to have a combination of unique ID prefix in wikimedia projects and URLs that can be used by the rest of the (semantic) web.

I know I have discussed this with Markus before, since it was relevant for WDTK. Can't find where this was though. I've poked Markus now, since I want his input.

using different prefixes (Q => Wikidata, C => Commons, Z => Wikiquote)

Nope, not going back to configurable prefixes :) Guess you where not involved yet at the point where they caused to much pain. It has some further drawbacks that you did not list:

  • Not globally unique (can have more Wikibase Repo instances than there are letters)
  • Item IDs are no longer easily recognizable as such (similar to: if it's 35 characters and starts with a "1", then I can guess it's a BTC address)
  • The prefixes will be rather obscure. If I see "Z123", how would I derive "Wikiquote"?

We do of course not need truely global IDs everywhere. And we have plently of locations where changing the current IDs would be a huge pain. As well as needing BC for certain things for forever. Which I hope is enough to establish that changing the existing IDs we have and forcing the change to happen everywhere is a bad idea. Rather than making such a modification, we need to add new support for global IDs, and switch to using that where appropriate. Which still leaves the question of what the global IDs should look like.

using full urls for item ids (www.wikidata.org/entity/Q123)

If you need IDs global to something more than your own Wikibase Repository installation, then I think it makes little sense to just go part of the way and not make it globally unique altogether. So I much preffer this approach over wikidata:Q123. That is also what WDTK already does if I'm not mistaken. Using the half-way approach in public interfaces seems especially bad. I can imagine that it might be slightly better in some specific internal cases, which however does not make it generally suitable.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Micru added a subscriber: Micru.Jun 1 2015, 4:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2015, 11:30 PM
thiemowmde renamed this task from Find a way to make global item ids to [RFC] Find a way to make global item ids.
thiemowmde updated the task description. (Show Details)
thiemowmde set Security to None.
thiemowmde removed a subscriber: Wikidata-bugs.