Help:Grundlæggende medlemskabsegenskaber

This page is a translated version of the page Help:Basic membership properties and the translation is 44% complete.
Outdated translations are marked like this.

Introduktion

This page explains the differences among the properties instance of (P31), subclass of (P279) and part of (P361).

Definitioner

To understand the differences, it is important to be familiar with the terms instance and class. A class is an abstraction that describes a set (or collection) of things, called its instances. Typically, all the instances belonging to a class share a set of properties, which properties characterize the class.

If all the instances of class A necessarily also belong to class B, then we say A is a subclass of B.

Eksempler

Praktiske aspekter

  • An item can be both an instance and a class. An item is an instance if it has an instance of (P31) property. An item is a class if it is the value associated with some other item's instance of (P31) property (or if it has a subclass of (P279) property). For example, Angela Merkel (Q567) is an instance of politician (Q82955), and politician (Q82955) is an instance of profession (Q28640). So the item politician (Q82955) is both a class and an instance.
  • The complete set of instances implied by a class might or might not exist as items within Wikidata.
  • Typically, a class is characterized by a set of properties shared by all instances. The instances differ from each other in the values they have for those properties, but not in the fact of having the properties themselves (although this is not enforced by Wikidata).


The relation between instances with a common feature and a class characterized by this feature is produced with the property instance of (P31). We use instance of (P31) instead of subclass of (P279) when we cannot say anything about instances with such relation. More specifically, it is an rdf:type.[1]

For example, Atlantic Ocean (Q97) and Pacific Ocean (Q98) are both instances of ocean (Q9430). We write therefore on Wikidata:

  • Is used to state that all the instances of one class are instances of another[2]
  • More specifically, it is an rdfs:subClassOf[3]
  • If any instances of the subject class are not instances of the value class, subclass of (P279) is not appropriate. partially coincident with (P1382) may be used to link overlapping classes where neither is a strict subclass of the other.

Nogle eksempler:

Et andet eksempel:

A lake and an ocean are not the same but all their instances share the common feature of being a body of water. Therefore we can use the class body of water (Q15324) to state that:

Now Lake Baikal (Q5513), Lake Erie (Q5492), Atlantic Ocean (Q97) and Pacific Ocean (Q98) will all be transitive (indirect) instances of body of water (Q15324). In general we can use more abstract objects (like body of water (Q15324)) instead of enumerations (lake (Q23397) and ocean (Q9430)) both: 1. in our statements and 2. in our questions (not covered at this help page).

Transitive properties

The property subclass of (P279) is a transitive Wikidata property (Q18647515). This means: if a class A is a subclass of class B, and B is a subclass of class C, then A is implicitly also a subclass of C. There is then no general need to add an explicit statement to Wikidata declaring A to be a subclass of C.

For example, tree (Q10884) is a subclass of woody plant (Q757163), and woody plant (Q757163) is a subclass of plant (Q756). Thus tree (Q10884) is implicitly also a subclass of plant (Q756).

Similarly, if item x is an instance of class B, and B is a subclass of class C, then x is implicitly also an instance of C. There is then no general need to add an explicit statement to Wikidata declaring x to be an instance of C.

The property instance of (P31) is not transitive. Considering the example from above: Angela Merkel (Q567) is an instance of politician (Q82955), and politician (Q82955) is an instance of profession (Q28640), but it would be incorrect to say that Angela Merkel (Q567) is an instance of profession (Q28640).

Inferences based on transitivity do not take qualifiers into account, so instance of (P31) and subclass of (P279) statements must be valid while ignoring any qualifiers; in other words, these statements should not have any restrictive qualifier (Q61719275), or any qualifier that is being used restrictively. For example, if A is often, but not always, a subclass of B, then it is not valid to state that A is a subclass of B with nature of statement (P5102) = often (Q28962312), because this will lead to false inferences.

Items cannot be an instance of another non-class, but they can be part of another non-class. For example, Albert Einstein's brain (Q2464312) is a part of Albert Einstein (Q937). On Wikidata we use part of (P361) for this relation.

Classes can also be part of another class. For example,

The use of instance of (P31) instead of part of (P361) would be wrong here because human brain (Q492038) is not a person. Using subclass of (P279) would also be wrong because an instance of human brain (Q492038) (e.g. Albert Einstein's brain (Q2464312)) is not an instance of the class Homo sapiens (Q15978631).

Like subclass of (P279), part of (P361) is a transitive property.

Inverse relations of part of (P361)

  1. has part(s) (P527) - is used to say that an instance has as part some other instance or that instances of a class have as part an instance of some other class
  2. has part(s) of the class (P2670) - is used to say that an instance (never a class) has as part an instance of a class. If the parent item is both an instance and a class, has part(s) of the class (P2670) should not be used.

For eksempel,

In the first example, has part(s) (P527) is used because Greek alphabet (Q8216) has as part Α (Q9887). has part(s) (P527) is also used in the second example because instances of alphabet (Q9779) have instances of letter (Q9788) as parts. In the last example, we take has part(s) of the class (P2670) since Greek alphabet (Q8216) has one or more instances of Greek letter (Q19793459) as parts.

Eksempler

instance of (P31) vs. subclass of (P279) vs. part of (P361)

Forskelle på instance of (P31), subclass of (P279) og part of (P361)
Property X Y hvad det betegner eksempler forklaring hvorfor ikke bruge ...
<X> instance of <Y> tilfælde klasse
  • X er et medlem (en enkelt ting eller væsen) af klassen Y
  • X er et særskilt eksempel på klassen Y
  • alle tilfælde af klassen Y har bestemte egenskaber til fælles
  • Y er mængden af dens tilfælde (inklusive X)
<USS Nimitz> instance of <supercarrier> <USS Nimitz> er et enkelt konkret hangarskib, <Nimitz-klassen> er en klasse af hangarskibe som har mange tilfælde (hangarskibe)
  • subclass of anvendes ikke fordi <USS Nimitz> ikke er en klasse
  • part of anvendes ikke fordi <USS Nimitz> er et tilfælde, og <Nimitz-klassen> er en klasse. Tilfælde kan ikke være dele af klasser
<People's Republic of China> instance of <sovereign state> <suveræn stat> er et koncept, som er defineret af nogle kriterier, <Kina> er et objekt, som opfylder disse kriterier
  • subclass of anvendes ikke fordi <Kina> er en konkret stat
  • part of anvendes ikke fordi tilfælde ikke kan være dele af klasser
<Sun> instance of <G-type main-sequence star> The <Sun> is a specific star with the spectral characteristics of a G-type main-sequence star, and so is an instance of that class
  • subclass of not used because the <Sun> is not a class but a single astronomical object
  • part of not used because non-classes cannot be parts of classes
<hatter> instance of <profession> <hatter> er et særskilt eksempel på en profession
  • subclass of anvendes ikke fordi <hatter> ikke er en klasse af stillingsbetegnelser, men en enkelt stillingsbetegnelse (tilfælde)
  • part of anvendes ikke, fordi tilfælde ikke kan være del af klasser
<Douglas Adams> instance of <human> <Douglas Adams> is a specific human person (this is one of the most common cases for instance of)
  • subclass of not used because <Douglas Adams> is not a class of people but a single person (instance)
  • part of not used because instances cannot be parts of classes
<X> subclass of <Y> klasse klasse
  • alle tilfælde af klasse X tilhører klasse Y
  • tilfælde af X er også tilfælde af Y
<supercarrier> subclass of <aircraft carrier> både <Nimitz-klassen> og <hangarskib> er klasser, og den sidste indeholder den første
  • instance of anvendes ikke fordi <Nimitz-klassen> ikke er et konkret objekt
  • part of anvendes ikke fordi et tilfælde af <Nimitz-klassen> (f. eks. <USS Nimitz>) ikke kan være en del af et tilfælde af et hangarskib (f.eks. <USS Enterprise>)
<sovereign state> subclass of <state> begge er klasser, den første har alle den sidstes karakteristika, og visse yderligere egenskaber, så den er en underklasse af den sidste
  • instance of anvendes ikke fordi <suveræn stat> ikke er en specifik stat, men en klasse, som indeholder alle suveræne stater
  • part of anvendes ikke fordi et tilfælde af den suveræne stat (f.eks. <Kina>) ikke kan være en del af et tilfælde af en stat (f.eks. <Kina>)
<G-type star> subclass of <star> every individual G-class star (instances of <G-class star>) is also a star - i.e. belongs to the class <star>
  • instance of not used because <G-class star> is not a single star, but a type of <star>
  • part of not used because the relationship is not one of composition, i.e. individual <G-class star> instances do not join together to make an instance of a <star>.
<X> part of <Y> tilfælde tilfælde
  • tilfælde X er en del af tilfælde Y
  • forskellige dele af Y (inklusive X) danner samlet set hele Y
<USS Nimitz> part of <Carrier Strike Group Eleven> <USS Nimitz> er et konkret hangarskib, <CSG-11> er en angrebsgruppe af hangarskibe, <USS Nimitz> er en af <CSG-11>'s komponenter (dets flagskib)
  • instance of anvendes ikke fordi <CSG-11> ikke er en klasse
  • subclass of anvendes ikke fordi ingen af dem er en klasse
<People's Republic of China> part of <Asia> både <Kina> og <Asien> er specifikke geografiske egenskaber, <Kina> er en del af kontinentet <Asien>
  • instance of anvendes ikke fordi <Asien> er et tilfælde (mens <land i Asien> er en klasse, så man kan sige, at <Kina> er et tilfælde af <land i Asien>)
  • subclass of anvendes ikke fordi ingen af dem er en klasse
<Sun> part of <Solar System> both of them are individual astronomical objects; the solar system is composed of the Sun, planets, and other objects in the Sun's vicinity
  • instance of not used because the latter is an individual astronomical object, not a generic concept
  • subclass of not used because neither of them is a class
klasse klasse * et tilfælde af klasse X er del af et tilfælde af klasse Y <flight deck> part of <aircraft carrier> hvert hangarskib (tilfælde af <hangarskib>) har dets eget flydæk (tilfælde af <flydæk>)
  • instance of anvendes ikke fordi <flydæk> er en klasse og ikke et tilfælde (kun et specifikt flydæk, som <flydækket på USS Nimitz>, er et tilfælde)
  • subclass of anvendes ikke fordi et tilfælde af den tidligere (f.eks. <flydækket på USS Nimitz>) ikke kan være det samme som et tilfælde af den sidste (f.eks. <USS Nimitz>)
<member state> part of <international organization> et tilfælde af <medlemstat> er en komponent af et tilfælde af <international organisation>
  • instance of anvendes ikke fordi den første er et koncept, og ikke indikerer nogen specifik stat (f.eks. <Kina>)
  • subclass of anvendes ikke fordi et tilfælde af <medlemstat> ikke tilhører klassen <international organisation> (f.eks. er Kina ikke nogen international organisation)
<star> part of <galaxy> a star typically is born and lives within a single galaxy which is made up of many stars and other astronomical objects
  • instance of not used because <star> is not an example of a <galaxy>
  • subclass of not used because instances of class <star> are not instances of the class <galaxy>
  • Bemærk: nogle eksempler anvendes kun som demonstration, og skal ikke anvendes på Wikidata fordi (1) enkelte tilsvarende emner ikke eksisterer her (f. eks. en enkelt, bestemt kvark), eller (2) der er flere specifikke egenskaber, der kan anvendes (anvend f. eks. "<Kina> kontinent <Asien>" i stedet for "<Kina> del af <Asien>")

has part(s) (P527) vs. has part(s) of the class (P2670)

Here is a table that explains the difference between has part(s) (P527) and has part(s) of the class (P2670).

has part(s) (P527) should be used for class-class and instance-instance relationships.

has part(s) of the class (P2670) should be used for instance-class relationships.

If you see a constraint violation on an item with has part(s) of the class (P2670)...

Forskelle på has part(s) (P527) og has part(s) of the class (P2670)
Property X Y hvad det betegner eksempel forklaring hvorfor ikke bruge ...
<X> has part(s) <Y> tilfælde tilfælde instance X has instance Y among its parts or components <United States Congress> has part(s) <United States Senate> the US Congress has two parts, the House of Representatives and the Senate
  • has part(s) of the class not used because <United States Congress> and <United States Senate> are concrete objects
<Solar System> has part(s) <Mars> <Mars> er en af planeterne i <Solsystemet>
  • has part(s) of the class not used because <Solar System> and <Mars> are concrete objects
klasse klasse an instance of X has an instance of Y among its parts or components <body> has part(s) <head> in general a <body> (anatomical feature) has a <head> as one of its parts
  • has part(s) of the class not used because <body> and <head> are both classes
<galaxy> has part(s) <star> en <galakse> har <stjerner> som et af sine betanddele
  • has part(s) of the class not used because <galaxy> and <star> are both classes
<X> has part(s) of the class <Y> tilfælde klasse the specific item X include some instance of class Y among its parts or components <University of Cambridge> has part(s) of the class <college of the University of Cambridge> the <University of Cambridge> has colleges as parts
  • has part(s) not used because <University of Cambridge> does not have the class <college of the University of Cambridge> as a part, but instead has colleges as parts
<Solar System> has part(s) of the class <inner planet of the Solar System> our <Solar System> has one or more <inner planets> in its parts
  • has part(s) not used because <Solar System> does not have the class of <inner planets> as a part, but instead has planets as parts
<Albert Einstein> has part(s) of the class <human brain> <Albert Einstein> had a <human brain> as a part
  • has part(s) not used because <human brain> is a class, not an instance, even if he had just one.

Queries

Wikidata Queries can be used to find members of a given class, for example all subclasses of "Literary Work"; a Wikidata Query Builder is available to help.

navbox

Se også


Referencer

  1. https://www.w3.org/TR/rdf-schema/#ch_type
  2. https://www.w3.org/TR/rdf-schema/#ch_subclassof
  3. https://www.w3.org/TR/rdf-schema/#ch_subclassof


Eksterne henvisninger