Content deleted Content added
{{unreferenced|date=October 2009}} |
No edit summary |
||
(27 intermediate revisions by 23 users not shown) | |||
Line 1:
{{short description|Network representation of the relationships between objects in a program}}
{{mi|
{{Inappropriate tone|date=December 2007}}▼
{{Unreferenced|date=November 2014}}
In [[computer science]], in an [[Object-oriented programming|object-oriented program]], groups of [[Object (computer science)|objects]] form a network through their relationships with each other, either through a direct [[Reference (computer science)|reference]] to another object or through a chain of intermediate references. These groups of objects are referred to as '''object graphs''', after the mathematical objects called [[Graph (discrete mathematics)|graphs]] studied in [[graph theory]].
An '''Object Graph''' is a view of an object system at a particular point in time. Whereas a normal [[data model]] details the relationships between objects, the object graph relates the instances.▼
▲An
▲Object graph is a term often used with object-oriented applications. Object-oriented applications contain complex webs of interrelated objects. Objects are linked to each other by one object either owning or containing another object or holding a reference to another object. This web of objects is called an object graph.
==Physical representation==
An object graph is a [[directed graph]], which might be [[Cycle graph|cyclic]]. When stored in [[Random access memory|RAM]], objects occupy different segments of the memory with their attributes and function table, while relationships are represented by [[pointer (computer programming)|pointer]]s or a different type of global handler in higher-level languages.
==
For instance, a Car class can compose a Wheel one. In the object graph a Car instance will have up to four links to its wheels, which can be named frontLeft, frontRight, back Left and back Right.
An example of an [[adjacency list]] representation might be something as follows:
c:Car → {front Left:Wheel, front Right:Wheel, back Left:Wheel, back Right:Wheel}.
==See also==
* [[Data model]]
* [[Object diagram]]
{{DEFAULTSORT:Object Graph}}
[[Category:Data modeling diagrams]]
|