finale

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Refer to the Product table. Complete the SQL statement to select all products sold as a set. SELECT ProductName, Quantity FROM Product WHERE ProductName LIKE _____;

%set'

What is the correct order of operator precedence in SQL (listed from higher to lower precedence)?

* + = NOT AND OR

Evaluate the SQL statement and data below. What is correct result? SELECT SUM(Cost) + SUM(Markup) FROM Profit;

485

Assume the lastName value is obtained from a submitted form. Which values should replace XXX and YYY in the PHP code?

:lastName , "lastName"

When using the MySQL Command-Line Client, which character ends a command?

;

Which statement replaces XXX and YYY in the PHP code to call the stored procedure below?

?, @teacherLoadCount

Which SQL statement adds a new column Fax to the Supplier table?

ALTER TABLE Supplier ADD Fax VARCHAR(30);

In the following ER diagram, what does 'AlbumTitle' represent?

Attribute

Refer to the stored procedure. What is the correct call syntax to get the number of classes taught by Maggie Wilson with ID - 45631 through a stored procedure call from the command line? CREATE PROCEDURE TeacherClassLoad(IN teachID INT, OUT numberOfClasses INT) SELECT COUNT(*) INTO numberOfClasses FROM Class WHERE TeacherID = teachID;

CALL TeacherClassLoad(45631, @numberofClasses)

Which of the following is an example of database programming?

Creating a web application using Java and SQL

When using a SQL statement to create a table, which data type is used to store a fractional value?

DECIMAL

What is the correct statement for deleting a database?

DROP DATABASE DatabaseName;

Which language defines statements used for creating and dropping tables?

Data Definition Language

In a PHP application using PDO, a _____ consists of the host, port, and name of the database that will be used to establish a connection to the database.

Data Source Name

Which database role focuses on database storage, response times, and optimization?

Designer

SQL database system is optimized for big data.

False

Refer to the Product table. How many rows appear in the query's result table? SELECT DISTINCT Size FROM Product;

Four rows

Refer to the Product table. Complete the SQL statement to select all products with sizes 0-3M, 3-6M, and 6-9M. SELECT ProductName, Quantity FROM Product WHERE Size _____ ('0-3M', '3-6M', '6-9M');

IN

Refer to the tables below. Which join completes the SQL query and produces the result table below? SELECT CourseTitle, FirstName, LastName FROM Class _____ Teacher ON Class.TeacherID = Teacher.TeacherID;

LEFT JOIN

Which is NOT true?

NULL value represents zero or empty string

Refer to the Product table. Which products are selected by the query below? onesies SELECT * FROM Product WHERE Quantity > 5 AND UnitPrice <= 15.00;

Onesies set, Pajama set, Shorts set

Which principle defines data independence?

Physical design never affects query results.

How does a database system protect data when concurrent transactions occur?

Preventing multiple transactions with the same data at the same time.

Which of the following database programming techniques is an extension of the SQL language that is typically used for database applications?

Procedural SQL

In the SQL code below, which of the following is an identifier? UPDATE Product SET UnitPrice = 9.50 WHERE ProductId = 20;

Product

Which statement should replace XXX?

READS SQL DATA

Refer to the Customer table. Which query returns the result table below? Result: RewardsMember | COUNT(*) __________________________________________ No | 5 Yes | 7

SELECT RewardsMember, COUNT(*) FROM Customer GROUP BY RewardsMember;

Refer to the Customer table. Which query returns the result table below? result state | count (*) _________________________ CA | 2 IL | 2 NY | 4

SELECT State, COUNT(*) FROM Customer GROUP BY State HAVING COUNT(*) > 1;

A database administrator uses which two SQL statements to view and then modify existing customer balances with a late fee?

SELECT, UPDATE

_____ is an ISO standard that extends procedural SQL for use in stored procedures.

SQL/PSM

Refer to the Product table. Complete the SQL statement so the result table shows 63, which is the total quantity of all products. SELECT _____ FROM Product;

SUM(Quantity)

In terms of database architecture, which component translates the query processor instructions into low-level file-system commands and is responsible for indexing the data?

Storage manager

What is the result of a relational operation?

Table

What is wrong in the following query? SELECT Sales.OrderID, Customer.FirstName, Customer.LastName FROM Sales INNER JOIN Customer ON CustomerID = CustomerID;

The CustomerID prefix is missing.

Which statement is NOT an advantage of using a view table?

The creation of a new base table is always up to date.

An Inventory view table is defined with a WHERE clause that specifies ShelfNumber = 25. An INSERT adds a new item to ShelfNumber 20. What happens when the WITH CHECK OPTION is not specified in the CREATE VIEW statement?

The item appears in the base table but not in the view table.

A user creates a table by using a SQL statement. The data type VARCHAR(11) is part of the statement. What does the value of (11) represent?

The number of characters allowed for the data type.

A database system has a database called onlineShop. What is the result of a CREATE statement that tries to create onlineShop a second time?

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

If a database system is processing three queries as part of a transaction and the third query fails, what happens to the transaction?

The successful query results are reversed, and the transaction is canceled.

The SELECT SQL statement does not alter any database data.

True

Refer to the tables. Complete the ORDER BY clause to produce the result table below. SELECT * FROM Product ORDER BY _____;

UnitPrice DESC

Choose the best data types to replace XXX and YYY.

VARCHAR(50), DECIMAL(8, 2)

In the relational model, a column is _____.

a name and a data type

A database management system reads and writes data in a database, and _____.

ensures consistency and availability

When using the fetch() in a SELECT statement, each call to fetch() returns the next row from the result table. If it reaches the last row, the next returned value is _____.

false

Programming languages fall into either _____ or _____ paradigms.

imperative, declarative

When a database stores view data, it uses a _____ that depends on data in a corresponding _____.

materialized view, base table

What should be added to the SQL statements to produce the Result table below? USE _____; SHOW _____;

onlineShop, TABLES

Each course must be offered by at least one department. In the Department-Offers-Course relationship, Department is a(n) _____ entity.

required

Relationship minima are usually specified as _____ or _____.

zero, one


Kaugnay na mga set ng pag-aaral

Walter McHenry C Programming Final-Exam

View Set

NU271 PrepU: Reproduction (week 9)

View Set

YouTube Channel Growth Certification - Course 7

View Set

Bio Ch. 7: The Cardiovascular System

View Set