wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Database Basics - Lecture 2

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following is not a common data type in databases?

a)

Integer

b)

Float

c)

Boolean

d)

String

2.

What does SQL stand for?

a)

Structured Query Language

b)

Simple Query Language

c)

Structured Question Language

d)

System Query Language

3.

What is the primary key in a database table?

a)

A field that is used for sorting data

b)

A field that is always unique and identifies each record

c)

A field that contains text data

d)

A field that stores binary data

4.

What is the primary purpose of the SQL SELECT statement?

a)

To update records in a table

b)

To delete records from a table

c)

To retrieve data from a database

d)

To insert new records into a table

5.

Which SQL clause is used to specify the columns you want to retrieve in a SELECT statement?

a)

WHERE

b)

FROM

c)

SELECT

d)

HAVING

6.

How many Primary keys can have in a table?

a)
  1. Only 1

b)
  1. Only 2

c)
  1. Depends on no of Columns

d)
  1. Depends on DBA

7.

The ______ clause allows us to select only those rows in the result relation of the ____ clause that satisfy a specified predicate.

a)

Where, from

b)

From, select

c)

Select, from

d)

From, where

8.

The ________ clause is used to list the attributes desired in the result of a query.

a)

Where

b)

Select

c)

From

d)

Distinct

9.

In the given query which of the keyword has to be inserted?

INSERT INTO employee _____ (1002,Joey,2000);

a)

Table

b)

Values

c)

Relation

d)

Field

10.

In an INSERT INTO statement, what does the following query do:

INSERT INTO customers (name, email) VALUES ('John Doe', 'johndoe@example.com')?

a)

Inserts a new customer with the specified name and email into the "customers" table

b)

Updates an existing customer's email address

c)

Deletes a customer from the "customers" table

d)

Creates a new table named "customers"

11.

What happens if you attempt to insert a duplicate record into a table with a unique constraint using the INSERT INTO statement?

a)

The duplicate record is inserted without any issues.

b)

An error is generated, and the insertion is rejected.

c)

The duplicate record is automatically removed.

d)

The database prompts for user confirmation.

12.

What is the correct syntax for inserting data into a table using SQL INSERT INTO statement?

a)

INSERT INTO table_name (column1, column2, ...) VALUES (value1, value2, ...)

b)

INSERT (column1, column2, ...) INTO table_name VALUES (value1, value2, ...)

c)

INSERT table_name SET column1=value1, column2=value2, ...

d)

INSERT VALUES (column1, column2, ...) INTO table_name (value1, value2, ...)

13.

What is the result of a SQL SELECT statement when you specify SELECT *?

a)

It retrieves all columns from the specified table.

b)

It retrieves only the primary key column.

c)

It retrieves no columns.

d)

It retrieves a random column.

14.

In the database table, data types describe the kind of ___ that it can contain.

a)
  1. Table

b)
  1. Data

c)
  1. Number

d)
  1. None of the above

15.

 A database of racing includes the names of each driver, total wins and losses, and average speeds. What criterion will produce Jeff Gordon’s total winnings?  

a)

 >Jeff Gordon

b)

<Jeff Gordon 

c)

<>Jeff Gordon

d)

 =Jeff Gordon

16.

Jennifer is creating a database for several customers. How will she list the Customer ID?  

a)

Yes/No

b)

Number

c)

Currency

d)

 Data 

17.

Billy is creating a database for several customers. How will he record whether or not they have a credit card?

a)

 Yes/No

b)

Number 

c)

Text 

d)

Currency

18.

Robert needs to create a database of all his friends. In a table, is what last name considered?   

a)

Field

b)

Table

c)

Record

d)

Cell Address

19.

What type of data is stored in the shoe size field?

a)

Numeric

b)

alphanumeric

c)

yes/no

d)


Date and time

20.

When is a database used?

a)

To perform searches for info on the internet

b)

To display information in a picture form instead of words

c)


To create and format text documents for sharing info

d)

To store and organize large amounts of information for quick searching