Help:Wikidata datamodel

#REDIRECTmw:Extension:Wikibase Client/Lua#Structure_2
Soft redirect page


Entity table and data structure

edit

The Lua mw.wikibase.getEntityObject() returns a table with all wikidata information from that item.

Table structure as data model

edit

The structure of the table in a model is

   
 

Table structure as text

edit

The structure of the table in text is

id: q7259
title: Q7259
type: item
labels:
   de:
      language: de
      value: Ada Lovelace
   en:
      language: en
      value: Ada Lovelace
aliases:
   de:
      1:
         language: de
         value: Augusta Ada Byron
      2:
         language: de
         value: Ada Byron
   en:
      1:
         language: en
         value: Augusta Ada Byron
descriptions:
   de:
      language: de
      value: englische Mathematikerin
   en:
      language: en
      value: English mathematician, considered the first computer programmer
claims:
   P107:
      1:
         id: q7259$FEE5069C-DF8E-4355-A973-2B0B8BC339A8
         rank: normal
         type: statement
         mainsnak:
            property: P107
            snaktype: value
            datavalue:
               type: wikibase-entityid
               value:
                  entity-type: item
                  numeric-id: 215627
         references:
            0:
               hash: 827686a10b6e2126886dbc6755a3027fb443996
               snaks-order:
                  0: P143
               snaks:
                  P143:
                     0:
                        property: P143
                        snaktype: value
                        datavalue:
                           type: wikibase-entityid
                           value:
                              numeric-id: 48952
                              entity-type: item
         qualifiers-order:
           0: P459
         qualifiers:
            P459:
               0:
                  property: P459
                  snaktype: value
                  datavalue:
                     type: wikibase-entityid
                     value:
                        numeric-id: 670933
                        entity-type: item
   P18:
      1:
         id: q7259$A78C2B21-2A10-4E77-B6ED-CC278204F55A
         rank: normal
         type: statement
         mainsnak:
            property: P18
            snaktype: value
            datavalue:
               type: string
               value: Ada lovelace.jpg
      2:
         id: q7259$21DC3BE7-1BFB-4835-A5AF-95A4C81BA99B
         rank: normal
         type: statement
         mainsnak:
            property: P18
            snaktype: value
            datavalue:
               type: string
               value: Ada Lovelace 1838.jpg
  P569:
      1:
         id: q91$DD9D8F66-0AEE-4101-9A83-1F2A541DF4DC
         rank: normal
         type: statement
         mainsnak:
            property: P569
            snaktype: value
            datavalue:
               type: time
               value:
                  time: +00000001809-02-12T00:00:00Z
                  precision: 11
                  before: 0
                  after: 0
                  timezone: 0
                  calendarmodel: http://www.wikidata.org/entity/Q1985727
   P625:
      1:
         id: q64$A82559B1-DA8F-4E02-9F72-E304B90A9BDE
         rank: normal
         type: statement
         mainsnak:
            property: P625
            snaktype: value
            datavalue:
               type: globecoordinate
               value:
                  latitude: 52.516666666667
                  longitude: 13.383333333333
                  precision: 0.016666666666667
                  globe: http://www.wikidata.org/entity/Q2
   P854:
      1:
         id: Q31$d4abd639-4973-d187-46b0-04f71581834d
         rank: normal
         type: statement
         mainsnak:
            property: P854
            snaktype: value
            datavalue:
               type: string
               value: http://www.adalovelace.com
   P1082:
      1:
         id: Q62$218ff26e-4e2b-ea0e-81c5-36b0fa6e262d
         rank: normal
         type: statement
         mainsnak:
            property: P1082
            snaktype: value
            datavalue:
               type: quantity
               value: 
                  amount: 1809
                  lowerBound: 1808
                  upperBound: 1810
                  unit: 1
   P1451:
      1:
         id: Q343$d76196b1-46c1-7362-0447-7013bd649e23
         rank: normal
         type: statement
         mainsnak:
            property: P1451
            snaktype: value
            datavalue:
               type: monolingualtext
               value:
                  text: Einigkeit und Recht und Freiheit
                  language: de
sitelinks:
   dewiki:
      site: dewiki
      title: Ada Lovelace
   enwiki:
      site: enwiki
      badges:
         0: Q17432796
      title: Ada Lovelace
   enwikivoyage:
      site: enwikivoyage
      title: London
   commonswiki:
      site: commonswiki
      title: Ada Lovelace

See also

edit

References

edit