Quiz 3

¡Supera tus tareas y exámenes ahora con Quizwiz!

Self-join

A database administrator wants to correlate pairs of rows from the same table. Which type of join should the database administrator use? Cross-join Left join Full join Self-join

A consolidated view of specific data without changing the underlying database structure.

A view table provides which benefit when created in a database with multiple tables? A consolidated view of base table data that is pulled from restructured database tables. A consolidated view of base table data that is pulled from multiple view queries. A consolidated view of specific data that modifies the underlying source tables. A consolidated view of specific data without changing the underlying database structure.

correlated subquery

A/An _____ is a subquery that contains a reference to a table column that also appears in the outer query. correlated subquery nested subquery inner subquery related subquery

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

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 INSERT rejects the data with no error. The INSERT accepts the data and displays an error. The item appears in the base table but not in the view table. The item appears in the base table and the view table.

ProductName, Quantity DESC

Complete the ORDER BY clause to sort the Products by ProductName alphabetically, then in decreasing Quantity. SELECT ProductName, Size, Quantity, SupplierId FROM Product ORDER BY _____ ; ProductName, Quantity DESC ProductName, Quantity ProductName DESC, Quantity DESC ProductName DESC, Quantity

Left table

In the SQL query below, the Teacher table is the _____. SELECT LastName, FirstName, CourseTitle FROM Teacher INNER JOIN Class ON Teacher.TeacherID = Class.TeacherID; Main table Source table Left table Right table

number of columns and data types

In the relational algebra, compatible tables have the same _____. number of columns, column names, and data types number of columns and data types number of columns and column names number of columns

equijoin

The query below is a/an _____? SELECT LastName, FirstName, CourseTitle FROM Teacher INNER JOIN Class ON Teacher.TeacherID = Class.TeacherID; equijoin non-equijoin self-join cross-join

The base table primary key is not included in the view table.

What causes the generation of a NULL primary key value when using a view in an INSERT statement? The base table primary key is not included in the view table. The view table primary key is not included in the view table. The view query included primary keys from multiple base tables. The view query included primary keys from multiple view tables.

12.4

What does the following statement return? SELECT ROUND(12.439, 1); 12 12.44 12.4 12.0

'cell'

What does the following statement return? SELECT SUBSTRING('Excellent', 3, 4); 'cell' 'elle 'ell' 'Exc'

-5

What does the following statement return? ​​SELECT DATEDIFF('2020-11-04', '2020-11-09'); -5 5 '2020-11-05' 0

The CustomerID prefix is missing.

What is wrong in the following query? SELECT Sales.OrderID, Customer.FirstName, Customer.LastName FROM Sales INNER JOIN Customer ON CustomerID = CustomerID; The columns in the SELECT clause are in the wrong order. The Customer table does not appear in the FROM clause. Nothing is wrong in the query. The CustomerID prefix is missing.

Inner

What type of join is executed by the following relational algebra expression? Department⋈Department.Manager=Employee.IDEmployee Cross Inner Left Full

materialized view, base table

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

Π(PassengerName)(σ(TicketPrice<1000)(Booking))

Which relational algebra expression is equivalent to the following SQL statement? SELECT PassengerName FROM Booking WHERE TicketPrice < 1000; Π(TicketPrice<1000)(σ(PassengerName)(Booking)) Π(PassengerName)(σ(TicketPrice<1000)(Booking)) σ(PassengerName)(Π(TicketPrice<1000)(Booking)) σ(TicketPrice<1000)(Π(PassengerName)(Booking))

Rename

Which relational algebra operation is denoted by the Greek letter ρ? Select Rename Project Join

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

Which statement is NOT an advantage of using a view table? Optimal SELECT statements can be saved in a view table. Complex SELECT statements can be saved in a view table. The creation of a new base table is always up to date. Sensitive table data can be hidden from users and programmers.


Conjuntos de estudio relacionados

Ch. 1 Managing Strategy Making Process for Competitive Advantage

View Set

Working in groups - Chapter 13 (T-F)

View Set

Unit 6: Florida Real Estate Exam

View Set