Welcome to DataBase Quiz, Intermediate Level !!

Question 1. What's the maximum value can an INT data type hold?

2,147,483,647

2,147,483,648

4,294,967,295

4,294,967,296

Question 2. What is used by a properly designed DBMS to enable databases to be returned to the pre-transaction state should errors occur?

two phase commit

prefetch transaction

one phase commit

backup and restore

Question 3. In the DBMS approach, application programs perform the

storage function

processing functions

access control

none of the above

Question 4. In JDBC, what represents a single instance of a particular database session?

a thread

an opened connection

a closed connection

a pipe

Question 5. Which of the following is NOT a valid description of the public role?

The public role captures all default permissions for users in a database.

The public role cannot be dropped.

The public role is contained in every database, including msdb, tempdb, model, and all user databases except in the master database for security purposes.

The public role cannot have users, groups, or roles assigned to it.

Question 6. What statement do you use to remove a schema and its related objects from your relational database?

DROP SCHEMA RESTRICT

DROP SCHEMA ALL

DROP SCHEMA CASCADE

DROP SCHEMA OPTS

Question 7. The language used by application programs to request data from the DBMS is referred to as the

DML

DDL

query language

none of the above

Question 8. What will be the output of the following statement? SELECT CAST(-1 AS SMALLDATETIME)

1900-01-01 00:00:00.000

1899-01-01 00:00:00.000

1752-01-01 00:00:00.000

The system will generate an error

Question 9. In your program you want to use the JDBC-ODBC Bridge driver. What code do you use?

Class.callName("sun.jdbc.odbc.JdbcOdbcDriver");

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Class.callfunc("JdbcOdbcDriver");

Class.Name.init("sun.jdbc.odbc.JdbcOdbcDriver");

Question 10. With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

SELECT * FROM Persons WHERE FirstName='%a%'

SELECT * FROM Persons WHERE FirstName LIKE '%a'

SELECT * FROM Persons WHERE FirstName='a'

SELECT * FROM Persons WHERE FirstName LIKE 'a%'