wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DBMS Quiz - I

Total questions: 66

Worksheet time: 33mins

Name
Class
Date
1.

Here which of the following displays the unique values of the column?

SELECT ________ dept_name

FROM instructor;

a)

from

b)

like

c)

unique

d)

distinct

2.

Which of the following statements contains an error?

a)

Select * from emp where empid = 10003;

b)

Select empid from emp where empid = 10006;

c)

Select empid from emp;

d)

Select empid where empid = 1009 and lastname = ‘GELLER’;

3.

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

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

a)

table

b)

values

c)

from

d)

relation

4.

CREATE TABLE employee (name VARCHAR, id INTEGER)

What type of statement is this?

a)

view

b)

ddl

c)

dml

d)

tcl

5.

SELECT * FROM employee

What type of statement is this?

a)

integrity constraint

b)

ddl

c)

dml

d)

view

6.

To remove a relation from an SQL database, we use the ______ command.

a)

delete

b)

drop

c)

remove

d)

none of these

7.

DELETE FROM r;

where r is relation. This command performs which of the following action?

a)

Remove relation

b)

Clear relation entries

c)

Delete fields

d)

Delete all rows

8.

A DBMS query language is designed to

a)

Support end users who use English-like commands.

b)

Support in the development of complex applications software.

c)

Specify the structure of a database.

d)

all of the above

9.

Which of the following language is used to specify database Schema?

a)

Data Manipulation language

b)

Data Definition language

c)

Database Development language

d)

Database Design language

10.

In SQL, which command(s) is (are) used to change a table’s storage characteristics?

a)

Modify Table

b)

Change Table

c)

Alter Table

d)

All of these

11.

In SQL, which command is used to SELECT only one copy of each set of duplicate rows

a)

SELECT DISTINCT

b)

SELECT UNIQUE

c)

SELECT DIFFERENT

d)

ALL OF THE ABOVE

12.

What operator tests column for the absence of data?

a)

EXISTS operator

b)

NOT operator

c)

IS NULL operator

d)

None of these

13.

In SQL, which command is used to add new rows to a table?

a)

alter

b)

add

c)

insert

d)

all of the above

14.

Which of the following is not included in DML

a)

insert

b)

update

c)

delete

d)

create

15.

DDL stands for__________.

a)

Data Definition language

b)

Database Development language

c)

Database Design language

d)

None of the above

16.

Which of the following is an example of a DBMS

a)

SQL

b)

Microsoft Office

c)

PHP

d)

Oracle

17.

Which of the following is a property of database

a)

Represents some aspect of the real world

b)

Logically related collection of data

c)

Built, and populated with data for a specific purpose

d)

All the above

18.

A database management system (DBMS) is a collection of programs that enables users to

a)

create a database

b)

manipulate a database

c)

both create and manipulate a database

d)

for storing data only

19.

Which of the following are characteristics of a DBMS

a)

Self-Describing

b)

Support Multiple Views

c)

Single user systems

d)

Data Sharing

20.

Who is responsible for authorizing access to the database, coordinating and monitoring its use

a)

Database programmer

b)

System Analyst

c)

DBA

d)

Specialised user

21.

DBA stands for

a)

Data Bank Access

b)

Database Access

c)

Data Bank Administration

d)

Database Administrator

22.

This is an authorization command of SQL

a)

Access

b)

Grant

c)

Allow

d)

None of these

23.

The statement in SQL which allows to change the definition of a table is

a)

Alter

b)

Update

c)

Create

d)

Select

24.

SQL is

a)

Structured Query Language

b)

Simple Query Language

c)

Structured Question Language

d)

Structure Quality Language

25.

DML

(a)  

26.

To remove a record from a table which SQL statement would you use?

a)

Remove

b)

Cancel

c)

Delete

d)

Eradicate

27.

Which statement is used to extract data from a database?

a)

Extract

b)

Get

c)

Open

d)

Select

28.

Which statement allows us to add a record to a table?

a)

Add To

b)

Update To

c)

Add Into

d)

Insert Into

29.

Which word is missing from the following SQL statement?


Select * table_name

a)

With

b)

Where

c)

From

d)

And

30.

Which SQL statement would add a record to the database?

a)

INSERT INTO Designer VALUES ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456')

b)

INSERT VALUES ('SMI01', 'M Smith', 'mail@msmith.com', 01224123456') INTO Designer

c)

INSERT ('SMI01', 'M Smith', 'mail@msmith.com', '01224123456') INTO Designer

d)

INSERT Designer INTO VALUES (''SMI01', 'M Smith', 'mail@msmith.com', '01224123456')

31.

It is a DML command that is used to display record.

a)

DISPLAY

b)

STRUCTURE

c)

WHERE

d)

SELECT

32.

______________ constraint prevents NULL values

a)

UNIQUE

b)

NOT NULL

c)

NULL

d)

FOREIGN KEY

33.

A primary key can be NULL in the table? TRUE or FALSE

a)

TRUE

b)

FALSE

34.

A clause in the SELECT command that specifies the condition the records must satisfy.

a)

Table_name

b)

WHERE

c)

LIKE

d)

Database name

35.

This symbol is an SQL wildcard that can substitute for one or more characters when searching for data in a database.

a)

$

b)

%

c)

=

d)

*

36.

You are required to update the phone number for only the DesignerID "SMI01" in the "Designer" table. Which of these would successfully do that?

a)

UPDATE Designer SET PhoneNo = '01224123456'

b)

UPDATE Designer (PhoneNo) VALUES ('01224123456')

c)

UPDATE Designer SET PhoneNo = '01224123456' WHERE DesignerID = 'SMI01'

d)

UPDATE PhoneNo = '01224123456' FROM Designer WHERE DesignerID = 'SMI01'

37.

If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

a)

ASC

b)

DESC

c)

There is no default value

d)

None of the mentioned

38.

Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

a)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70

b)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70

c)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70

d)

SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70

39.

With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?

a)

SELECT * FROM Persons WHERE FirstName=’a’

b)

SELECT * FROM Persons WHERE FirstName LIKE ‘a%’

c)

SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

d)

SELECT * FROM Persons WHERE FirstName=’%a%’

40.

Here which of the following displays the unique values of the column?

SELECT ________ dept_name

FROM instructor;

a)

from

b)

like

c)

unique

d)

distinct

41.

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

42.

SELECT * FROM sales WHERE amount > 200.

a)

the query will display all the sales records with amounts starting from 200 and above

b)

the query will display all the sales records with amounts less than 200

c)

the query will display all the sales records with amounts greater than 200

d)

the query will output sales records with the amount equal to 200.

43.

SELECT * FROM cars WHERE Doors > 3

would return how many records?

a)

1

b)

2

c)

3

d)

4

44.

SELECT * FROM Students WHERE Gender="Female" AND Class=2.2

would return how many records?

a)

1

b)

2

c)

3

d)

4

45.

DCL stands for ?

a)

Dataset Control Function

b)

Data Compact Language

c)

Data Control Language

d)

Data Compact Level

46.

This symbol is placed immediately after the SELECT command to display all the fields.

a)

$

b)

%

c)

=

d)

*

47.

In order to modify data in a database we would use which SQL statement?

a)

Update

b)

Amend

c)

Alter

d)

Modify

48.

Less than or equal to?

a)

>=

b)

=>

c)

=<

d)

<=

49.

The _____ command is used to completely remove a table from the database.

a)

INSERT

b)

ALTER

c)

DROP

d)

CREATE

50.

(a)   SQL command to view structure of the table named ‘STUDENT ‘.

51.

A key which allows unique or null values.

a)

Unique

b)

Null key

c)

Primary key

d)

Alternate key

52.

(a)   SQL command used to destroy the table named ‘STUDENT ‘.

53.

Write SQL command to create the given table.

4 lines
54.

Write the SQL command to change the datatype of the column SubjectName form char(10) to varchar(50).

4 lines
55.

A database is a tool whose purpose is to collect and organize information.

a)

False

b)

True

c)

Using Excel is preferred

d)

Text files are also worth for this

56.

What is a table?

a)

grid made up of rows and columns used to store information.

b)

collection of information that is stored on a computer.

c)

sheet that has controls that are used to view and enter information

d)

group of information about a person, thing, or event.

57.
What is Database Management System?
a)
A software system that enables users to access to the database.
b)
A software system that enables users to create  access to the database.
c)
A software system that enables users to define, create, maintain and control access to the database.
d)
  A software system that enables users to maintain and control access to the database.
58.

(a)   means duplication of data

59.

____________ are known as rows and _______ are known as columns

(a)  

60.

______________ is named collection of data items which represents a complete unit of information.

a)

Field

b)

Record

c)

Table

d)

Data base

61.

_____________ is a key uniquely identifies a record in a table.

a)

Primary key

b)

candidate key

c)

Alternate key

62.

A collection of related data.

a)

Information

b)

Valuable information

c)

Database

d)

Metadata

63.

Which name must be unique within a database ?

a)

Table

b)

Field

c)

Record

d)

Character

64.

Column header is refer as

a)

Table

b)

Relation

c)

Attributes

d)

Domain

65.

Expand DBMS...

a)

Data base machine system

b)

Data basic machine system

c)

Data basically mode system

d)

Data base management system

66.

Using which word allows you to specify that more than one condition must be met in a query?

a)

Also

b)

And

c)

Or

d)

Where