if we want to access and manipulate objects without considering much about its data resources, we use ORM. ORM allows programmers to maintain a consistent view of objects over time.
Mapping details between a set of objects is managed by ORM.
ORM converts data between relational databases and Object oriented Languages.
Consider the following Java Class example:
public class Employee {
private int id;
private String fn;
private String ln;
private int salary;
public Employee() {}
public Employee(String fname, String lname, int salary) {
this.fn = fname;
this.ln = lname;
this.salary = salary;
}
public int getId() {
return id;
}
public String getFirstName() {
return fn;
}
public String getLastName() {
return ln;
}
public int getSalary() {
return salary;
}
}
0 Comment(s)