Attributes model the structure of the real world entity. Methods implement specific operations that an application can perform on the data. Every object type has a constructor method that makes a new object according to the data type's specification. When objects are similar to one another in behaviors and other attributes, the can be put together into a class. This concept of classes, parent classes, subclasses, and superclasses allow for a level of abstraction for grouping objects.
Classes are templates for objects.
This is where the data is bound to the object so that access to the data can only happen though the behaviors approved or accepted by that object. From a developer's perspective, objects are an encapsulation of data and behaviors. In the object-oriented model, the data behaviors are stored within the database, and they are not external from the database. Since the data behaviors are within the database, it does not jeopardize the independence of applications from the data. Another way of saying this is that a type can be an attribute of another type.