πŸ—„οΈ

Database Management System MCQs

749+ questions with answers

1

A relational database consists of a collection of

a Tables
b Fields
c Records
d Keys
Medium
View Details β†’
2

A ________ in a table represents a relationship among a set of values.

a Column
b Key
c Row
d Entry
Medium
View Details β†’
3

The term _______ is used to refer to a row.

a Attribute
b Tuple
c Field
d Instance
Medium
View Details β†’
4

The term attribute refers to a ___________ of a table.

a Record
b Column
c Tuple
d Key
Medium
View Details β†’
5

For each attribute of a relation, there is a set of permitted values, called the ________ of that attribute.

a Domain
b Relation
c Set
d Schema
Medium
View Details β†’
6

Database __________ which is the logical design of the database, and the database _______ which is a snapshot of the data in the database at a given instant in time.

a Instance, Schema
b Relation, Schema
c Relation, Domain
d Schema, Instance
Medium
View Details β†’
7

Department (dept name, building, budget) and Employee (employee_id, name, dept name, salary) Here the dept_name attribute appears in both the relations. Here using common attributes in relation schema is one way of relating ___________ relations.

a Attributes of common
b Tuple of common
c Tuple of distinct
d Attributes of distinct
Medium
View Details β†’
8

A domain is atomic if elements of the domain are considered to be ____________ units.

a Different
b Indivisbile
c Constant
d Divisible
Medium
View Details β†’
9

The tuples of the relations can be of ________ order.

a Any
b Same
c Sorted
d Constant
Medium
View Details β†’
10

Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?

a Candidate key
b Sub key
c Super key
d Foreign key
Medium
View Details β†’
11

Consider attributes ID, CITY and NAME. Which one of this can be considered as a super key?

a NAME
b ID
c CITY
d CITY, ID
Medium
View Details β†’
12

The subset of a super key is a candidate key under what condition?

a No proper subset is a super key
b All subsets are super keys
c Subset is a super key
d Each subset is a super key
Medium
View Details β†’
13

A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.

a Rows
b Key
c Attribute
d Fields
Medium
View Details β†’
14

Which one of the following attribute can be taken as a primary key?

a Name
b Street
c Id
d Department
Medium
View Details β†’
15

Which one of the following cannot be taken as a primary key?

a Id
b Register number
c Dept_id
d Street
Medium
View Details β†’
16

The relation with the attribute which is the primary key is referenced in another relation. The relation which has the attribute as a primary key is called ______________

a Referential relation
b Referencing relation
c Referenced relation
d Referred relation
Medium
View Details β†’
17

The ______ is the one in which the primary key of one relation is used as a normal attribute in another relation.

a Referential relation
b Referencing relation
c Referenced relation
d Referred relation
Medium
View Details β†’
18

A _________ integrity constraint requires that the values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation.

a Referential
b Referencing
c Specific
d Primary
Medium
View Details β†’
19

Using which language can a user request information from a database?

a Query
b Relational
c Structural
d Compiler
Medium
View Details β†’
20

Student(ID, name, dept name, tot_cred) In this query which attributes form the primary key?

a Name
b Dept
c Tot_cred
d ID
Medium
View Details β†’
21

Which one of the following is a procedural language?

a Domain relational calculus
b Tuple relational calculus
c Relational algebra
d Query language
Medium
View Details β†’
22

The_____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.

a Select
b Join
c Union
d Intersection
Medium
View Details β†’
23

The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match.

a Join
b Cartesian product
c Intersection
d Set difference
Medium
View Details β†’
24

The _______operation performs a set union of two β€œsimilarly structured” tables

a Union
b Join
c Product
d Intersect
Medium
View Details β†’
25

The _______ operator takes the results of two queries and returns only rows that appear in both result sets.

a Union
b Intersect
c Difference
d Projection
Medium
View Details β†’
26

A ________ is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys.

a Schema diagram
b Relational algebra
c Database diagram
d Schema flow
Medium
View Details β†’
27

The _________ provides a set of operations that take one or more relations as input and return a relation as an output.

a Schematic representation
b Relational algebra
c Scheme diagram
d Relation flow
Medium
View Details β†’
28

Which one of the following is used to define the structure of the relation, deleting relations and relating schemas?

a DML(Data Manipulation Langauge)
b DDL(Data Definition Langauge)
c Query
d Relational Schema
Medium
View Details β†’
29

Which one of the following provides the ability to query information from the database and to insert tuples into, delete tuples from, and modify tuples in the database?

a DML(Data Manipulation Langauge)
b DDL(Data Definition Langauge)
c Query
d Relational Schema
Medium
View Details β†’
30

The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character.

a Fixed, equal
b Equal, variable
c Fixed, variable
d Variable, equal
Medium
View Details β†’
31

An attribute A of datatype varchar(20) has the value β€œAvi”. The attribute B of datatype char(20) has value ”Reed”. Here attribute A has ____ spaces and attribute B has ____ spaces.

a 3, 20
b 20, 4
c 20, 20
d 3, 4
Medium
View Details β†’
32

Updates that violate __________ are disallowed.

a Integrity constraints
b Transaction control
c Authorization
d DDL constraints
Medium
View Details β†’
33

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
Medium
View Details β†’
34

The query given below will not give an error. Which one of the following has to be replaced to get the desired output? SELECT ID, name, dept name, salary * 1.1 WHERE instructor;

a Salary*1.1
b ID
c Where
d Instructor
Medium
View Details β†’
35

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

a Where
b Select
c From
d Distinct
Medium
View Details β†’
36

This Query can be replaced by which one of the following? SELECT name, course_id FROM instructor, teaches WHERE instructor_ID= teaches_ID;

a Select name,course_id from teaches,instructor where instructor_id=course_id;
b Select name, course_id from instructor natural join teaches;
c Select name, course_id from instructor;
d Select course_id from instructor join teaches;
Medium
View Details β†’
37

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’;
Medium
View Details β†’
38

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
Medium
View Details β†’
39

’_ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of at ______ three characters.

a Atleast, Exactly
b Exactly, Atleast
c Atleast, All
d All, Exactly
Medium
View Details β†’
40

In SQL the spaces at the end of the string are removed by _______ function.

a Upper
b String
c Trim
d Lower
Medium
View Details β†’
41

_____ operator is used for appending two strings.

a &
b %
c ||
d _
Medium
View Details β†’
42

The intersection operator is used to get the _____ tuples.

a Different
b Common
c All
d Repeating
Medium
View Details β†’
43

The union operation automatically __________ unlike the select clause.

a Adds tuples
b Eliminates unique tuples
c Adds common tuples
d Eliminates duplicate
Medium
View Details β†’
44

If we want to retain all duplicates, we must write ________ in place of union.

a Union all
b Union some
c Intersect all
d Intersect some
Medium
View Details β†’
45

The number of attributes in relation is called as its

a Cardinality
b Degree
c Tuples
d Entity
Medium
View Details β†’
46

_____ clause is an additional filter that is applied to the result.

a Select
b Group-by
c Having
d Order by
Medium
View Details β†’
47

_________ joins are SQL server default

a Outer
b Inner
c Equi
d None of the mentioned
Medium
View Details β†’
48

The _____________ is essentially used to search for patterns in target string.

a Like Predicate
b Null Predicate
c In Predicate
d Out Predicate
Medium
View Details β†’
49

A _____ indicates an absent value that may exist but be unknown or that may not exist at all.

a Empty tuple
b New value
c Null value
d Old value
Medium
View Details β†’
50

If the attribute phone number is included in the relation all the values need not be entered into the phone number column. This type of entry is given as

a 0
b –
c Null
d Empty space
Medium
View Details β†’