wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Pre-Assessment | DBMS | FT Batch 3 | Prof. Kiran Kumar K V

Total questions: 50

Worksheet time: 33mins

Name
Class
Date
1.

A Database Management System (DBMS) is

a)

Collection of interrelated data

b)

Collection of programs to access data

c)

Collection of data describing one particular enterprise

d)

All of the above

2.

Which of the following is a Data Model?

a)

Entity-Relationship model

b)

Relational data model

c)

Object-Based data model

d)

All of the above

3.

Which of the following is not involved in DBMS?

a)

End Users

b)

Data

c)

Application Request

d)

HTML

4.

Consider attributes ID, CITY and NAME. which one of these can be considered as a primary key?

a)

NAME

b)

ID

c)

CITY

d)

ID, NAME

5.

This is an example of ________________

a)

Data inconsistency

b)

Data redundancy

c)

Data security

d)

Data consistency

6.

A field of one table which is also a the primary key of another table

a)

Primary Key

b)

Relational database

c)

Data normalisation

d)

Foreign Key

7.

Select the DBMS software

a)
b)
c)
d)
8.

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

SELECT ________ dept_name FROM instructor;

a)

All

b)

From

c)

Distinct

d)

Name

9.

SELECT * FROM employee WHERE salary>10000 AND dept_id=101;

Which of the following fields are displayed as output?

a)

Salary, dept_id

b)

Employee

c)

Salary

d)

All the field of employee relation

10.

Drop table statement

a)

deletes the table structure only

b)

deletes the table structure along with the table data

c)

works whether or not referential integrity constraints would be violated

d)

is not an SQL statement

11.

In a relational schema, what is a foreign key?

a)

A key that uniquely identifies a record in a table

b)

A key that is used for encryption

c)

A reference to a primary key in another table

d)

A key that allows null values

12.

What is the purpose of the SELECT operation in relational algebra?

a)

Combine rows from different tables

b)

Filter rows based on a condition

c)

Add new records to a table

d)

Sort the table in ascending order

13.

What is a database schema?

a)

A visual representation of database tables

b)

A set of rules for database normalization

c)

A collection of database objects, including tables and relationships

d)

A database backup file

14.

What is the significance of primary keys in the relational model?

a)

They uniquely identify a record in a table

b)

They allow null values in a table

c)

They are used for encryption

d)

They define the physical storage structure of the database

15.

Which of the following is NOT a type of database relationship?

a)

One-to-One

b)

One-to-Many

c)

Many-to-Many

d)

One-to-None

16.

The following are the functions of a DBMS except

a)

Creating database

b)

Processing data

c)

Creating and processing forms

d)

Administrating database

17.

The term _____ is used to refer a row

a)

Record

b)

Primary key

c)

Foreign key

d)

Field

18.

If you were collecting and storing information about your music collection, an album would be considered a/an _______

a)

Relation

b)

Instance

c)

Entity

d)

Attribute

19.

A SELECT command without a WHERE clause returns ?

a)

All records from a table that match the previous WHERE clause

b)

All the records from a table , or information about all the records.

c)

SELECT is invalid without a Where clause

d)

Nothing

20.

The USE command ?

a)

Is used to load code from another file

b)

Has been deprecated and should be avoided for security reasons.

c)

Is a pseudo name for the SELECT command

d)

Should be used to choose the database you want to use once you've connected to MySQL.

21.

Which one will delete the table data as well as table structure?

a)

DELETE

b)

DROP

22.

MySQL runs on which operating systems ?

a)

Linux and Mac OS-X only

b)

Any operating system at all

c)

Unix , Linux , Windows and others

d)

Unix and Linux only

23.

What SQL clause is used to restrict the rows returned by a query ?

a)

WHEN

b)

HAVING

c)

FROM

d)

WHERE

24.

4.The …… systems were known as predecessor of database system.

a)

a) Folder

b)

b) File

c)

c) Application

d)

d) memory

25.

10. Communication is established with MySQL using

a)

a) SQL

b)

b) Network calls

c)

c) Java

d)

d) API’s

26.

9. Which command is used to permanently save into database?

a)

a) SAVE POINT

b)

b) COMMIT

c)

c) ROLLBACK

d)

d) SET

27.

Full form of API

a)

Application Process Interchange

b)

Application Programs Interchange

c)

Application Process Interface

d)

Application Programming Interface

28.

import mysql.connector as mys


mydb = mys.connect( host="localhost", user="root",

password="root"

)


mycursor = mydb.cursor()


mycursor.execute("CREATE DATABASE KVSEC3")

AFTER EXECUTING THE ABOVE CODE. What will be done

(a)  

29.

To display all the databases of MySQL with the help of cursor mycursor , command will be

a)

mycursor.execute("SHOW DATABASES")

b)

mycursor.execute("DESC DATABASES")

c)

mycursor.executes("SHOW DATABASES")

d)

mycursor.execute("SHOW ALL DATABASES")

30.

What will be returned by the given query?

SELECT round(153.669, 2);

a)

153.6

b)

153.66

c)

153.67

d)

153.7

31.

What will be returned by the given query?

SELECT INSTR("INDIA", "DI");

a)

2

b)

3

c)

-2

d)

-3

32.

Which of the following is not a date function?

a)

Month

b)

Year

c)

Now

d)

Pow

33.

What will be printed by the given query?

SELECT LENGTH( " INFORMATICS PRACTICES");

a)

21

b)

22

c)

23

d)

24

34.

What will be returned by the given query?

SELECT month('2020-05-11');

a)

5

b)

11

c)

May

d)

November

35.

Fill in the blank:

(a)   this clause is used with GROUP BY to filter the group of records.

36.

Choose the correct query

a)

SELECT * FROM EMP WHERE NAME=NULL

b)

SELECT * FROM EMP WHERE NAME IS NULL;

c)

SELECT FROM EMP WHERE NAME IS NULL;

d)

SELECT *FROM EMP WHERE NAME IS 'NULL';

37.
Return all dramas made after 2004.
a)
SELECT * FROM movies WHERE genre = 'drama';
b)
SELECT * FROM movies WHERE genre = 'drama' AND year > 2004;
c)
SELECT * FROM movies WHERE genre = "drama' AND year < 2004;
d)
SELECT * FROM movies WHERE imdb_rating = 7 AND LIMIT = 7
38.


Which of the following SELECT query returns the department number with maximum salary compensated to an employee? (Consider the table structure as given)

a)

SELECT department_id , max(salary ) FROM employees ;

b)

SELECT department_id , max(salary ) FROM employees GROUP BY department_id ;

c)

SELECT max(salary ) FROM employees GROUP BY department_id ;

d)

SELECT max(salary ) FROM employees ;

39.

A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (*) FROM t_count;
a)

12

b)

6

c)

9

d)

Throws exception because COUNT function doesn't works with NULL values

40.

What is true of using group functions on columns that contain NULL values?

a)

Group functions on columns ignore NULL values.

b)

Group functions on columns returning dates include NULL values.

c)

Group functions on columns returning numbers include NULL values.

d)

Group functions on columns cannot be accurately used on columns that contain NULL values.

41.

Predict the outcome of the below query

SELECT department_id , COUNT(first_name )
FROM employees 
WHERE job IN ('SALESMAN','CLERK','MANAGER','ANALYST')
GROUP BY department_id 
HAVING AVG(salary ) BETWEEN 2000 AND 3000;
a)

It returns an error because the BETWEEN operator cannot be used in the HAVING clause.

b)

It returns an error because WHERE and HAVING clauses cannot be used in the same SELECT statement.

c)

It returns an error because WHERE and HAVING clauses cannot be used to apply conditions on the same column.

d)

It executes successfully.

42.

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

43.

SQL query to find all the cities whose humidity is 95.

a)

SELECT city WHERE humidity = 95

b)

SELECT city FROM weather WHERE humidity = 95

c)

SELECT humidity = 89 FROM weather

d)

SELECT city FROM weather

44.

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%’

45.

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')

46.

Where does the CREATE Command belong?

a)

DML

b)

DDL

c)

DCL

47.

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

a)

DISPLAY

b)

STRUCTURE

c)

WHERE

d)

SELECT

48.

______________ constraint prevents NULL values

a)

UNIQUE

b)

NOT NULL

c)

NULL

d)

FOREIGN KEY

49.

Which clause is used when we want to use aggregate functions in conditions?

a)

Where

b)

Group By

c)

Having

d)

Both 2 and 3

50.

basierend auf folgender Tabelle

was ist das Ergebnis für folgendes SQL statement?

SELECT * FROM game WHERE Name LIKE '%g';

a)

The Last of Us Part 2,Halo Invinite

b)

Resident Evil 3,Animal Crossing

c)

Animal Crossing

d)

Watchdogs 3