Database Management System 1 Midterm
Database Management System 1 Midterm
Question 1
Complete
This is use to Selects the columns in a table that are returned by a query. Selects a few or as many of the columns as required.
Select one:
a. Selection
b. Inclusion
c. Joins
d. Projection
Question 2
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DISTINCT WAREHOUSE, CLASS FROM PARTS;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 1/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 3
Complete
Answer: True
Question 4
Complete
Select one:
a. IN
b. Between
c. Comparison
d. Like
Question 5
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT (PARTNUM|| ‘belong to’||DESCRIPTION) FROM PARTS WHERE CLASS = SG;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 2/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 6
Complete
Supposed that the user uses the ff SELECT statement: what will be the possible output.
SELECT GRADE AS STUDENT MARK FROM GRADE_REPORT;
Select one:
a. Error because of missing “” mark.
b. Will display all rows and columns.
c. Will display the column GRADE rename as STUDENT MARK
d. Error because of the keyword AS.
Question 7
Complete
Select one:
a. Numerical Values
b. Arithmetic expression
c. MDAS operator
d. Logical Condition
Question 8
Complete
Select one:
a. Insert
b. Where
c. Select
d. Delete
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 3/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 9
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column DESCRIPTION, ONHAND and WAREHOUSE of all PARTS where ONHAND
is greater than or equal to 21.
Question 10
Complete
Select one:
a. SQL statements are not case sensitive.
b. Clauses are usually placed on separate lines for readability and ease of editing.
c. Keywords cannot be split across lines or abbreviated.
d. Indents should be used to make code more readable.
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 4/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 11
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘%ER’;
FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND BETWEEN 8 AND 12;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 5/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 12
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE CLASS IN (‘HW’,’AP’);
FROM PARTS
WHERE CLASS = ‘AP’ OR CLASS = ‘HW’;
Question 13
Complete
Select one:
a. Between
b. IN
c. Like
d. Comparison
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 6/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 14
Complete
This character is used to override the default precedence or to clarify the statement.
Select one:
a.
b. AS
c. *
d. ||
Question 15
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing the DESCRIPTION and Price (Note that in column PRICE add ADDITIONAL 10000). Get only
the prices with no digit that is equal to ‘5’. Note that you have to concatenate the said column and rename the merge column as “New Price
Lists”. Sort the data in DESC order by Price.
SELECT DESCRIPTION, PRICE + 10000 AS “NEW PRICE LISTS” FROM PARTS ORDER BY PRICE DESC;
SELECT DESCRIPTION, PRICE + 10000 AS NEW PRICE LISTS FROM PARTS ORDER BY PRICE DESC;
SELECT DESCRIPTION, PRICE + 10000 AS “NEW PRICE LISTS” FROM PARTS ORDER BY PRICE;
SELECT DESCRIPTION, PRICE + 10000 + PRICE AS “NEW PRICE LISTS” FROM PARTS ORDER BY PRICE DESC;
Question 16
Complete
True/False. Character strings and date values are enclosed with double quotation marks.
Answer: False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 7/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 17
Complete
Given the output below. Which of the following is the correct PL/SQL to be used
Select one:
a. SELECT DICTINCT WAREHOUSE, CLASS FROM PARTS WHERE WAREHOUSE >=1;
Question 18
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE CLASS = ‘AP’ OR ONHAND BETWEEEN 8 AND 12
FROM PARTS
WHERE CLASS = ‘AP’ OR DESCRIPTION LIKE ‘__S%’;
FROM PARTS
WHERE CLASS = ‘AP’ AND DESCRIPTION LIKE ‘__S%’;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 8/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 19
Complete
Select one:
a. Between
b. IN
c. Like
d. Comparison
Question 20
Complete
Answer: True
Question 21
Complete
This is used to brings together data that is stored in different tables by specifying the link between them.
Select one:
a. Inclusion
b. Selection
c. Projection
d. Joins
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 9/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 22
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column DESCRIPTION, PARTNUM, CLASS and PRICE of all parts where the
description fourth letter starting from the first is equal to ‘D’.
SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE DESCRIPTION LIKE ‘___D%’;
SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE DESCRIPTION LIKE ‘%D___’;
SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE DESCRIPTION LIKE ‘D%’;
SELECT DESCRIPTION, PARTNUM, CLASS, PRICES FROM PARTS WHERE DESCRIPTION LIKE ‘%D’;
Question 23
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column DESCRIPTION, WAREHOUSE, CLASS and PRICE of all parts where the
description contains keyword ‘SHE’.
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE DESCRIPTION LIKE ‘%SHE%’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE DESCRIPTION LIKE ‘SHE%’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE DESCRIPTION LIKE ‘%SHE’;
SELECT DESCRIPTION, WAREHOUSE, CLASS, PRICE FROM PARTS WHERE DESCRIPTION LIKE ‘SHE’;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 10/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 24
Complete
This is used to selects the rows in a table that are returned by a query. Various criteria can be used to restrict the rows that are retrieved.
Select one:
a. Inclusion
b. Projection
c. Selection
d. Joins
Question 25
Complete
Select one:
a. Blank
b. NULL
c. Zero
d. Space
Question 26
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column PARTNUM, CLASS and ONHAND of all parts where partnum is equal to
AT94, DR93 and KV29. (Note 1 query only and do not use logical condition)
SELECT PARTNUM, CLASS, ONHAND FROM PARTS WHERE PARTNUM NOT IN (‘AT94’,’DR93’,’KV29’);
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 11/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 27
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column DESCRIPTION, ONHAND, CLASS and PRICE of all price where the
description ends with letter ‘N’.
SELECT DESCRIPTION, ONHAND, CLASSS FROM PARTS WHERE DESCRIPTION LIKE ‘%N’;
SELECT DESCRIPTION, ONHAND, CLASSS FROM PARTS WHERE DESCRIPTION LIKE ‘N%’;
SELECT DESCRIPTION, ONHAND, CLASSS FROM PARTS WHERE DESCRIPTION LIKE ‘%N%’;
SELECT DESCRIPTION, ONHAND, CLASSS FROM PARTS WHERE DESCRIPTION NOT LIKE ‘%N’;
Question 28
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column CLASS, DESCRIPTION and PRICE of all PARTS where price range is
between 200 to 500. Sort the Price in descending order.
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 200 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 500 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN =200 AND 500;
SELECT CLASS, DESCRIPTION, PRICE FROM PARTS WHERE PRICE BETWEEN 200 AND BETWEEN 500;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 12/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 29
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report that will merge the column DESCRIPTION and PRICE put a literal character string of = “ with a
price of ” in between the two columns. Limit the rows returned by getting only the partnum that starts with letter ‘K’.
SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE PARTNUM LIKE ‘K%’;
SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE PARTNUM LIKE ‘%K’;
SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE PARTNUM LIKE ‘%K%’;
SELECT (DESCRIPTION|| ‘WITH A PRICE OF’ || PRICE) FROM PARTS WHERE PARTNUM LIKE ‘__K%’;
Question 30
Complete
Select one:
a. Alias
b. Literal
c. String
d. Table name
Question 31
Complete
Select one:
a.
b. *
c. AS
d. ||
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 13/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 32
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, PRICE *.5 +(PRICE-100) FROM PARTS WHERE PRICE <10000;
Question 33
Complete
This is used to in conditions that compare one expression with another value or expression.
Select one:
a. Comparison
b. Logical Condition
c. Subtraction
d. Add
Question 34
Complete
Select one:
a. Between
b. IN
c. Comparison
d. Like
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 14/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 35
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report that will list only the column DESCRIPTION, PARTNUM, CLASS, and PRICE of all PART whose
CLASS is equal to HW.
SELECT COLUMN DESCRIPTION, PARTNUM, CLASS, PRICE FROM PARTS WHERE CLASS=’HW’;
Question 36
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report that will display the distinct value for CLASS and WAREHOUSE limit the rows by getting only the
parts under WAREHOUSE 3?
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 15/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 37
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column PARTNUM, DESCRIPTION and PRICE of all PARTS where price is less than
500. Sort the PRICE in ascending order.
SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE < 500;
SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE > 500;
SELECT PARTNUN, DESCRIPTION, PRICE FROM PARTS WHERE PRICE >= 500;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 16/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 38
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing the column PARTNO, DESCRIPTION and WAREHOUSE. Get only that description that does
not ends with ‘ER’. Note that you have to merge the said three columns, rename the merge column as “Parts Record”. Below is the sample
output for column.
Parts Record
SELECT (PARTNUM || ‘is the part number of’|| DESCRIPTION || ‘which belongs to’ || WAREHOUSE FROM PARTS WHERE PARTNUM NOT LIKE
‘%ER’;
SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION || ‘which belongs to’ || WAREHOUSE) FROM PARTS WHERE PARTNUM NOT LIKE
‘ER%’;
SELECT (PARTNUM ‘is the part number of’ DESCRIPTION‘which belongs to’WAREHOUSE) FROM PARTS WHERE PARTNUM NOT LIKE ‘%ER’;
SELECT (PARTNUM || ‘is the part number of’ ||DESCRIPTION || ‘which belongs to’ || WAREHOUSE) FROM PARTS WHERE PARTNUM LIKE
‘%ER’;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 17/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 39
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, ONHAND,CLASS
FROM PARTS
WHERE ONHAND >=21;
FROM PARTS
WHERE CLASS = ‘HW’;
Question 40
Complete
Select one:
a. Comparison
b. Like
c. Between
d. IN
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 18/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 41
Complete
Select one:
a. Comparison
b. Like
c. Between
d. IN
Question 42
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report showing all rows and columns sort the description in ascending order.
Question 43
Complete
True/False Character values are format sensitive and date values are case sensitive-sensitive.
Answer: False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 19/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 44
Complete
This is used to in conditions that compare one expression with another value or expression.
Select one:
a. Comparison
b. Add
c. Subtraction
d. Logical Condition
Question 45
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report that will display the DESCRIPTION, WAREHOUSE AND distinct value for CLASS.
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 20/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 46
Complete
Choose the letter of the correct answer based on table PARTS as shown below
Which of the following is the correct report listing only the column DESCRIPTION, CLASS and PRICE of all PARTS where class is not equal to
AP.
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE CLASS NOT LIKE ‘%AP%’;
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE CLASS NOT LIKE ‘%AP’;
SELECT DESCRIPTION, CLASS, PRICE FROM PARTS WHERE CLASS <> AP;
Question 47
Complete
True/False. A null value means that the value is unavailable, unassigned, unknown, or inapplicable.
Answer: True
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 21/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 48
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT * FROM TABLE PARTS;
Question 49
Complete
Given the output below. Which of the following is the correct PL/SQL to be used?
Select one:
a. SELECT DESCRIPTION, ONHAND, CLASS
FROM PARTS
WHERE CLASS IN (‘HW’,’SG’);
FROM PARTS
WHERE DESCRIPTION LIKE ‘%L’;
FROM PARTS
WHERE DESCRIPTION LIKE ‘%L%’;
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 22/23
11/3/22, 12:29 AM MIDTERM LAB EXAMINATION: Attempt review
Question 50
Complete
Select one:
a. Where
b. Delete
c. Insert
d. Select
◄ MIDTERM EXAMINATION
Jump to...
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=49917&cmid=3833&showall=1 23/23