实化

在電腦科學中，實化（英語：reification）或物件化是把抽象的想法（idea）轉化為明確的資料模型或程式設計語言建立的其他物件的過程。通過實化，以前是隱式的、未表示的、可能是不可表示的被顯式形成可概念（邏輯或計算）操作的。非正式地，實化也常被稱作在特定系統範圍內把某些東西變為「頭等公民」。 實化是概念分析與知識表示中最常用的技術。

資料實化

資料實化涉及在形式規範中找到抽象資料類型的更為具體的表示。  例如，抽象資料類型集合（set）可以用map或者array來實化。

概念建模中的實化

概念建模中廣泛使用了實化。實化一個關係（relationship）意味著把它視作一個實體。實化一個關係的目的是令其顯式，必要時可以增加額外的資訊。例如，關係IsMemberOf(member:Person, Committee)表示某人是某委員會的成員。下圖左側用表的形式列出了人P1是委員會C1與C2的成員；人P2是委員會C1成員。
這一關係，也可看作實體。見圖示的右側。稱作該實體實化了這個關係。這個實體類型為Membership。現在，可以給這個關係實體增加新的資訊，如某人屬於某委員會是由誰來提名加入的，可表示為IsNominatedBy(Membership, Person)。
與其密切相關的用法見實化 (知識表示)。

實化在UML中

UML提供了關聯類（association class）用於構建被實化的關係類型。關聯類既是關聯又是類。 

已隱藏部分未翻譯部分，歡迎參與翻譯。

RDF and OWL

In Semantic Web languages, such as Resource Description Framework (RDF) and Web Ontology Language (OWL), a statement is a binary relation. It is used to link two individuals or an individual and a value. Applications sometimes need to describe other RDF statements, for instance, to record information like when statements were made, or who made them, which is sometimes called "provenance" information. As an example, we may want to represent properties of a relation, such as our certainty about it, severity or strength of a relation, relevance of a relation, and so on.
The example from the conceptual modeling section describes a particular person with URIref person:p1, who is a member of the committee:c1. The RDF triple from that description is
  person:p1   committee:isMemberOf   committee:c1 .
Consider to store two further facts: (i) to record who nominated this particular person to this committee (a statement about the membership itself), and (ii) to record who added the fact to the database (a statement about the statement).
The first case is a case of classical reification like above in UML: reify the membership and store its attributes and roles etc.:
 committee:Membership        rdf:type              owl:Class .
 committee:membership12345   rdf:type              committee:Membership .
 committee:membership12345   committee:ofPerson    person:p1 .
 committee:membership12345   committee:inCommittee committee:c1 .
 person:p2                   committee:nominated   committee:membership12345 .
Additionally, RDF provides a built-in vocabulary intended for describing RDF statements. A description of a statement using this vocabulary is called a reification of the statement. The RDF reification vocabulary consists of the type rdf:Statement, and the properties rdf:subject, rdf:predicate, and rdf:object.
Using the reification vocabulary, a reification of the statement about the person's membership would be given by assigning the statement a URIref such as committee:membership12345 so that describing statements can be written as follows:
 committee:membership12345Stat   rdf:type        rdf:Statement .
 committee:membership12345Stat   rdf:subject     person:p1 .
 committee:membership12345Stat   rdf:predicate   committee:isMemberOf . 
 committee:membership12345Stat   rdf:object      committee:c1 .
These statements say that the resource identified by the URIref committee:membership12345Stat is an RDF statement, that the subject of the statement refers to the resource identified by person:p1, the predicate of the statement refers to the resource identified by committee:isMemberOf, and the object of the statement refers to the resource committee:c1. Assuming that the original statement is actually identified by committee:membership12345, it should be clear by comparing the original statement with the reification that the reification actually does describe it. The conventional use of the RDF reification vocabulary always involves describing a statement using four statements in this pattern. Therefore, they are sometimes referred to as the "reification quad".
Using reification according to this convention, we could record the fact that person:p3 added the statement to the
database by
  person:p3    committee:addedToDatabase    committee:membership12345Stat .
It is important to note that in the conventional use of reification, the subject of the reification triples is assumed to identify a particular instance  of a triple in a particular RDF document, rather than some arbitrary triple having the same subject, predicate, and object. This particular convention is used because reification is intended for expressing properties such as dates of composition and source information, as in the examples given already, and these properties need to be applied to specific instances of triples. 
Note that the described triple (subject predicate object) itself is not implied by such a reification quad (and it is not necessary that it actually exists in the database). This allows also to use this mechanism to express which triples do not hold.
The power of the reification vocabulary in RDF is restricted by the lack of a built-in means for assigning URIrefs to statements, so in order to express "provenance" information of this kind in RDF, one has to use some mechanism (outside of RDF) to assign URIs to individual RDF statements, then make further statements about those individual statements, using their URIs to identify them.

Reification in Topic Maps

In an XML Topic Map (XTM), only a topic can have a name or play a role in an association. One may use an association to make an assertion about a topic, but one cannot directly make assertions about that assertion. However, it is possible to create a topic that reifies a non-topic construct in a map, thus enabling the association to be named and treated as a topic itself.

Reification and n-ary relations

In Semantic Web languages, such as RDF and OWL, a property is a binary relation used to link two individuals or an individual and a value. However, in some cases, the natural and convenient way to represent certain concepts is to use relations to link an individual to more than just one individual or value. These relations are called n-ary relations. Examples are representing relations among multiple individuals, such as a committee, a person who is a committee member and another person who has nominated the first person to become the committee member, or a buyer, a seller, and an object that was bought when describing a purchase of a book.
A more general approach to reification is to create an explicit new class and n new properties to represent an n-ary relation, making an instance of the relation linking the n individuals an instance of this class. This approach can also be used to represent provenance information and other properties for an individual relation instance.
:p1
     a       :Person ;
     :has_membership _:membership_12345 .
_:membership_12345
     a       :Membership ;
     :committee :c1;
     :nominated_by :p2 .

Reification vs. quotation

It is also important to note that the reification described here is not the same as "quotation" found in other languages. Instead, the reification describes the relationship between a particular instance of a triple and the resources the triple refers to. The reification can be read intuitively as saying "this RDF triple talks about these things", rather than (as in quotation) "this RDF triple has this form." For instance, in the reification example used in this section, the triple:
  committee:membership12345   rdf:subject   person:p1 .
describing the rdf:subject of the original statement says that the subject of the statement is the resource (the person) identified by the URIref person:p1. It does not state that the subject of the statement is the URIref itself (i.e., a string beginning with certain characters), as quotation would.