top of page

Placement Preparation Questions

Placement Preparation questions are free resources offered by mobiprep that can help you ace any company placement process. We have curated a list of the most important MCQ questions which are asked in most companies such as Infosys, TCS, Wipro, Accenture, etc. The placement preparation questions also have detailed explanations for every question ensuring you revise all the questions with detailed answers and explanations.

Q

1

The domain of an attribute in a relation is

a.

The Relationship between the attributes

b.

set of values that can uniquely identify each tuple of a relation

c.

The set of all permitted values of that attribute

d.

Property of an entity set

Correct Answer & Explanation:

c

The domain of an attribute is the set of all values permitted for that attribute. It defines the range of values that an attribute in a relation can take. It is used to constrain the values of an attribute to ensure data integrity.

Q

2

The logical structure or blueprint of the database is called

a.

Index

b.

Relational model

c.

Database Schema

d.

Database diagram

Correct Answer & Explanation:

c

The database schema explains the construction and structure of the database. It contains the information about the tables, indexes, views, etc., in a databse. So, the correct answer is Database Schema

Q

3

The COLLATE operator in SQL is used to

a.

change the data type of an attribute

b.

sort the data in the table according to the specified collation

c.

combine all the data in a table and store it in a file

d.

sort the tuples in a relation in alphabetical order

Correct Answer & Explanation:

b

The set of rules used to compare the characters or strings in a database is called collation. The COLLATE clause in SQL is used to sort the strings according to the specified collation.

Q

4

An enum field can take how many different values at the maximum?

a.

1024

b.

65536

c.

255

d.

65535

Correct Answer & Explanation:

d

The enum field is used to encode strings as numbers. An enum field can have 65535 different elements at the maximum.

Q

5

Which SQL statement is used to remove all the tuples from a relation?

a.

DROP

b.

REMOVE

c.

TRUNCATE

d.

All the above

Correct Answer & Explanation:

c

DROP statement deletes the entire table irrevocably.
TRUNCATE is a DDL statement that is used to delete all the tuples in the table, preserving the structure of the table.

Q

6

Which of the following statements can be used to get a name which starts with ‘D’ and ends with ‘i’ using LIKE clause in SQL?

a.

LIKE ‘^d_i&’

b.

LIKE ‘d%i’

c.

LIKE ‘&d%i’

d.

LIKE ‘_d_i’

Correct Answer & Explanation:

b

The SQL LIKE operator is used to search for a specific pattern in a string.
% represents one or more characters.
_ represents a single character.
So, the correct answer is LIKE ‘d%i’. Because, it represents the pattern which starts with ‘d’, has one or more characters in between and ends with ‘i’.

Q

7

A relation is in 3NF if

a.

Every non-prime attribute is functionally dependent on the primary key

b.

Every prime attribute is functionally dependent on a non-prime attribute

c.

Some non-prime attributes are functionally dependent on the primary key

d.

If all the functional dependencies have a super key on their right side

Correct Answer & Explanation:

a

The third normal form removes transitive dependency from the table. For a relation to satisfy 3NF, either LHS should be a super key or RHS should be prime attribute in every FD of the relation.

Q

8

The data which provides data about the database is called

a.

Index

b.

Metadata

c.

Schema

d.

File

Correct Answer & Explanation:

b

Metadata contains the information about the data organization, files, tables etc., in the database. Data about the database is called Metadata. Hence, the correct answer is ‘metadata’.

Q

9

Two attributes are functionally dependent if and only if

a.

Together they constitute a composite key

b.

The relation is in third normal form

c.

Together they constitute a foreign key.

d.

Value in one column determines the value of the other column

Correct Answer & Explanation:

a

Certain functional dependencies can be proved to hold on the schema using the given set of functional dependencies. Hence, two attributes that are functionally dependent, form a composite key for the relation.

Q

10

A relation that is designed from an E-R diagram will be in _____ normal form.

a.

First

b.

Second

c.

Third

d.

Fourth

Correct Answer & Explanation:

c

When a relation is designed from an E-R diagram, the relation will be in 3NF.

bottom of page