wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DBMS Lab Quiz 1 2B3

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

As part of our ongoing efforts to improve our customer database, you've been tasked with adding a new column to the 'Customers' table to store email addresses. This will help us communicate with our customers more effectively. Which SQL statement should you use to accomplish this?

a)

ALTER TABLE Customers ADD Email VARCHAR(100);

b)

UPDATE Customers SET Email = 'example@email.com';

c)

CREATE COLUMN Email IN Customers;

d)

INSERT INTO Customers (Email) VALUES ('example@email.com');

2.

In your role as data analysts, you often work with a customer database that evolves over time to accommodate new information. Your manager has requested you to update the database by adding new attributes to an existing customer relation. Which of the following commands should you use to accomplish this task effectively?

a)

Alter

b)

Modify

c)

Tailor

d)

Eliminate

3.

In the financial database you oversee, there's a need to periodically clear out all the transaction records from a particular table without generating extensive log entries for each deletion. This process ensures efficient data maintenance. Which SQL statement should you employ to achieve this specific task?

a)

DELETE

b)

DROP

c)

TRUNCATE

d)

REMOVE

4.

You're working on a data analysis project, and your manager asks you to sort a list of products by their sales figures. However, in the SQL query you're about to write, you've accidentally omitted the ASC or DESC keyword after the ORDER BY clause. What will happen in this situation?

a)

DESC

b)

ASC

c)

Query will not run

d)

There is no default value

5.

As part of your internship at our software development company, you'll be working with SQL databases. Think of SQL views as a way to create a virtual representation of specific data from our databases. These views simplify data access for reporting and analysis. What are SQL views commonly referred to as?

a)

Simple Tables

b)

Virtual Tables

c)

Complex Tables

d)

Actual Tables

6.

Let's say you're a librarian managing a library database, and you need to find all books that belong to a specific genre from a long list. You want to compare the genre of each book to a provided list of genres. Which SQL operator should you use for this task?

a)

IN

b)

ALL

c)

BETWEEN

d)

ANY

7.

As part of your data analysis work, you often encounter situations where you need to identify records in a dataset that lack certain information, like missing customer addresses in an e-commerce database. To accomplish this, you use a specific SQL operator. Which operator helps you test a column for the absence of data in such scenarios?

a)

NOT operator

b)

EXISTS operator

c)

IS NULL operator

d)

! (NOT operator)

8.

As a database administrator, you oversee a comprehensive database used to store vital company data. However, you've received instructions to permanently eliminate the entire database, including all its related components, such as tables, views, and stored procedures. Which SQL statement should you use to carry out this task?

a)

DROP Database

b)

DELETE Database

c)

REMOVE Database

d)

None of these

9.

As part of our annual salary adjustments, we need to update the 'Salary' column for all employees in the 'Employees' table who belong to the 'HR' department. This ensures that our HR team is fairly compensated. Which SQL statement should you use to accomplish this?

a)

UPDATE Employees SET Salary = 55000 WHERE Department = 'HR';

b)

INSERT INTO Employees (Salary) VALUES (55000) WHERE Department = 'HR';

c)

DELETE FROM Employees WHERE Department = 'HR';

d)

SELECT * FROM Employees WHERE Department = 'HR';

10.

As part of your role as a database developer, you are responsible for ensuring the integrity of the data in our company's employee database. This involves using various SQL constraints to maintain data quality. However, not all options provided are actual SQL constraints. Can you identify which one is not a constraint?

a)

Not Null

b)

Check

c)

Union

d)

Primary Key