title: What's the point of designing an application in an OOP way if an ORM is not used?
body: <p>Suppose there are specific classes in an appplication say 'Student' 'Location' 'City' etc.</p>
  
  <pre><code>class Student {
  String name;
  int age;
  Location location;
  }
  
  class Location {
  City city;
  String country;
  }
  
  class City {
  String cityName;
  int cityCode;
  }
  </code></pre>
  
  <p>This is just an example to show classes(Objects) containing references to other classes.</p>
  
  <p>So now if an ORM(like hibernate) is used, this kind of data can be saved directly by:</p>
  
  <pre><code>save(student);
  </code></pre>
  
  <p>given that the object 'student' is defined properly(like it contains data).
  Now this is easy and convenient.</p>
  
  <p>But say we are not using ORM for some reasons, then </p>
  
  <p>1.We get data from the client</p>
  
  <p>2.Fill the objects with user's data(or something similar)(All of this happens in memory)</p>
  
  <p>3.Now we again break down the data to save it to database(using SQL queries)
  eg queries containing things like </p>
  
  <ol>
  <li>student.location.city.cityName</li>
  <li>student.location.city.cityCode etc</li>
  </ol>
  
  <p>Now isn't this like doing the Object Oriented thing just for the sake of doing it.like...</p>
  
  <p>1.Creating Objects in memory.</p>
  
  <p>2.Breaking down objects prior to saving in database.</p>
  
  <p>This thing has been confusing me for a long time. Any insights or help is greatly appreciated :)</p>