Question:* JDBC stands for_____.
Answer: • Java DataBase Connection
Question:* Which of the following is NOT true about Metamodel?
Answer: • All
Question:* Which of the following correctly describes Hibernate Envers?
Answer: • All
Question:* The configuration object class is used to create a(n) ____?
Answer: • SessionFactory
Question:* Which of the following statements are true about Hibernate catching:
Answer: • All of these
Question:* Which is true:
Answer: • import org.hibernate.Session;
Question:* If Hibernate does not commit the transaction it can _______.
Answer: • rollback
Question:* Java is a/an _____ language
Answer: • Object-Oriented
Question:* Which of the following shortcomings are addressed by Hibernate Search?
Answer: • All
Question:* A database _____ data.
Answer: • stores
Question:* What instructs Hibernate how to map the classes to the database?
Answer: • XML mapping file
Question:* The createhibernate.cfg.xml is a/an ____ configuration file.
Answer: • XML
Question:* Java is to the business logic as ____ is to the database
Answer: • SQL
Question:* Hibernate is a high performance ORM. ORM stands for?
Answer: • object relational mapping
Question:* Which of the following XML elements is true for Hibernate?
Answer: • <hibernate-mapping>
Question:* SessionFactory is _____.
Answer: • thread safe
Question:* Which of the following is TRUE about Hibernate Search?
Answer: • All
Question:* Which is true:
Answer: • Session.Close();
Question:* An ORM solution should consist of which of the following functions:
Answer: • All of these
Question:* A persistent framework is a(n) ____ service that stores and gets objects into a database.
Answer: • ORM
Question:* Which of the following is correct?
Answer: • catch (HibernateException e)
Question:* Hibernate takes care of mapping Java to the database using ___?
Answer: • XML
Question:* The reason for Hibernate is because their is a mismatch or impedance between the object model and the ____?
Answer: • relational database
Question:* POJO stands for_____.
Answer: • Plain Old Java Object
Question:* Query objects use ____ to retrieve data from the relational database
Answer: • HQL
Question:* A _______ represents a measure of work done in the database.
Answer: • transaction
Question:* The Hibernate framework is stored in (a) _____.
Answer: • JAR
Question:* Databases represent data in a ____ format.
Answer: • tabular
Question:* Which of the followings might be able to solve N+1 problem?
Answer: • All of these
Question:* A/an ______ is a primitive data type.
Answer: • Integer
Question:* Which of the following is correct?
Answer: • import org.hibernate.SessionFactory;
Question:* Which of the following is TRUE about @GeneratedValue annotation?
Answer: • It is used to specify the primary key generation strategy
Question:* Which of the following property needs to be defined to activate second-level caching?
Answer: • cache.provider_class
Question:* Hibernate will assume an instance is an unsaved transient instance if:
Answer: • All of these
Question:* The ____ element is used to link data to the database.
Answer: • <property>
Question:* Which of the following is a VALID key component of Hibernate Configuration?
Answer: • Both database connection and class mapping setup
Question:* Which of the following property makes hibernate to generate SQL as per the chosen database?
Answer: • dialect
Question:* Which of the following are valid Hibernate interceptors?
Answer: • Both Session-scoped and SessionFactory-scoped
Question:* Which one of the following statement is NOT true about SessionFactory?
Answer: • One SessionFactory can manage more than one database
Question:* Which one of the following statements is true about detached instance?
Answer: • A persistent instance will become detached after the session is closed.
Question:* Which one of the following statements is true about the instance states?
Answer: • Detached instants can be made persistent by calling saveOrUpdate()
Question:* Which of the following correctly describes SessionFactory?
Answer: • A thread-safe, immutable cache of compiled mappings for a single database
Question:* Which of the following elements is used to declare the persistent class in Hibernate configuration file?
Answer: • <mapping>
Question:* Which of the following provides an interface between application and data stored in the database?
Answer: • Session
Question:* Which one of the following statements is NOT true about ordering query result?
Answer: • You cannot order query results by more than one properties
Question:* Which of the following is NOT a valid value for 'hbm2ddl.auto' property in hibernate configuration?
Answer: • truncate
Question:* Hibernate offers an implementation of which specification?
Answer: • JPA
Question:* Which one of the following statements is NOT true about named queries?
Answer: • The named query must be HQL strings. Native SQL is not supported in named query
Question:* Which one of the following statement is NOT true about Hibernate's Query interface?
Answer: • If the query returns more than result for the uniqueResult() method, the first one will be returned.
Question:* Which of the following is NOT true about default flush operation in Hibernate?
Answer: • Hibernate NEVER flushes by default
Question:* Which one of the following statements is NOT true about persistence annotations?
Answer: • The @Column annotations is used to specify the column name of the foreign key
Question:* Which of the following is NOT a type of hibernate cache?
Answer: • SQL cache
Question:* Which one of the following statements is NOT true about comparison operator in HQL?
Answer: • You can use = NULL to test whether the value is null
Question:* Which of the following statement is TRUE about sorting in Hibernate?
Answer: • A sorted collection is sorted in-memory using java comparator, while order collection is ordered at the database level using order by clause
Question:* Which of the following is the FIRST Hibernate object that is created in any Hibernate application?
Answer: • Configuration
Question:* Which of the following is NOT true about Session and Transaction scope in Hibernate?
Answer: • Multiple instances of SessionFactory are created, usually on application startup, from a Configuration instance
Question:* Which of the following is used by Hibernate to redirect the logging output to preferred logging frameworks?
Answer: • Simple Logging Facade for Java (SLF4J)
Question:* Which one of the following statements is true about how Hibernate retrieves an object?
Answer: • HQL Hibernate Query Language is a full object oriented query language
Question:* Which one of the following statements is NOT true about using annotation mapping Entity hierarchies?
Answer: • The @DiscriminatorValue doesn't have default value and must be defined.
Question:* Which of the following statements is NOT true about mapping one class to multiple tables using annotation?
Answer: • The @PrimaryKeyJoinColumn annotation specifies the primary key of the primary table
Question:* Which of the following statement is NOT true?
Answer: • The load() method returns null, when the unique id could not found in the database
Question:* Object-oriented languages represent data as a ____ of objects
Answer: • graph
Question:* Which one of the following statements is NOT true about transient state?
Answer: • Transient instance is always associated with a row in a database
Question:* Which of the following is NOT true about First Level Cache?
Answer: • It loads objects and make them available to the entire application
Question:* Which of the following is not TRUE about StatelessSession interface/implementation in Hibernate Batch?
Answer: • Operations performed using a stateless session cascade to associated instances
Question:* Which of the following is NOT true about Second Level Cache?
Answer: • By default it effectively holds on to the identifiers for an individual query
Question:* Which one of the following statements is true about joining associations in Hibernate?
Answer: • In HQL the LEFT keyword in LEFT JOIN FETCH is optional
Question:* Which of the following is an INVALID LockMode?
Answer: • UPDATE
Question:* Which one of the following statements is NOT true about join strategy (table per subclass)?
Answer: • Join strategy is the most efficient way to insert data
Question:* Their are five mismatches that occur when storing objects in relational database:granularity,inheritance,identity,associations and
Answer: • navigation
Question:* Which one of the following statements is NOT true about entity lifecycle events
Answer: • When the SQL for deletion of an entity gets sent to the database, the PostRemove event will get fired and it indicates success of deletion
Question:* Which of the following correctly describes org.hibernate.cache log category?
Answer: • Log all second-level cache activity
Question:* Which one of the following statements is true?
Answer: • The load() method can return a poxy than immediately hitting the database.
Question:* Which one of the following statements is true about the following HQL query: select department from Department department join department.employees employee where employee.address.state = 'CA' and department.name='marketing'
Answer: • The department objects returned are lazy loaded.
Question:* Which one of the following statements is NOT true about many to many relationship mapping?
Answer: • The @JoinTable annotation must be defined on the reverse side of the many to many relation ship
Question:* Which one of the following statement is true about the following query: FROM Item AS item WHERE item.description like ? AND item.date > ?
Answer: • The as keyword is optional
Question:* Which of the following correctly describes org.hibernate.SQL log category?
Answer: • Log all SQL DML statements as they are executed
Question:* Which one of the following statements is True about the following query: from Item as I where i.description = :description
Answer: • the Item indicates the name of the entity class and it's case sensitive
Question:* Which of the following is NOT a valid org.hibernate.ConnectionReleaseMode?
Answer: • ON_OPEN
Question:* Which of the following is not a Session method?
Answer: • Session.remove()
Question:* Which one of the following statements is NOT true about HQL joins?
Answer: • Path navigation from one entity is a form of outer join.
Question:* Which of the following is NOT true about Hibernate OGM (still being developed)?
Answer: • It is expected to be used to interact with all NoSQL solution in all use cases
Question:* Which of the following statements is true about using cache in Hibernate?
Answer: • The iterate()method of the Session and Query interfaces is provided to take advantage of second-level cache.
Question:* Which one of the following statements is NOT true about using components in Hibernate?
Answer: • Hibernate component is the lowest level of unit and cannot own other component
Question:* Which one of the following statements is true about entity type and value type in Hibernate?
Answer: • Value type objects belongs to an entity and is embedded in the table row of owning entity
Question:* Which one of the following statements is NOT true about the following HQL query: from Item item join item.bids bid where item.description like '%gc%' and bid.amount > 100
Answer: • The bids collection of each Item will be eagerly loaded.
Question:* Which one of the following statements is NOT true about Hibernate's cascading persistence?
Answer: • cascade="save-update" is the default setup in hibernate
Question:* Which of the following is NOT true about Hibernate Template?
Answer: • Since it decouples the application from the spring framework, it is recommended that HibernateTemplate is always used for integration
Question:* Which one of the following statements is true about using annotation to setup Inheritance Models?
Answer: • the @DiscriminatorValue annotation is used to specify the value in the in the discriminator column in database
Question:* Which of the following is NOT a valid caching strategy?
Answer: • Write-only
Question:* Which one of the following statements is NOT true about entity lifecycle events?
Answer: • If the timestamp of the most recent update made to the queried table is early than the timestamp of the cached query results, then the cached results are discarded
Question:* Which one of the following statements is NOT true about embedded objects?
Answer: • The @AttributeOverride annotation defines what type the database uses to save the embeddable field
Question:* Which of the following does NOT correctly describe LockMode.NONE?
Answer: • If an object is requested with this lock mode, a WRITE lock will be obtained if it is necessary to actually read the state from the database
Question:* Which one of the following statements is NOT true about hibernate Session?
Answer: • Hibernate can detect changes to the objects and make updates to the database automatically even if changes are made within the same session.
Question:* Which one of the following statements is NOT true about using annotation to map Compound Primary Key?
Answer: • The primary key class must be private, but it's optional to implement Serializable
Question:* Which of the following is not a VALID hibernate interceptor event?
Answer: • SelectEvent
Question:* Which of the following is NOT a valid id generator class?
Answer: • primary
Question:* Which one of the following statement is NOT true about many to one relationship mapping?
Answer: • The @JoinColumn must be defined with @OneToMany annotation
Question:* Which of the following statements is True about one to one relationship mapping?
Answer: • The @JoinColumn annotation goes on the mapping of the entity that is mapped to the table containing the foreign key
Question:* Which one of the following statement is NOT true about single table inheritance strategy?
Answer: • There shouldn't be any columns left unfilled in the single table strategy
Question:* If you want to save your modifications at any time without knowing about the state of an session, then which of the following operations will you use:
Answer: • Merge
Question:* Which of the following is NOT true about SessionFactory?
Answer: • It helps in customized extraction of data.
Question:* Which of the following is NOT a valid CascadeType value?
Answer: • DELETE
Question:* Which of the following is NOT a valid layer in hibernate framework?
Answer: • transaction layer
Question:* Which of the following is NOT true about sharding in Hibernate (Hibernate Shards)?
Answer: • Hibernate Shards can be conceptually divided into Generalized sharding logic, Application specific sharding logic and Hibernate Default sharding
Question:* Which one of the following statements is true about the following HQL query: select p.number from employee e join e.phones p
Answer: • Because the "phones" is a collection association field, the path navigation couldn't continue
Question:* Which of the following is NOT a valid hibernate performance tuning strategy?
Answer: • Avoid clearing the whole Session after flushing
Question:* Which of the following statements is NOT true about persistent instance?
Answer: • An object is not persistent if it's retrieved from the database by the execution of query.
No comments:
Post a Comment