You are designing a database that will contain customer orders. Customers will be able to order multiple
products each time they place an order. You review the database design, which is shown in the exhibit. You
want to promote quick response times for queries and minimize redundant data. What should you do?
A -
(I) Create a new order table named OrderDetail. Add OrderID, ProductID, and Quantity columns to this table.
B -
Create a composite PRIMARY KEY constraint on the OrderID and ProductID columns of the Orders table.
C -
(II) Remove the ProductID and Quantity columns from the Orders table.
D -
Both A and C
2-
Which SQL keyword is used to eliminate duplicate rows in the results of a SQL SELECT query?
A -
UNIQUE
B -
SORT
C -
ORDER BY
D -
DISTINCT
3-
Conditions after the WHERE require single quotes(dấu nháy đơn) around the values for columns that have
which data type?
A -
Char
B -
VarChar
C -
Integer
D -
Both A and B
4-
Which symbol is used in standard SQL as a wildcard to represent a single, unspecified character?
A -
% (percent sign)
B -
! (exclamation mark)
C -
_ (underscore)
D -
? (question mark)
5-
Given the table CUSTOMER(CustID, Name, PhoneNum, AcctBalance), what is the standard SQL query
phrase to retrieve the Name and Phone Number of customers?
A -
SELECT CUSTOMER-Name AND CUSTOMER-PhoneNum
B -
SELECT (CUSTOMER-Name AND CUSTOMER-PhoneNum)
C -
SELECT Name, PhoneNum
D -
SELECT (Name, PhoneNum)
6-
Given the table STUDENT(StudentID, Name, Advisor), which of the following SQL statements would
be used to add new student data to the STUDENT table?
A -
INSERT DATA STUDENT SET StudentID=123, Name='Jones', Advisor='Smith';
B -
INSERT INTO STUDENT VALUES (123, 'Jones', 'Smith');
C -
INSERT INTO STUDENT (New Student Data) VALUES (123, 'Jones', 'Smith');
D -
INPUT DATA STUDENT SET StudentID=123, Name=' Jones', Advisor='Smith';
7-
The order of the columns returned by an SQL SELECT statement are determined by the:
A -
ORDER BY clause.
B -
SORT BY clause.
C -
order they are listed in following SELECT.
D -
order they are listed in following WHERE.
8-
Which symbol is used in standard SQL as a wildcard to represent a series of one or more unspecified
characters?
A -
% (percent sign)
B -
! (exclamation mark)
C -
_ (underscore)
D -
? (question mark)
9-
Which SQL keyword is used to specify a condition that rows must meet to be included in the results of
an SQL SELECT query?
A -
SELECT
B -
FROM
C -
WHERE
D -
ORDER BY
10-
Which of the following is the correct SQL clause to sort the results of a SELECT query in reverse-
alphabetic (ngược lại ABC) order using the Department field?