A semantic data model or an object-oriented data model portrays named objects and relationships between objects. Each object has a set of specific attributes characterized by data items of a specific type. The relationships between objects also have names and quantitative aspects, one to one, one to many, many to many, etc. Relationships may have data attributes as well. For example, if Book and Student are objects in a library data model, then Borrows represents a relationship between Book and Student and the data item, due-date, belongs to the Borrows relationship.
Most relationships tend to be binary, but they can be n-ary as well.
There are two other important ways in which objects may be related. There are a number of graphical techniques for representing both semantic data models and object-oriented models. They have the advantage of being easily understood and, yet, can model data complexity to arbitrary levels of detail. They are also independent of any specific computer language, enabling them to be implemented in many software environments. A data model, as depicted above, is a representation of some state of affairs that exists within the domain of the problem under consideration.