Welcome to DataBase Quiz, Intermediate Level !!

Question 1. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'

UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'

MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen

MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'

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

storage function

processing functions

access control

none of the above

Question 3. 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 4. What statement do you use to remove a schema and ensure that the removal takes place only if the schema is empty?

DROP SCHEMA RESTRICT

DROP SCHEMA OPTS

DROP SCHEMA CASCADE

DROP SCHEMA CLEAR

Question 5. 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 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. The management information system (MIS) structure with one main computer system is called a

hierarchical MIS structure

distributed MIS structure

centralized MIS structure

decentralized MIS structure

Question 9. 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%'

Question 10. What will be the output of the following statement? SELECT LEN(CAST(LEFT('026-100', 3) AS INT))

Statement will generate an error.

2

3

7