Hibernate ORM & Unix System Programming Quiz
Test your knowledge of Java Hibernate framework concepts and Unix/C system programming including caching, session management, process control, and system calls.
Questions
The following will compile with no errors float abc = 2;
- True
- False
1.) Difference between fork() & vfork()
- a) vforlk() allows more one child process to be created simaltaneously whereas for() allows only one
- b) vfork() retains same PID for child & parent known as virtual PID
- c) vfork() suspends the parent process until child process exits
- d) fork() & vfork() are same
1.) Difference between fork() & vfork()
- a) vforlk() allows more one child process to be created simaltaneously whereas for() allows only one
- b) vfork() retains same PID for child & parent known as virtual PID
- c) vfork() suspends the parent process until child process exits
- d) fork() & vfork() are same
2.) How can I get/set an environment variable from a program?
- a) getenv(), setenv()
- b) getenv(), putenv()
- c) readenv(), writeenv()
- d) You cannot environmement variables inside a program
3.) How can I sleep for less than a second?
- a) sleep(1/10)
- b) Not possible
- c) usleep()
- d) ssleep()
4.) How can a parent and child process communicate?
- a) Using open()
- b) Using popen()
- c) Using fork()
- d) Using exec()
- Does hibernate allow mixing table-per-class hierarchy and table-per-subclass strategies?
- a) Yes
- b) No
- c) can't say
- d) None of the above
Which statement is correct ?
- a) session.contains() method to determine if an instance belongs to the session cache.
- b) session.contains() method to determine if an instance belongs to the data base .
- c) Both are correct
- d) none of the above
5.) How do I get rid of zombie processes?
- a) Use popen() & pclose()
- b) Use wait()
- c) Use ps()
- d) None
What does session.createQuery("Query").scroll() return ?
- a) ListResultSet
- b) ResultSet
- c) ScrollableResultSet
- d) ScrollableResult
How can the mapping files be configured in Hibernate?
- a) Mapping files can be added to Configuration in the application code
- b) They can be configured in hibernate.cfg.xml using the <mapping> elements
- c) both a and b
- d) none of the above
SessionFactory represent which level of cache ?
- a) 2nd
- b) Ist
- c) 3rd
- d) 4th
SessionFactory represent which level of cache ?
- a) 2nd
- b) Ist
- c) 3rd
- d) 4th
hibernate.cache.use_query_cache setting true enable cache regions ?
- a) StandardQueryCache and UpdateTimestampsCache
- b) StandardQueryCache
- c) QueryCache
- d) QueryCache and TimestampsCache
hibernate.cache.use_query_cache setting true enable cache regions ?
- a) StandardQueryCache and UpdateTimestampsCache
- b) StandardQueryCache
- c) QueryCache
- d) QueryCache and TimestampsCache
batch fetching is useful incase of ?
- a) lazy="true"
- b) lazy="false"
- c) lazy="on"
- d) lazy="off"
batch fetching is useful incase of ?
- a) lazy="true"
- b) lazy="false"
- c) lazy="on"
- d) lazy="off"
what is the default value in hibernate ?
- a) lazy=false;
- b) lazy=true;
- c) lazy=yes;
- d) lazy=no;
HQL is used in ?
- a) session.createQuery();
- b) session.createCriteria();
- c) session.createSQLQuery();
- d) session.lod();
What does session.load() return if there is no matching database row ?
- a) NULL
- b) Empty Object
- c) unrecoverable exception
- d) None of the above