By using this property it automatically validates or exports schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly. It can have four values.
1. validate- existing schema
2. update- only update your schema once created
3. create- create schema every time
4. create-drop- the database schema will be dropped when the SessionFactory is closed explicitly.
You will get BatchUpdateException when you call the method executeBatch if
1). one of the SQL statements you added to the batch produces a result set (usually a query)
2). one of the SQL statements in the batch does not execute successfully for some other reason.
So in your case when you use create it creates new schema at each time, but when you use update somehow there may be one of the above reason.
5