wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CS10337 - Lecture #12

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

A view in MySQL is a virtual table created from a query and does not store data permanently.

a)

True

b)

False

2.

One benefit of using views is that they always store a separate physical copy of the data.

a)

True

b)

False

3.

Views can simplify complex JOIN queries by encapsulating them into a single reusable object.

a)

True

b)

False

4.

A view that contains DISTINCT, GROUP BY, or UNION is generally not updatable.

a)

True

b)

False

5.

If a view is based on a single table with no GROUP BY, it is typically updatable.

a)

True

b)

False

6.

Which of the following best describes a MySQL view?

a)

A physical copy of a table stored permanently

b)

A virtual table created from a stored SELECT query

c)

A special type of trigger used for auditing

d)

A temporary table that expires after the session ends

7.

Which of the following is a benefit of using views?

a)

They store old and new row values

b)

They replace the need for foreign keys

c)

They simplify complex queries

d)

They prevent users from updating base tables

8.

Which of the following would make a view non-updatable?

a)

The view is based on a single table

b)

The view contains an INNER JOIN with a 1-to-1 mapping

c)

The view contains GROUP BY or DISTINCT

d)

The view contains only simple column selections

9.

Which of the following is TRUE about updating data through updatable views?

a)

Updating a view updates only the view, not the base table

b)

Updating an updatable view will reflect changes in the underlying table

c)

Updatable views must always include at least one JOIN

d)

Updatable views can include aggregates like SUM or COUNT

10.

Which of the following is a requirement for a JOIN-based view to be updatable?

a)

It must include a UNION

b)

It must be based on an OUTER JOIN

c)

It must be an INNER JOIN and update only one base table

d)

It must include at least one calculated column