Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


What is database persistence?


What is database persistence?What is database persistence?

 

There are mainly three states in hibernate

a) Transient state

b) Persistant state

c) Detatched state

 

Take the employee object place the data in that object like usename, password, empid. Now the state of the object is transient state, when we write the statement given below

session.save(employeeObject);

Now the state of the object is persistent since the employee object is kept in session object then when we write the statement given below

transaction.commit();

When we apply the above statement then the employee object is going to linked with database and the data is stored in related table of that database. Since the emp object in persistent state only the data is stored in database other wise the data is not stored in database.

After the commit operation it becomes into detached state. If anybody wants to store the emp object into database then in detached state it is not possible.


 

There are mainly three states in hibernate a) Transient state b) Persistant state c) Detatched state Take the employee object place the data in that object like usename, password, empid. Now th...


 

Preserving the data inside a database is database persistence. Persistence is once of the fundamental concepts of application developement. There are many alternatives to implement persistence. Object...

 


asked Jul 1, 2015 in hibernate by rajesh
0 votes
57 views



Related Hot Questions



Government Jobs Opening


...