P.S: This is just a study guide. The questions may not appear exactly like this.
Week 3 : Creating the Physical Model – Quiz
Question 1. (TCO 3) The _____ column attribute is used to indicate that a value is required for this field. (Points : 3)
Question 2. (TCO 5) The _____ keyword is used in an ALTER statement to add a new column to an existing table. (Points : 3)
Question 3. (TCO 3) All of the following values can be stored in a column that’s defined as DECIMAL(6,2) except _____. (Points : 3)
Question 4. (TCO 3) The DATETIME data type in MySQL can store _____. (Points : 3)
dates and times
None of the above
Question 5. (TCO 3) What constraint can only be applied at table level or with an ALTER statement? (Points : 3)
Single field primary key
Composite primary key
Question 6. (TCO 3) When you build a script for creating tables in a database, _____. (Points : 3)
the order that you create the tables does not matter
you must create child tables before parent tables
you must create parent tables before child tables
the primary key column must be created first in each table
Question 7. (TCO 3) You are creating a table called Department, with fields for the primary key DeptID (Integer) and department name (VARCHAR). What (if anything) is wrong with the following code?
CREATE TABLE Department
deptID INTEGER Primary Key,
deptName VARCHAR(10) NOT NULL,
); (Points : 3)
You must use curly braces, not parentheses.
The comma after NOT NULL must be removed.
The keywords cannot be in upper case.
Nothing is wrong.
Question 8. (TCO 3) What data type is best to store the state abbreviations such as CA? (Points : 3)
Question 9. (TCO 5) Which statement will add a new column named ORDERDATE to the CUSTOMERS table? (Points : 3)
CREATE COLUMN orderdate, DATE ADD to customers;
ALTER TABLE customers ADD COLUMN orderdate DATE;
ALTER TABLE customers ADD orderdate DATE;
MODIFY TABLE customers ADD orderdate DATE;
Question 10. (TCO 8) When you write an INSERT statement with a column list, which columns can be omitted from the column list? (Points : 3)
NOT NULL only
AUTO_INCREMENT, DEFAULT, and fields that allow NULL