JavaBeat Feeds
|
|
|
|
|
|
|
|
|
|
SCBCD Mock Questions - 2
1)Which expression tests whether or not a collection designated by the collection-valued path expression is empty (i.e, has no elements)?
1)IS NULL
2)IS EMPTY
3)ISEMPTY
4)IS NOTHING
2)Which of the following clauses can be part of an EJB QL query? [Select all correct answers]
1)SELECT
2)RETRIEVE
3)FROM
4)WHERE
5)WHEN
3)Which one of the following statements regarding EJB QL is correct?
1)It is valid in a EJB QL query to use an asterisk in the SELECT clause as shorthand for retrieving an object.
2)EJB QL queries can take in parameters to allow dynamic specification of criteria values.
3)Only the SELECT clause of an EJB QL query is required, you can optionally use a FROM and WHERE clause.
4)EJB QL queries have the FROM clause to specify the criteria the results must match to be returned.
4)You want to use an EJB QL query to search for all the accounts for a specific department. The query needs to take the department name as a parameter (which will be available as a finder method with one parameter). Which one is the correct EJB QL query?
1)SELECT OBJECT(a) FROM Accounts a WHERE a.department = ?0
2)SELECT OBJECT(o) FROM Accounts a WHERE a.department = ?1
3)SELECT OBJECT(a) FROM Accounts a WHERE a.department = ?1
4)SELECT OBJECT(b) FROM Accounts a WHERE a.department = ?1
5)Which EJB QL query will return all the accounts for the sales department?
1)SELECT OBJECT(a) FROM Accounts a WHERE o.department = 'sales'
2)SELECT OBJECT(o) FROM Accounts a WHERE a.department = 'sales'
3)SELECT OBJECT(a) FROM Accounts a WHERE a.department = 'sales'
4)SELECT OBJECT(a) FROM Accounts a WHERE a.department <> 'sales'
6)Which of the following are restrictions regarding the use of EJB QL? [Select all correct answers]
1)EJB QL does not support the use of comments.
2)EJB QL does not support a mechanism to return only unique results from a query.
3)The data model for container-managed persistence supports inheritance as long as it is not multiple inheritance.
4)The data model for container-managed persistence does not currently support inheritance.
7)Which line of EJB QL will return back all accounts?
1)SELECT OBJECT(a) FROM Accounts a
2)SELECT * FROM Accounts
3)SELECT * FROM OBJECT
4)SELECT EJB(a) FROM Accounts a
8)Which of the following are reserved identifiers in EJB QL? [Select all correct answers]
1)FALSE
2)MEMBER
3)BUT
4)IF
9)Which of the following statements are correct? [Select all correct answers]
1)EJB QL uses a SQL-like syntax to select objects or values based on the abstract schema types and relationships of entity beans.
2)EJB QL has exactly the same keywords and statements as ANSI SQL. However it does not support INSERT statements.
3)The path expressions of EJB QL allow the Bean Provider to navigate over relationships defined by the cmr-fields of the abstract schema types of entity beans.
4)EJB QL provides a facility to create triggers on the underlying database which can provide extended functionality such as auditing and extra security.
10)Which of the following statements are true regarding the BETWEEN expression? [Select all correct answers]
1)o.height BETWEEN 100 and 180 is equivalent to o.height > 100 AND o.height <180
2)o.height BETWEEN 100 and 180 is equivalent to o.height>= 100 AND o.height<= 180
3)o.height NOT BETWEEN 100 and 180 is equivalent to o.height<= 100 OR o.height>= 180
4)o.height NOT BETWEEN 100 and 180 is equivalent to o.height < 100 OR o.height > 180
|