Database-MySQL [3i Infotech Placement]: Sample Questions 61 - 61 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 61


Describe in Detail


What is Object Oriented model?


The Object-Oriented Model

  • An object contains values stored in instance variables within the object.
  • Unlike the record-oriented models, these values are themselves objects.
  • Thus objects contain objects to an arbitrarily deep level of nesting.
  • An object also contains bodies of code that operate on the the object.
  • These bodies of code are called methods.
  • Objects that contain the same types of values and the same methods are grouped into classes.
  • A class may be viewed as a type definition for objects.
  • Analogy: the programming language concept of an abstract data type.
  • The only way in which one object can access the data of another object is by invoking the method of that other object.
  • This is called sending a message to the object.
  • Internal parts of the object, the instance variables and method code, are not visible externally.
  • Result is two levels of data abstraction.

    For example, consider an object representing a bank account.

  • The object contains instance variables number and balance.
  • The object contains a method pay-interest which adds interest to the balance.
  • Under most data models, changing the interest rate entails changing code in application programs.
  • In the object-oriented model, this only entails a change within the pay-interest method.

Developed by: