Review IIII

Ace your homework & exams now with Quizwiz!

Which type is complex? a. BLOB b. JSON c. DATE d. TEXT

b. JSON

Which of the following is not true about the INSERT statement? a. A single INSERT statement can only add one row. b. The INSERT statement is used to add new values into the table. c. The column names can be omitted in an INSERT statement. d. The VALUES order must match the column order in the INTO clause.

a. A single INSERT statement can only add one row.

What is the correct statement for deleting a database? a. DROP DATABASE <databaseName>; b. DROP <databaseName>; c. DATABASE DROP <databaseName>; d. DELETE DATABASE <databaseName>;

a. DROP DATABASE <databaseName>;

Which of the following is an example of database programming? a. Creating a static web page b. Creating a database using a database server administration tool c. Creating a web application using Java and SQL d. Creating tables and columns using SQL in a database administration tool

c. Creating a web application using Java and SQL

Refer to the Product table. Complete the SQL statement to select all products with sizes 0-3M, 3-6M, and 6-9M. (See Table 56) SELECT ProductName, Quantity FROM Product WHERE Size _____ ('0-3M', '3-6M' , '6-9M'); a. IN b. BETWEEN c. = d. NOT IN

a. IN

Refer to the Product table. Which products are selected by the query below? (See Table 55) SELECT * FROM Product WHERE Quantity > 5 AND UnitPrice <= 15.00; a. Onesies set, Pajama set, Shorts set b. Onesies set, Pajama set c. All products except the Romper d. No products

a. Onesies set, Pajama set, Shorts set

Refer to the Product table. Complete the SQL statement so the result table shows 63, which is the total quantity of all products. (See Table 57) SELECT _____ FROM Product; a. SUM(Quantity) b. AVG(Quantity) c. MIN(Quantity) d. Quantity * 5

a. SUM(Quantity)

A database designer wants to create three tables: Supplier, Product, and Country. The Supplier table has a CountryId column with values that must appear in the Country table's CountryId column. The Product table has an auto-increment column. Which table's CREATE TABLE statement(s) must specify a FOREIGN KEY? a. Supplier b. Product c. Country d. Supplier and Country

a. Supplier

Which column is best to replace XXX in the SQL statement below? CREATE TABLE Supplier ( SupplierId INT NOT NULL AUTO_INCREMENT, CompanyName VARCHAR(40), ContactName VARCHAR(50), Phone VARCHAR(30), PRIMARY KEY (XXX) ); a. SupplierId b. CompanyName c. ContactName d. Phone

a. SupplierId

The statement below is an example from which SQL sublanguage? SELECT ProductName FROM Product; a. Data Definition Language b. Data Query Language c. Data Manipulation Language d. Data Transaction Language

b. Data Query Language

Refer to the column information produced bySHOW COLUMNS FROM Supplier;statement. CountryId is a foreign key that references the CountryId column in the Country table. Which statement correctly inserts Oshkosh Bgosh? (See Diagram 50) a. INSERT INTO Supplier (SupplierId, CompanyName, ContactName, CountryId)VALUES (5, 'Oshkosh Bgosh', 'Martina Perry', 2); b. INSERT INTO Supplier (CompanyName, ContactName, CountryId)VALUES ('Oshkosh Bgosh', 'Martina Perry', 2); c. INSERT INTO SupplierVALUES ('Oshkosh Bgosh', 'Martina Perry', 2); d. INSERT INTO Supplier (SupplierId, CompanyName, ContactName, CountryId)VALUES (NULL, 'Oshkosh Bgosh', 'Martina Perry', 2);

b. INSERT INTO Supplier (CompanyName, ContactName, CountryId)VALUES ('Oshkosh Bgosh', 'Martina Perry', 2);

Which statement selects all rows and just the ProductName and Size columns from the Product table? a. SELECT *, ProductName, Size FROM Product; b. SELECT ProductName, Size FROM Product; c. SELECT * FROM Product; d. SELECT ProductId, ProductName, Size FROM Product;

b. SELECT ProductName, Size FROM Product;

A database system has a database called onlineShop. What is the result of a CREATE statement that tries to create onlineShop a second time? a. The statement replaces onlineShop with a new onlineShop database. b. The statement produces an error that the database already exists. c. The statement creates a copy of the database onlineShop as onlineShop_1. d. The statement is ignored.

b. The statement produces an error that the database already exists.

Refer to the Supplier table. Which statement correctly changes Adan Stevens to Maria Stevens? (See Diagram 51) a. UPDATE Supplier SET ContactName = 'Maria Stevens' WHERE SupplierId = '5'; b. UPDATE SupplierSET ContactName = 'Maria Stevens' WHERE SupplierId = 5; c. UPDATE Supplier (ContactName = 'Maria Stevens' ) WHERE SupplierId = 5; d. UPDATE Supplier SET 'Alan Stevens' = 'Maria Stevens' WHERE SupplierId = '5';

b. UPDATE SupplierSET ContactName = 'Maria Stevens' WHERE SupplierId = 5;

Refer to the Product table. Which columns are present in the query's result table? (see Table 53) SELECT * FROM Product; a. ProductId, ProductName, Quantity b. ProductId, ProductName, UnitPrice c. All columns are present d. No columns are present

c. All columns are present

Refer to the Product table. Which products are selected by the query below? (See Table 54) SELECT ProductName FROM Product WHERE Quantity >= 10; a. Rompers, Shorts set b. Onesies set, Pajama set c. Onesies set, Sunsuit, Pajama set d. No products

c. Onesies set, Sunsuit, Pajama set

What is the correct statement for creating a database called reservationDB? a. DATABASE CREATE reservationDB; b. CREATE DB reservationDB; c. CREATE reservationDB DATABASE; d. CREATE DATABASE reservationDB;

d. CREATE DATABASE reservationDB;

Elements can be nested in _____. a. neither XML nor JSON b. XML but not JSON c. JSON but not XML d. both XML and JSON

d. both XML and JSON

What should be added to the SQL statements to produce the Result table below? (see diagram 45) USE _____; SHOW _____; a. DATABASE, COLUMNS b. onlineshop, TABLE c. DATABASE, CREATE TABLE d. onlineShop, TABLES

d. onlineShop, TABLES


Related study sets

Physical vs Chemical Changes, Phase Changes, DCA 3 8th Grade Science

View Set

Business Ethics : Business Ethics - Assessment V

View Set

Linux Chapter 3: Exploring Linux Filesystems

View Set

newborn assessment part 1. Part 2 is newborn care

View Set