A. A database is a structure that contains different categories of information and the relationships between these categories.
Which of the following is a valid KIMTAY database?
A. An ITEM is sold to only one customer in an invoice.
Which table in the KIMTAY database is ITEM ID found?
B. ITEM and INVOICE_LINE tables
What information is contained in the CUSTOMER table in the KIMTAY database?
D. Customer name, contact information, and customer representative
Which of the following is a table in the STAYWELL database?
B. OWNER
Which of the following is not a table in the STAYWELL database?
A. ADDRESS
Which of the following is a unique identifier?
B. OWNER_ID
Which of the following is not table in the KIMTAY database?
A. REPRESENTATIVE
Which of the following statements is true?
C. A relational database is a collection of entities
Which of the following statements about functional dependencies is true?
C. Column B is functionally dependent on another column when a value for A determines a single value for B at any one time.
A primary key is _______.
B. a unique identifier of a table
When is a table is in first normal form (1NF)?
A. When a table does not contain repeating group
Which of the following is not an entity?
D. An idea
When is a relation in second normal form (2NF)?
D. It is in first normal form and nonkey column is dependent on only a portion of the primary key.
Which of the following is not a step of database design?
F. None of the above
Data anomalies are classified into which of the following four categories?
A. Updates, additions, deletions, and inconsistent data
What is an attribute?
B. An attribute is a property of an entity
What is a relationship?
C. A relationship is an association between two entities
Which of the following removes a table from a database?
C. DROP
Which of the following commands list existing databases in Oracle?
E. None of the above
Which command is used to list all columns in MS SQL Server?
F. None of the above
Which of the following does NOT NULL indicate?
B. Column must not be void
Which command is used to work within a specific database in Oracle?
B. USE DATABASE
Which of the following SQL statements is valid?
D. SELECT * FROM sales_rep;
Which of the following is not valid SQL command?
B. SHOW
Which of the following SQL statements is valid?
B. INSERT INTO SALES_REP VALUES('25, 'Donna', 'Sanchez');
Which of the following SQL statements is valid for MySQl, Oracle, and MS SQL Server?
D. CREATE TABLE sales_rep (id CHAR(2), name CHAR(30));
Which of the following commands list columns of a table in MS SQL?
D. EXEC SP_COLUMNS
Which of the following comparison operators is NOT EQUAL?
D. <>
Which of the following is not a valid compound operator?
D. BETWEEN
Which of the following statements will display rows for a commission greater than 100 and less than 2000?
D. SELECT col1, col2, coln FROM table_name WHERE commission > 100 AND commission < 2000;
Which of the following is a valid statement?
A. WHERE clause to limit the rows and HAVING clause to limit the groups
B.WHERE clause to limit the groups and HAVING clause to the limit the columns C. WHERE clause to limit the rows and HAVING clause to limit the columns
D. WHERE clause to limit the groups and HAVING clause to limit the groups
A. WHERE clause to limit the rows and HAVING clause to limit the groups
Which of the following is not an aggregate function?
D. MED
Which of the following is a valid SQL statement?
C. SELECT col1, col2 FROM table_name WHERE col1 = value ORDER BY col1;
Which of the following SQL statements will display REP_ID column values in a sorted manner?
D. SELECT rep_id FROM SALES_REP ORDER BY rep_id DESC;
Which of the following statements will list a specific record in a table?
B. SELECT col1, col2 FROM table_name WHERE col1 = value;
Which query will return rows for a column that has no value?
D. SELECT col1, col2 FROM table_name WHERE col1 IS NULL;
Which of the following is true of a subquery?
E. All of the above
What are the steps to join two tables?
B. List columns to be displayed, list of tables containing displayed columns, restrict rows from the two tables that have common values in matching columns.
What is an EXISTS operator?
B. An operator that checks the existence of rows that satisfies some criterion
Which of the following would you use to produce a combination of all rows from two tables?
B. PRODUCT
What is an alias?
C. an alternate name for a table in the FROM clause
Which of the following statements is true?
B. Right outer join, all rows from the table on the right are included regardless of whether they match rows from the table on the left.
Which two conditions must be met in order to use UNION operators?
C. The two tables must have the column datatypes and same number of columns.
Which of the following statements is valid?
A. ALL operator: the condition is true only if it satisfies all values: ANY operator: the condition is true if it satisfies any value.
Which of the following is not a SET operator in MySQL Server?
B. INTERSECT
Which of the following is not true about joining a table to itself?
A. Known as SELF-JOIN
Which of the following is not a valid JOIN command?
C. FULL INNER JOIN
Which of the following is not a valid INSERT statement?
D. INSERT INTO table_name1 VALUES (SELECT col1, col2 FROM table_name1);
How do you reverse a transaction?
B. Use ROLLBACK
Which of the following is not a valid command related to transactions?
C. SAVE
How do you add a column to an existing table in MySQL?
D. ALTER TABLE table_name ADD new_column CHAR(3);
How do you change a column to an existing table in MS SQL Server?
A. ALTER TABLE table_name ALTER COLUMN column_name CHAR(3);
Which of the following SQL statements is valid?
C. INSERT INTO table_name1 SELECT col1, col2 FROM table_name2;
Which of the following statements is valid?
D. ALTER TABLE table_name MODIFY col1 CHAR(10);
Which of the following statements defines a TRANSACTION?
B. A transaction is a sequence of steps that accomplish a single task.
Which clause is used to change a column in a table?
A. MODIFY
Which of the following SQL vendors does not include AUTOCOMMIT?
C. MS SQL Server
Which of the following statements is not true about a view?
C. A view provides a great simplification of table administration.
Which of the following vendors will display an error when using an ORDER BY clause in a CREATE VIEW statement?
C. Oracle and MS SQL Server
Which of the following is not true about updatable views?
D. A view is updatable regardless of the underlying query.
Which of the following SQL commands removes a view from the database?
C. DROP VIEW
Which of the following SQL statements is false?
B. GRANT VIEW ON SALES_REP TO JOHNSON;
Which of the following statements is true?
E. All of the above
Information kept about tables is usually known as _________.
B. data dictionary
Which of the following SQL statements is valid?
D. ALTER TABLE INVOICES ADD FOREIGN KEY (CUST_ID) REFERENCES CUSTOMER (CUST_ID);
Which of the following SQL clauses is used to enforce data integrity?
B. CHECK
Which of the following SQL statements is correct?
B. CREATE UNIQUE INDEX SSN ON SALES_REP (SOC_SEC_NUM);
Which SQL vendor supports an UPPER function to display values in uppercase?
D. All of the above
Which of the following functions do you use to get a current data and time in Oracle?
B. SYSDATE
Which SQL vendor has a CONCAT function that takes only two strings as arguments?
B. Oracle
Which of the following statements best defines stored procedure?
C. Stored procedure is an SQL script stored in the database and can be executed automatically.
What construct is used to handle conditions that can arise when accessing the database in MySQL?
A. EXIT HANDLER
What is a cursor?
C. A cursor is a pointer to a row in the collection of rows retrieved by an SQL command.
What are the steps to use a cursor in a procedure?
B. DECLARE, OPEN, FETCH, CLOSE
How do you run a stored procedure in MS SQL Server?
B. EXEC procedure_name
Which of the following statements in true?
C. A trigger is a procedure that is executed automatically in response to an INSERT, UPDATE, or DELETE command.
Which of the following commands is required in MySQL to create a stored procedure?