wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL and Software Engineering Quiz

Total questions: 69

Worksheet time: 2hrs 18mins

Name
Class
Date
1.

Which language is used to manage relational databases?

a)

HTML

b)

SQL

c)

CSS

d)

XML

2.

What does DDL stand for in SQL?

a)

Data Derivation Language

b)

Data Definition Language

c)

Data Dynamic Language

d)

Data Description Language

3.

Which SQL command is used to remove rows from a table?

a)

REMOVE

b)

DELETE

c)

ERASE

d)

CLEAR

4.

A primary key must be:

a)

Null

b)

Unique and not null

c)

Duplicate

d)

Optional

5.

Which key establishes relationship between tables?

a)

Primary key

b)

Unique key

c)

Foreign key

d)

Alternate key

6.

Which SQL clause groups rows that have the same values?

a)

ORDER BY

b)

GROUP BY

c)

SORT BY

d)

COLLECT

7.

Which function returns the number of rows?

a)

COUNT()

b)

SUM()

c)

AVG()

d)

LENGTH()

8.

Which keyword joins rows from multiple tables?

a)

UNION

b)

JOIN

c)

CONNECT

d)

LINK

9.

Normalization aims to:

a)

Increase redundancy

b)

Remove redundancy

c)

Add tables

d)

Remove tables

10.

Which normal form removes partial dependency?

a)

1NF

b)

2NF

c)

3NF

d)

BCNF

11.

In SQL, which command removes table structure permanently?

a)

DELETE

b)

REMOVE

c)

DROP

d)

TRUNCATE

12.

ACID properties in database ensure:

a)

Speed

b)

Cost

c)

Size

d)

Reliable transactions

13.

Which command is used to create indexes?

a)

MAKE INDEX

b)

BUILD INDEX

c)

CREATE INDEX

d)

ADD INDEX

14.

Which is a NoSQL database?

a)

MySQL

b)

PostgreSQL

c)

MongoDB

d)

Oracle

15.

Which JOIN returns matching rows and non-matching rows with NULLs?

a)

INNER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

FULL OUTER JOIN

16.

The foreign key must refer to:

a)

Unique key

b)

Primary key in another table

c)

Index

d)

Any column

17.

What is denormalization?

a)

Normalizing data

b)

Removing tables

c)

Adding redundancy to improve performance

d)

Removing redundancy

18.

Which data type stores large text in SQL?

a)

VARCHAR

b)

TEXT

c)

INT

d)

CHAR

19.

Which command grants privileges?

a)

ALLOW

b)

GRANT

c)

PERMIT

d)

GIVE

20.

Which of these is a transaction control command?

a)

COMMIT

b)

SELECT

c)

INSERT

d)

CREATE

21.

Which isolation level prevents dirty reads?

a)

Read Uncommitted

b)

Read Committed

c)

Repeatable Read

d)

Serializable

22.

Which SQL function finds the highest value?

a)

MIN()

b)

COUNT()

c)

AVG()

d)

MAX()

23.

Which operator is used for pattern matching?

a)

BETWEEN

b)

IN

c)

LIKE

d)

EQUALS

24.

Which clause filters aggregated results?

a)

WHERE

b)

ORDER BY

c)

GROUP BY

d)

HAVING

25.

Which term describes data duplication?

a)

Consistency

b)

Redundancy

c)

Integrity

d)

Isolation

26.

Which model uses objects to represent data?

a)

Relational model

b)

Hierarchical model

c)

Object-oriented model

d)

Network model

27.

Which database architecture is scalable and distributed?

a)

RDBMS

b)

Flat file

c)

NoSQL

d)

Hierarchical

28.

Which index type stores sorted data?

a)

Hash index

b)

B-Tree

c)

Bitmap

d)

Skip list

29.

Which key uniquely identifies rows in a table but is not the primary key?

a)

Foreign key

b)

Composite key

c)

Candidate key

d)

Alternate key

30.

SQL injection is related to:

a)

Performance tuning

b)

Indexing

c)

Security vulnerability

d)

Data modeling

31.

Which command removes all rows but keeps the structure?

a)

DELETE

b)

DROP

c)

TRUNCATE

d)

CLEAR

32.

In ER diagrams, relationships are represented by:

a)

Ovals

b)

Rectangles

c)

Diamonds

d)

Lines

33.

Which type of join returns rows when there is at least one match?

a)

INNER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

CROSS JOIN

34.

Which SQL constraint ensures unique values?

a)

CHECK

b)

NOT NULL

c)

UNIQUE

d)

DEFAULT

35.

What is the default sorting order in ORDER BY?

a)

Ascending

b)

Descending

c)

Random

d)

None

36.

Which term describes the correctness of data?

a)

Redundancy

b)

Integrity

c)

Isolation

d)

Durability

37.

Data dictionary stores:

a)

User passwords

b)

Metadata about database objects

c)

Actual data

d)

Queries

38.

Which statement is true about views?

a)

They store data

b)

They store queries, not data

c)

They are indexes

d)

They are keys

39.

Which normal form removes transitive dependency?

a)

1NF

b)

2NF

c)

3NF

d)

BCNF

40.

A composite key is made up of:

a)

One column

b)

Two or more columns

c)

Indexes

d)

Constraints

41.

A trigger in SQL is:

a)

Index

b)

View

c)

Procedure that runs automatically

d)

Backup

42.

What is RAID in databases?

a)

Query language

b)

Transaction model

c)

Data storage technology

d)

Normal form

43.

SQL command to rename a table:

a)

CHANGE TABLE

b)

MODIFY TABLE

c)

RENAME TABLE

d)

ALTER TABLE

44.

Which command rolls back a transaction?

a)

COMMIT

b)

ROLLBACK

c)

END

d)

UNDO

45.

A star schema is used in:

a)

OLTP

b)

Data warehousing

c)

ER modeling

d)

Normalization

46.

Deadlock occurs when:

a)

Data is redundant

b)

Indexes are missing

c)

Two transactions wait for each other

d)

Query is slow

47.

SQL constraint to check a condition:

a)

UNIQUE

b)

PRIMARY KEY

c)

CHECK

d)

INDEX

48.

Which stores historical data?

a)

OLTP system

b)

OLAP system

c)

Normalized DB

d)

NoSQL

49.

Which is an in-memory database?

a)

Oracle

b)

MySQL

c)

Redis

d)

PostgreSQL

50.

What is a cursor?

a)

Key

b)

Control structure for row traversal

c)

Trigger

d)

View

51.

BCNF is stricter than:

a)

1NF

b)

2NF

c)

3NF

d)

4NF

52.

Which allows duplicate values?

a)

PRIMARY KEY

b)

UNIQUE

c)

FOREIGN KEY

d)

NOT NULL

53.

Which database uses key-value pairs?

a)

RDBMS

b)

NoSQL

c)

Hierarchical

d)

Network

54.

Savepoint is used for:

a)

Backups

b)

Partial transaction rollback

c)

Indexing

d)

Joins

55.

CAP theorem includes:

a)

Count, Aggregate, Project

b)

Consistency, Availability, Partition tolerance

c)

Create, Alter, Protect

d)

Cache, Apply, Purge

56.

In ER model, attributes are shown as:

a)

Rectangles

b)

Ovals

c)

Diamonds

d)

Arrows

57.

Temporal database handles:

a)

Text

b)

Time-related data

c)

Multimedia

d)

Big data

58.

What does DML stand for?

a)

Data Markup Language

b)

Data Manipulation Language

c)

Database Machine Language

d)

Data Mapping Language

59.

Which index is faster for equality search?

a)

Hash index

b)

B-tree

c)

Bitmap

d)

Cluster

60.

Cardinality refers to:

a)

Table size

b)

Number of rows

c)

Column type

d)

Key type

61.

Which is NOT a DDL command?

a)

SELECT

b)

CREATE

c)

ALTER

d)

DROP

62.

A surrogate key is:

a)

Natural attribute

b)

System-generated key

c)

Foreign key

d)

Composite key

63.

Which operator combines results with duplicates removed?

a)

JOIN

b)

UNION ALL

c)

UNION

d)

INTERSECT

64.

Referential integrity ensures:

a)

No duplicate keys

b)

Valid foreign keys

c)

Fast queries

d)

No nulls

65.

Clustered index:

a)

Sorts and stores rows

b)

Only sorts rows

c)

Only stores rows

d)

Is same as primary key

66.

Which is a columnar storage database?

a)

MySQL

b)

MongoDB

c)

Apache Cassandra

d)

Redis

67.

Log-based recovery uses:

a)

Index files

b)

Backup files

c)

Transaction logs

d)

Views

68.

Software engineering is the application of engineering to the development of:

a)

Hardware

b)

Software

c)

Networks

d)

Databases

69.

SDLC stands for:

a)

Software Data Level Control

b)

Software Development Life Cycle

c)

System Design Level Cycle

d)

Software Deployment Life Cycle