Exam 1: Efficiency Improvements for Creating Reports and Removing Rows in MySQL
Exam 1: Efficiency Improvements for Creating Reports and Removing Rows in MySQL8 Questions
Select questions type
In the following shorthand representation of a database, the underlined items are _____.
INVOICES (INVOICE_NUM, INVOICE_DATE, CUST_ID)
INVOICE_LINE (INVOICE_NUM, ITEM_ID, QUANTITY, QUOTED_PRICE)
ITEM (ITEM_ID, DESCRIPTION, ON_HAND, CATEGORY, LOCATION, PRICE)
Free
(Multiple Choice)
4.9/5
(31)
Correct Answer:
D
Write a MySQL command to create a table called CANDY that contains the following columns:
.Candy ID, five characters; will function as primary key
.Candy name, 25 characters
.Description, 50 characters
.Quantity per unit, whole number
Free
(Essay)
4.8/5
(33)
Correct Answer:
CREATE TABLE CANDY
(
CANDY_ID CHAR (5) PRIMARY KEY,
CANDY_NAME CHAR (25),
DESCRIPTION CHAR (50),
QTY_PER_UNIT INT
);
A condition is true only if it satisfies all values produced by a subquery when that subquery is preceded by which operator?
Free
(Multiple Choice)
4.8/5
(35)
Correct Answer:
B
Henry uses a large database to generate reports and would like to make report delivery more efficient (faster). The reports derive from the following tables.
?
CANDY table, with these columns: PROD_ID, NAME, UNITS_SOLD_LAST_30DAYS
EMPLOYEE table, with these columns: EMP_ID, FIRST_NAME, LAST_NAME, OFFICE_PHONE
?
Write SQL commands to improve the efficiency of creating these two reports:
.Employee records alphabetized by last name, then first name
.Names of candy products listed by units sold in the last 30 days, in descending order
(Essay)
4.9/5
(37)
Which of the following tables is in third normal form, given that DOC_ID determines DOC_FIRST_NAME and DOC_LAST_NAME?
(Multiple Choice)
4.8/5
(39)
Imagine you have created a table called BOXES in MySQL to store data about various sizes of cardboard boxes that your organization sells. Its columns include PRODUCT_ID, NAME, DESCRIPTION, HEIGHT_IN, WIDTH_IN, and DEPTH_IN. Write a SQL command to remove any rows describing boxes with a height of 24 inches from the table.
(Essay)
4.9/5
(39)
Which of the following SQL commands changes the value in the column LAST_NAME within the row containing a REP_ID of 007?
(Multiple Choice)
4.8/5
(41)
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)