sâmbătă, 8 mai 2010

Test: Final Exam Semester 2 - Part I (1-10)

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Part I of the Semester 2 Final Exam covers Sections 8-9 of Database Programming with SQL.
Section 8
1. Which of the following SQL statements will create a table called Birthdays with three columns for storing employee number, name and date of birth? Mark for Review
(1) Points
CREATE table BIRTHDAYS (EMPNO, EMPNAME, BIRTHDATE);
CREATE table BIRTHDAYS (employee number, name, date of birth);
CREATE TABLE Birthdays (Empno NUMBER, Empname CHAR(20), Birthdate DATE); (*)
CREATE TABLE Birthdays (Empno NUMBER, Empname CHAR(20), Date of Birth DATE);
Correct Correct
2. Which statement about table and column names is true? Mark for Review
(1) Points
Table and column names must begin with a letter. (*)
Table and column names can begin with a letter or a number.
Table and column names cannot include special characters.
If any character other than letters or numbers is used in a table or column name, the name must be enclosed in double quotation marks.
Correct Correct
3. Evaluate this CREATE TABLE statement:

1. CREATE TABLE customer#1 (
2. cust_1 NUMBER(9),
3. sales$ NUMBER(9),
4. 2date DATE DEFAULT SYSDATE);

Which line of this statement will cause an error?

Mark for Review
(1) Points
1
2
3
4 (*)
Correct Correct
4. You are creating the EMPLOYEES table. This table should contain the COMMISSION_PCT column and use a value of 10 percent if no commission value is provided when a record is inserted. Which line should you include in the CREATE TABLE statement to accomplish this task? Mark for Review
(1) Points
commission_pct NUMBER(4,2) DEFAULT 0.10 (*)
commission_pct NUMBER(4,2) DEFAULT = 0.10
commission_pct NUMBER(4,2) DEFAULT (0.10)
commission_pct NUMBER(4,2) (DEFAULT, 0.10)
Correct Correct
5. Which CREATE TABLE statement will fail? Mark for Review
(1) Points
CREATE TABLE date_1 (date_1 DATE);
CREATE TABLE date (date_id NUMBER(9)); (*)
CREATE TABLE time (time_id NUMBER(9));
CREATE TABLE time_date (time NUMBER(9));
Correct Correct
6. Which column name is valid? Mark for Review
(1) Points
1NUMBER
NUMBER
NUMBER_1$ (*)
1_NUMBER#
Correct Correct
7. You are designing a table for the Human Resources department. This table must include a column that contains each employee's hire date. Which data type should you specify for this column? Mark for Review
(1) Points
CHAR
DATE (*)
TIMESTAMP
INTERVAL YEAR TO MONTH
Correct Correct
8. Which data types stores variable-length character data? Select two. Mark for Review
(1) Points
(Choose all correct answers)
CHAR
NCHAR
CLOB (*)
VARCHAR2 (*)
Correct Correct
9. You need to store the HIRE_DATE value with a time zone displacement value and allow data to be returned in the user's local session time zone. Which data type should you use? Mark for Review
(1) Points
DATETIME
TIMESTAMP
TIMESTAMP WITH TIME ZONE
TIMESTAMP WITH LOCAL TIME ZONE (*)
Correct Correct
10. The ELEMENTS column is defined as:
NUMBER(6,4)

How many digits to the right of the decimal point are allowed for the ELEMENTS column?

Mark for Review
(1) Points
Zero
Two
Four (*)
Six
Correct Correct

Niciun comentariu:

Trimiteți un comentariu