You are on page 1of 448

FOR ALL SANFOUNDRY MCQ (1000+ MCQ)

JOIN telegram group >> https://t.me/edcsppu


Database Questions and Answers – Relational
Database and Database Schema
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Relational
Database and Database Schema”.

1. A relational database consists of a collection of


a) Tables
b) Fields
c) Records
d) Keys
View Answer

Answer: a
Explanation: Fields are the column of the relation or tables. Records are each row in a relation.
Keys are the constraints in a relation.
advertisement

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


a) Column
b) Key
c) Row
d) Entry
View Answer

Answer: c
Explanation: Column has only one set of values. Keys are constraints and row is one whole set
of attributes. Entry is just a piece of data.

3. The term _______ is used to refer to a row.


a) Attribute
b) Tuple
c) Field
d) Instance
View Answer

Answer: b
Explanation: Tuple is one entry of the relation with several attributes which are fields.

4. The term attribute refers to a ___________ of a table.


a) Record
b) Column
c) Tuple
d) Key
View Answer

Answer: b
Explanation: Attribute is a specific domain in the relation which has entries of all tuples.
advertisement

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
View Answer

Answer: a
Explanation: The values of the attribute should be present in the domain. Domain is a set of
values permitted.

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
View Answer

Answer: d
Explanation: Instance is an instance of time and schema is a representation.

7. Course(course_id,sec_id,semester)
Here the course_id,sec_id and semester are __________ and course is a _________
a) Relations, Attribute
b) Attributes, Relation
c) Tuple, Relation
d) Tuple, Attributes
View Answer

Answer: b
Explanation: The relation course has a set of attributes course_id,sec_id,semester .
advertisement

8. 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
View Answer

Answer: c
Explanation: Here the relations are connected by the common attributes.

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


a) Different
b) Indivisbile
c) Constant
d) Divisible
View Answer

Answer: b
Explanation: None.

10. The tuples of the relations can be of ________ order.


a) Any
b) Same
c) Sorted
d) Constant
View Answer

Answer: a
Explanation: The values only count. The order of the tuples does not matter.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
» Next - Database Questions and Answers – Keys
Categories Database MCQsPost navigation
Best Reference Books – Computer Programming and Algorithms
Database Questions and Answers – Keys
advertisement
advertisement

Recommended Posts:

1. VHDL Questions and Answers


2. RDBMS Questions and Answers
3. MongoDB Questions and Answers
4. Information Science Questions and Answers
5. Computer Science Questions and Answers
6. Information Technology Questions and Answers
7. Spring Questions and Answers
8. Recruitment Support Service – Employers
9. Compilers Questions and Answers
10. Cloud Computing Questions and Answers
11. Master of Computer Applications Questions and Answers
12. Bachelor of Computer Applications Questions and Answers
13. Software Architecture & Design Questions and Answers
14. Discrete Mathematics Questions and Answers
15. Statistical Quality Control Questions and Answers
16. SAN – Storage Area Networks Questions & Answers
17. SQL Server Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Keys


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Keys”.

1. 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
View Answer

Answer: c
Explanation: Super key is the superset of all the keys in a relation.
advertisement

2. 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
View Answer

Answer: b
Explanation: Here the id is the only attribute which can be taken as a key. Other attributes are
not uniquely identified.
3. 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
View Answer

Answer: a
Explanation: The subset of a set cannot be the same set. Candidate key is a set from a super key
which cannot be the whole of the super set.

4. 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
View Answer

Answer: b
Explanation: Key is the constraint which specifies uniqueness.
advertisement

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


a) Name
b) Street
c) Id
d) Department
View Answer

Answer: c
Explanation: The attributes name, street and department can repeat for some tuples. But the id
attribute has to be unique. So it forms a primary key.

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


a) Id
b) Register number
c) Dept_id
d) Street
View Answer

Answer: d
Explanation: Street is the only attribute which can occur more than once.

7. An attribute in a relation is a foreign key if the _______ key from one relation is used as an
attribute in that relation.
a) Candidate
b) Primary
c) Super
d) Sub
View Answer

Answer: b
Explanation: The primary key has to be referred in the other relation to form a foreign key in
that relation.
advertisement

8. 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
View Answer

Answer: c
Explanation: None.

9. 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
View Answer

Answer: c
Explanation: None.

10. 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
View Answer

Answer: a
Explanation: A relation, say r1, may include among its attributes the primary key of another
relation, say r2. This attribute is called a foreign key from r1, referencing r2. The relation r1 is
also called the referencing relation of the foreign key dependency, and r2 is called the referenced
relation of the foreign key.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Relational Database and Database Schema
» Next - Database Questions and Answers – Relational Query Operations and Relational
Operators
Categories Database MCQsPost navigation
Database Questions and Answers – Relational Database and Database Schema
Database Questions and Answers – Relational Query Operations and Relational Operators
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Inheritance


2. JUnit Questions and Answers
3. Cloud Computing Questions and Answers
4. Statistical Quality Control Questions and Answers
5. Software Architecture & Design Questions and Answers
6. Java Programming Examples on Classes
7. C# Programming Examples on Data Structures
8. Home
9. Database Management System Questions and Answers
10. MySQL Database Questions and Answers
11. Oracle Database Questions and Answers
12. MySQL Questions and Answers – Foreign Keys and Referential Integrity
13. Database Questions and Answers – Multivalued Dependencies
14. Database Questions and Answers – Querying Database – 4
15. Database Questions and Answers – Reduction to Relational Schemas
16. Database Questions and Answers – Relational Query Operations and Relational
Operators
17. Database Questions and Answers – Algorithms for Decomposition
18. Database Questions & Answers – Normal Forms
19. Oracle Database Questions and Answers – Normalization
20. Database Questions and Answers – Constraints
advertisement

Database Questions and Answers – Relational


Query Operations and Relational Operators
« Prev
Next »

This set of Database MCQs focuses on “Relational Query Operations and Relational Operators”.

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


a) Query
b) Relational
c) Structural
d) Compiler
View Answer

Answer: a
Explanation: Query language is a method through which the database entries can be accessed.
advertisement

2. 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
View Answer

Answer: d
Explanation: The attributes name, dept and tot_cred can have same values unlike ID.

3. Which one of the following is a procedural language?


a) Domain relational calculus
b) Tuple relational calculus
c) Relational algebra
d) Query language
View Answer

Answer: c
Explanation: Domain and Tuple relational calculus are non-procedural language. Query
language is a method through which database entries can be accessed.

4. 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
View Answer

Answer: b
Explanation: Join finds the common tuple in the relations and combines it.
advertisement

5. 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
View Answer
Answer: b
Explanation: Cartesian product is the multiplication of all the values in the attributes.

6. The _______operation performs a set union of two “similarly structured” tables


a) Union
b) Join
c) Product
d) Intersect
View Answer

Answer: a
Explanation: Union just combines all the values of relations of same attributes.

7. The most commonly used operation in relational algebra for projecting a set of tuple from a
relation is
a) Join
b) Projection
c) Select
d) Union
View Answer

Answer: c
Explanation: Select is used to view the tuples of the relation with or without some constraints.
advertisement

8. 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
View Answer

Answer: b
Explanation: The union operator gives the result which is the union of two queries and
difference is the one where query which is not a part of second query.

9. 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
View Answer

Answer: a
Explanation: None.

10. 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
View Answer

Answer: b
Explanation: None.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice MCQs on all areas of Database, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Keys
» Next - Database Questions and Answers – SQL Basics and SQL Data Definition
Categories Database MCQsPost navigation
Database Questions and Answers – Keys
Database Questions and Answers – SQL Basics and SQL Data Definition
advertisement
advertisement

Recommended Posts:

1. Automata Theory Questions and Answers


2. Javascript Questions and Answers
3. C# Programming Examples on Functions
4. MongoDB Questions and Answers
5. Java Questions and Answers
6. C# Programming Examples on LINQ
7. C Programming Examples on Bitwise Operations
8. Heat Transfer Operations Questions and Answers
9. Simple Java Programs
10. Software Architecture & Design Questions and Answers
11. Engineering Mathematics Questions and Answers
12. Mechanical Operations Questions and Answers
13. Simple C Programs
14. Discrete Mathematics Questions and Answers
15. C# Questions and Answers
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – SQL Basics


and SQL Data Definition
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “SQL Basics
and SQL Data Definition”.

1. 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
View Answer

Answer: b
Explanation: Data Definition language is the language which performs all the operation in
defining structure of relation.
advertisement

2. 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
View Answer

Answer: a
Explanation: DML performs the change in the values of the relation.

3.
CREATE TABLE employee (name VARCHAR, id INTEGER)

What type of statement is this?


a) DML
b) DDL
c) View
d) Integrity constraint
View Answer

Answer: b
Explanation: Data Definition language is the language which performs all the operation in
defining structure of relation.
advertisement
4.
SELECT * FROM employee

What type of statement is this?


a) DML
b) DDL
c) View
d) Integrity constraint
View Answer

Answer: a
Explanation: Select operation just shows the required fields of the relation. So it forms a DML.

5. 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
View Answer

Answer: c
Explanation: Varchar changes its length accordingly whereas char has a specific length which
has to be filled by either letters or spaces.

6. 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
View Answer

Answer: a
Explanation: Varchar changes its length accordingly whereas char has a specific length which
has to be filled by either letters or spaces.
advertisement

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


a) Delete
b) Purge
c) Remove
d) Drop table
View Answer

Answer: d
Explanation: Drop table deletes the whole structure of the relation .purge removes the table
which cannot be obtained again.

8.
DELETE FROM r; //r - relation

This command performs which of the following action?


a) Remove relation
b) Clear relation entries
c) Delete fields
d) Delete rows
View Answer

Answer: b
Explanation: Delete command removes the entries in the table.

9.
advertisement
INSERT INTO instructor VALUES (10211, ’Smith’, ’Biology’, 66000);

What type of statement is this?


a) Query
b) DML
c) Relational
d) DDL
View Answer

Answer: b
Explanation: The values are manipulated. So it is a DML.

10. Updates that violate __________ are disallowed.


a) Integrity constraints
b) Transaction control
c) Authorization
d) DDL constraints
View Answer

Answer: a
Explanation: Integrity constraint has to be maintained in the entries of the relation.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Relational Query Operations and Relational
Operators
» Next - Database Questions and Answers – SQL Queries
Categories Database MCQsPost navigation
Database Questions and Answers – Relational Query Operations and Relational Operators
Database Questions and Answers – SQL Queries
advertisement
advertisement

Recommended Posts:

1. Python Programming Examples on Stacks & Queues


2. C# Programming Examples on Arrays
3. Simple Java Programs
4. Java Programming Examples on Java.Lang
5. C Programming Examples on Stacks & Queues
6. MongoDB Questions and Answers
7. C Questions and Answers
8. Data Structures & Algorithms II – Questions and Answers
9. Data Structure Questions and Answers
10. C# Questions and Answers
11. Data Science Questions and Answers
12. C++ Programming Examples on Data-Structures
13. C# Programming Examples on Data Structures
14. Java Programming Examples on Data-Structures
15. C Programming Examples on Data-Structures
16. SQL Server Questions and Answers
17. MySQL Database Questions and Answers
18. RDBMS Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – SQL Queries


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “SQL Queries”.

1.

Name
Annie
Bob
Callie
Derek
advertisement

Which of these query will display the the table given above ?
a) Select employee from name
b) Select name
c) Select name from employee
d) Select employee
View Answer

Answer: c
Explanation: The field to be displayed is included in select and the table is included in the from
clause.

2. 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
View Answer

Answer: c
Explanation: Distinct keyword selects only the entries that are unique.
advertisement

3. 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
View Answer

Answer: a
Explanation: Where selects the rows on a particular condition. From gives the relation which
involves the operation.

4. 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
View Answer

Answer: c
Explanation: Where selects the rows on a particular condition. From gives the relation which
involves the operation. Since Instructor is a relation it has to have from clause.

5. The ________ clause is used to list the attributes desired in the result of a query.
a) Where
b) Select
c) From
d) Distinct
View Answer

Answer: b
Explanation: None
advertisement

6. 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;
View Answer

Answer: b
Explanation: Join clause joins two tables by matching the common column.

7.
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
View Answer

Answer: d
Explanation: Here * is used to select all the fields of the relation.
advertisement

8.

Employee_id Name Salary


1001 Annie 6000
1009 Ross 4500
1018 Zeith 7000

This is Employee table.


Which of the following employee_id will be displayed for the given query?
SELECT * FROM employee WHERE employee_id>1009;
a) 1009, 1001, 1018
b) 1009, 1018
c) 1001
d) 1018
View Answer

Answer: d
Explanation: Greater than symbol does not include the given value unlike >=.

9. 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’;
View Answer

Answer: d
Explanation: This query do not have from clause which specifies the relation from which the
values has to be selected.

10. 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
View Answer

Answer: b
Explanation: Value keyword has to be used to insert the values into the table.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – SQL Basics and SQL Data Definition
» Next - Database Questions and Answers – Basic SQL Operations
Categories Database MCQsPost navigation
Database Questions and Answers – SQL Basics and SQL Data Definition
Database Questions and Answers – Basic SQL Operations
advertisement
advertisement
Recommended Posts:

1. Java Programming Examples on Utility Classes


2. Python Programming Examples on Searching and Sorting
3. Recruitment Support Service – Employers
4. MongoDB Questions and Answers
5. RDBMS Questions and Answers
6. C Programming Examples on File Handling
7. SQL Server Questions and Answers
8. C# Programming Examples on Networking
9. Database Management System Questions and Answers
10. C# Programming Examples on LINQ
11. Oracle Database Questions and Answers
12. MySQL Database Questions and Answers
13. SQL Server Questions and Answers – Subqueries
14. Database Questions and Answers – SQL Basics and SQL Data Definition
15. Database Questions and Answers – SQL Data Types and Schemas
16. RDBMS Questions and Answers – Modification of Database
17. Database Questions and Answers – Authorizations
18. Database Questions and Answers – Tuple Relational Calculus and Domain Relational
Calculus
19. SQL Server Questions and Answers – Aggregation of Data
20. Database Questions and Answers – Recursive Queries and Aggregation Features
advertisement

Database Questions and Answers – Basic SQL


Operations
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Basic SQL
Operations”.

1.
advertisement
SELECT name ____ instructor name, course id
FROM instructor, teaches
WHERE instructor.ID= teaches.ID;

Which keyword must be used here to rename the field name?


a) From
b) Rename
c) As
d) Join
View Answer
Answer: c
Explanation: As keyword is used to rename.

2.
SELECT * FROM employee WHERE dept_name="Comp Sci";

In the SQL given above there is an error . Identify the error.


a) Dept_name
b) Employee
c) “Comp Sci”
d) From
View Answer

Answer: c
Explanation: For any string operations single quoted(‘) must be used to enclose.

3.
advertisement
SELECT emp_name
FROM department
WHERE dept_name LIKE ’ _____ Computer Science’;

Which one of the following has to be added into the blank to select the dept_name which has
Computer Science as its ending string?
a) %
b) _
c) ||
d) $
View Answer

Answer: a
Explanation: The % character matches any substring.

4. ’_ _ _ ’ 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
View Answer

Answer: b
Explanation: None.

5.
SELECT name
FROM instructor
WHERE dept name = ’Physics’
ORDER BY name;
By default, the order by clause lists items in ______ order.
a) Descending
b) Any
c) Same
d) Ascending
View Answer

Answer: d
Explanation: Specification of descending order is essential but it not for ascending.

6.
advertisement
SELECT *
FROM instructor
ORDER BY salary ____, name ___;

To display the salary from greater to smaller and name in ascending order which of the
following options should be used?
a) Ascending, Descending
b) Asc, Desc
c) Desc, Asc
d) Descending, Ascending
View Answer

Answer: c
Explanation: None.

7.
SELECT name
FROM instructor
WHERE salary <= 100000 AND salary >= 90000;

This query can be replaced by which of the following ?


a)
SELECT name
FROM instructor
WHERE salary BETWEEN 90000 AND 100000;

b)
SELECT name
FROM employee
WHERE salary <= 90000 AND salary>=100000;

c)
advertisement
SELECT name
FROM employee
WHERE salary BETWEEN 90000 AND 100000;

d)
SELECT name
FROM instructor
WHERE salary BETWEEN 100000 AND 90000;
View Answer
Answer: a
Explanation: SQL includes a between comparison operator to simplify where clauses that
specify that a value be less than or equal to some value and greater than or equal to some other
value.

8.
SELECT instructor.*
FROM instructor, teaches
WHERE instructor.ID= teaches.ID;

This query does which of the following operation?


a) All attributes of instructor and teaches are selected
b) All attributes of instructor are selected on the given condition
c) All attributes of teaches are selected on given condition
d) Only the some attributes from instructed and teaches are selected
View Answer

Answer: b
Explanation: The asterisk symbol “ * ” can be usedin the select clause to denote “all attributes.”

9. In SQL the spaces at the end of the string are removed by _______ function.
a) Upper
b) String
c) Trim
d) Lower
View Answer

Answer: c
Explanation: The syntax of trim is Trim(s); where s-string.

10. _____ operator is used for appending two strings.


a) &
b) %
c) ||
d) _
View Answer

Answer: c
Explanation: || is the concatenation operator.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – SQL Queries
» Next - Database Questions and Answers – Set Operations
Categories Database MCQsPost navigation
Database Questions and Answers – SQL Queries
Database Questions and Answers – Set Operations
advertisement
advertisement

Recommended Posts:

1. C# Programming Examples on Functions


2. C Programming Examples on Searching and Sorting
3. Java Programming Examples on Classes
4. C Programming Examples on Strings
5. C# Programming Examples on LINQ
6. Java Programming Examples on Event Handling
7. C Programming Examples using Recursion
8. Recruitment Support Service – Employers
9. C# Programming Examples on Strings
10. C Programming Examples on Bitwise Operations
11. C# Basic Programming Examples
12. C Programming Examples on File Handling
13. C# Programming Examples on Networking
14. C Programming Examples on Arrays
15. Java Programming Examples on Arrays
16. Java Programming Examples on Utility Classes
17. C Programming Examples on Matrix
18. Database Management System Questions and Answers
19. Oracle Database Questions and Answers
20. MySQL Database Questions and Answers
advertisement

Database Questions and Answers – Set Operations


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Set
Operations”.

1. The union operation is represented by


a) ∩
b) U
c) –
d) *
View Answer

Answer: b
Explanation: Union operator combines the relations.
advertisement

2. The intersection operator is used to get the _____ tuples.


a) Different
b) Common
c) All
d) Repeating
View Answer

Answer: b
Explanation: Intersection operator ignores unique tuples and takes only common ones.

3. The union operation automatically __________ unlike the select clause.


a) Adds tuples
b) Eliminates unique tuples
c) Adds common tuples
d) Eliminates duplicate
View Answer

Answer: d
Explanation: None.

4. 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
View Answer

Answer: a
Explanation: Union all will combine all the tuples including duplicates.

5.
advertisement
(SELECT course id
FROM SECTION
WHERE semester = ’Fall’ AND YEAR= 2009)
EXCEPT
(SELECT course id
FROM SECTION
WHERE semester = ’Spring’ AND YEAR= 2010);

This query displays


a) Only tuples from second part
b) Only tuples from the first part which has the tuples from second part
c) Tuples from both the parts
d) Tuples from first part which do not have second part
View Answer

Answer: d
Explanation: Except keyword is used to ignore the values.

6. For like predicate which of the following is true.


i) % matches zero OF more characters.
ii) _ matches exactly one CHARACTER.

a) i-only
b) ii-only
c) i & ii
d) None of the mentioned
View Answer

Answer: a
Explanation:% is used with like and _ is used to fill in the character.
advertisement

7. The number of attributes in relation is called as its


a) Cardinality
b) Degree
c) Tuples
d) Entity
View Answer

Answer: b
Explanation: None.

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


a) Select
b) Group-by
c) Having
d) Order by
View Answer

Answer: c
Explanation: Having is used to provide additional aggregate filtration to the query.

9. _________ joins are SQL server default


a) Outer
b) Inner
c) Equi
d) None of the mentioned
View Answer

Answer: b
Explanation: It is optional to give the inner keyword with the join as it is default.
advertisement
10. The _____________ is essentially used to search for patterns in target string.
a) Like Predicate
b) Null Predicate
c) In Predicate
d) Out Predicate
View Answer

Answer: a
Explanation: Like predicate matches the string in the given pattern.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Basic SQL Operations
» Next - Database Questions and Answers – Null Values Operations
Categories Database MCQsPost navigation
Database Questions and Answers – Basic SQL Operations
Database Questions and Answers – Null Values Operations
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Arrays


2. Mechanical Operations Questions and Answers
3. MongoDB Questions and Answers
4. RDBMS Questions and Answers
5. C Programming Examples on Bitwise Operations
6. Python Questions and Answers
7. Simple C Programs
8. C Programming Examples on Stacks & Queues
9. SQL Server Questions and Answers
10. C# Programming Examples on LINQ
11. Heat Transfer Operations Questions and Answers
12. Python Programming Examples on Stacks & Queues
13. C++ Programming Examples on STL
14. Home
15. C# Programming Examples on Events
16. C Programming Examples on Linked List
17. Python Programming Examples on Linked Lists
18. Oracle Database Questions and Answers
19. MySQL Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Null Values


Operations
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Null Values
Operations”.

1. 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
View Answer

Answer: c
Explanation: None.
advertisement

2. 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
View Answer

Answer: c
Explanation: Null is used to represent the absence of a value.

3. The predicate in a where clause can involve Boolean operations such as and. The result of
true and unknown is_______ false and unknown is _____ while unknown and unknown is
_____
a) Unknown, unknown, false
b) True, false, unknown
c) True, unknown, unknown
d) Unknown, false, unknown
View Answer

Answer: d
Explanation: None.

4.
SELECT name
FROM instructor
WHERE salary IS NOT NULL;
Selects
a) Tuples with null value
b) Tuples with no null values
c) Tuples with any salary
d) All of the mentioned
View Answer

Answer: b
Explanation: Not null constraint removes the tpules of null values.
advertisement

5. In an employee table to include the attributes whose value always have some value which of
the following constraint must be used?
a) Null
b) Not null
c) Unique
d) Distinct
View Answer

Answer: b
Explanation: Not null constraint removes the tuples of null values.

6. Using the ______ clause retains only one copy of such identical tuples.
a) Null
b) Unique
c) Not null
d) Distinct
View Answer

Answer: d
Explanation: Unique is a constraint.

7.
advertisement
CREATE TABLE employee (id INTEGER,name VARCHAR(20),salary NOT NULL);
INSERT INTO employee VALUES (1005,Rach,0);
INSERT INTO employee VALUES (1007,Ross, );
INSERT INTO employee VALUES (1002,Joey,335);

Some of these insert statements will produce an error. Identify the statement.
a) Insert into employee values (1005,Rach,0);
b) Insert into employee values (1002,Joey,335);
c) Insert into employee values (1007,Ross, );
d) None of the mentioned
View Answer

Answer: c
Explanation: Not null constraint is specified which means sone value (can include 0 also) should
be given.

8. The primary key must be


a) Unique
b) Not null
c) Both Unique and Not null
d) Either Unique or Not null
View Answer

Answer: c
Explanation: Primary key must satisfy unique and not null condition for sure.

9. You attempt to query the database with this command:


advertisement
SELECT nvl (100 / quantity, NONE)
FROM inventory;

Why does this statement cause an error when QUANTITY values are null?
a) The expression attempts to divide by a null value
b) The data types in the conversion function are incompatible
c) The character string none should be enclosed in single quotes (‘ ‘)
d) A null value used in an expression cannot be converted to an actual value
View Answer

Answer: a
Explanation: The expression attempts to divide by a null value is erroneous in sql.

10. The result of _____unknown is unknown.


a) Xor
b) Or
c) And
d) Not
View Answer

Answer: d
Explanation: Since unknown does not hold any value the value cannot have a reverse value.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Set Operations
» Next - Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
Categories Database MCQsPost navigation
Database Questions and Answers – Set Operations
Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
advertisement
advertisement
Recommended Posts:

1. Information Science Questions and Answers


2. Information Technology Questions and Answers
3. RDBMS Questions and Answers
4. C Programming Examples on Strings
5. Master of Computer Applications Questions and Answers
6. Bachelor of Computer Applications Questions and Answers
7. Heat Transfer Operations Questions and Answers
8. Mechanical Operations Questions and Answers
9. SQL Server Questions and Answers
10. MongoDB Questions and Answers
11. C# Programming Examples on Data Structures
12. Java Programming Examples on Collections
13. C++ Questions and Answers
14. C Programming Examples on Bitwise Operations
15. Python Questions and Answers
16. C# Programming Examples on Networking
17. C Programming Examples on File Handling
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Aggregate


Functions and Nested Subqueries – 1
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Aggregate
Functions and Nested Subqueries – 1”.

1. Aggregate functions are functions that take a ___________ as input and return a single value.
a) Collection of values
b) Single value
c) Aggregate value
d) Both Collection of values & Single value
View Answer

Answer: a
Explanation: None.
advertisement

2.
SELECT __________
FROM instructor
WHERE dept name= ’Comp. Sci.’;
Which of the following should be used to find the mean of the salary ?
a) Mean(salary)
b) Avg(salary)
c) Sum(salary)
d) Count(salary)
View Answer

Answer: b
Explanation: Avg() is used to find the mean of the values.

3.
SELECT COUNT (____ ID)
FROM teaches
WHERE semester = ’Spring’ AND YEAR = 2010;

If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression.
a) Distinct
b) Count
c) Avg
d) Primary key
View Answer

Answer: a
Explanation: Distinct keyword is used to select only unique items from the relation.
advertisement

4. All aggregate functions except _____ ignore null values in their input collection.
a) Count(attribute)
b) Count(*)
c) Avg
d) Sum
View Answer

Answer: b
Explanation: * is used to select all values including null.

5. A Boolean data type that can take values true, false, and________
a) 1
b) 0
c) Null
d) Unknown
View Answer

Answer: d
Explanation: Unknown values do not take null value but it is not known.

6. The ____ connective tests for set membership, where the set is a collection of values
produced by a select clause. The ____ connective tests for the absence of set membership.
a) Or, in
b) Not in, in
c) In, not in
d) In, or
View Answer

Answer: c
Explanation: In checks, if the query has the value but not in checks if it does not have the value.

7. Which of the following should be used to find all the courses taught in the Fall 2009 semester
but not in the Spring 2010 semester .
a)
SELECT DISTINCT course id
FROM SECTION
WHERE semester = ’Fall’ AND YEAR= 2009 AND
course id NOT IN (SELECT course id
FROM SECTION
WHERE semester = ’Spring’ AND YEAR= 2010);

b)
SELECT DISTINCT course_id
FROM instructor
WHERE name NOT IN (’Fall’, ’Spring’);

c)
advertisement
(SELECT course id
FROM SECTION
WHERE semester = ’Spring’ AND YEAR= 2010)

d)
SELECT COUNT (DISTINCT ID)
FROM takes
WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR
FROM teaches
WHERE teaches.ID= 10101);
View Answer
Answer: a
Explanation: None.

8. The phrase “greater than at least one” is represented in SQL by _____


a) < all
b) < some
c) > all
d) > some
View Answer

Answer: d
Explanation: >some takes atlest one value above it .
9. Which of the following is used to find all courses taught in both the Fall 2009 semester and in
the Spring 2010 semester .
a)
SELECT course id
FROM SECTION AS S
WHERE semester = ’Fall’ AND YEAR= 2009 AND
EXISTS (SELECT *
FROM SECTION AS T
WHERE semester = ’Spring’ AND YEAR= 2010 AND
S.course id= T.course id);

b)
advertisement
SELECT name
FROM instructor
WHERE salary > SOME (SELECT salary
FROM instructor
WHERE dept name = ’Biology’);

c)
SELECT COUNT (DISTINCT ID)
FROM takes
WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR
FROM teaches
WHERE teaches.ID= 10101);

d)
(SELECT course id
FROM SECTION
WHERE semester = ’Spring’ AND YEAR= 2010)
View Answer
Answer: a
Explanation: None.

10. We can test for the nonexistence of tuples in a subquery by using the _____ construct.
a) Not exist
b) Not exists
c) Exists
d) Exist
View Answer

Answer: b
Explanation: Exists is used to check for the existence of tuples.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Null Values Operations
» Next - Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
Categories Database MCQsPost navigation
Database Questions and Answers – Null Values Operations
Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
advertisement
advertisement

Recommended Posts:

1. SQL Server Questions and Answers


2. Python Programming Examples
3. C Programming Examples on Strings
4. C# Programming Examples on Strings
5. C Programming Examples without using Recursion
6. RDBMS Questions and Answers
7. Programming Questions and Answers
8. C# Programming Examples on Arrays
9. C Programming Examples on Bitwise Operations
10. Simple C Programs
11. Simple Java Programs
12. Spring Questions and Answers
13. C# Basic Programming Examples
14. C# Programming Examples on LINQ
15. C Programming Examples on Mathematical Functions
16. Java Programming Examples on Mathematical Functions
17. C# Programming Examples on Functions
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Aggregate


Functions and Nested Subqueries – 2
« Prev
Next »

This set of Database Interview Questions and Answers focuses on “Aggregate Functions and
Nested Subqueries – 2”.

1.
advertisement
SELECT dept_name, ID, avg (salary)
FROM instructor
GROUP BY dept_name;
This statement IS erroneous because

a) Avg(salary) should not be selected


b) Dept_id should not be used in group by clause
c) Misplaced group by clause
d) Group by clause is not valid in this query
View Answer

Answer: b
Explanation: Any attribute that is not present in the group by clause must appear only inside an
aggregate function if it appears in the select clause, otherwise the query is treated as erroneous.

2. SQL applies predicates in the _______ clause after groups have been formed, so aggregate
functions may be used.
a) Group by
b) With
c) Where
d) Having
View Answer

Answer: b
Explanation: The with clause provides away of defining a temporary relation whose definition is
available only to the query in which the with clause occurs.

3. Aggregate functions can be used in the select list or the_______clause of a select statement or
subquery. They cannot be used in a ______ clause.
a) Where, having
b) Having, where
c) Group by, having
d) Group by, where
View Answer

Answer: b
Explanation: To include aggregate functions having clause must be included after where.
advertisement

4. The ________ keyword is used to access attributes of preceding tables or subqueries in the
from clause.
a) In
b) Lateral
c) Having
d) With
View Answer

Answer: b
Explanation:
Eg : SELECT name, salary, avg salary
FROM instructor I1, lateral (SELECT avg(salary) AS avg salary
FROM instructor I2
WHERE I2.dept name= I1.dept name);

Without the lateral clause, the subquery cannot access the correlation variable
I1 from the outer query.

5. Which of the following creates a temporary relation for the query on which it is defined?
a) With
b) From
c) Where
d) Select
View Answer

Answer: a
Explanation: The with clause provides a way of defining a temporary relation whose definition
is available only to the query in which the with clause occurs.
advertisement

6.
WITH max_budget (VALUE) AS
(SELECT MAX(budget)
FROM department)
SELECT budget
FROM department, max_budget
WHERE department.budget = MAX budget.value;

In the query given above which one of the following is a temporary relation?
a) Budget
b) Department
c) Value
d) Max_budget
View Answer

Answer: d
Explanation: With clause creates a temporary relation.

7. Subqueries cannot:
a) Use group by or group functions
b) Retrieve data from a table different from the one in the outer query
c) Join tables
d) Appear in select, update, delete, insert statements.
View Answer

Answer: c
Explanation: None.
advertisement

8. Which of the following is not an aggregate function?


a) Avg
b) Sum
c) With
d) Min
View Answer

Answer: c
Explanation: With is used to create temporary relation and its not an aggregate function.

9. The EXISTS keyword will be true if:


a) Any row in the subquery meets the condition only
b) All rows in the subquery fail the condition only
c) Both of these two conditions are met
d) Neither of these two conditions is met
View Answer

Answer: a
Explanation: EXISTS keyword checks for existance of a condition.

10. How can you find rows that do not match some specified condition?
a) EXISTS
b) Double use of NOT EXISTS
c) NOT EXISTS
d) None of the mentioned
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Interviews, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
» Next - Database Questions and Answers – Modification of Database
Categories Database MCQsPost navigation
Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
Database Questions and Answers – Modification of Database
advertisement
advertisement

Recommended Posts:

1. Numerical Methods Questions and Answers


2. C# Programming Examples
3. MongoDB Questions and Answers
4. Recruitment Support Service – Employers
5. Discrete Mathematics Questions and Answers
6. Java Programming Examples on Mathematical Functions
7. C Programming Examples on Mathematical Functions
8. SQL Server Questions and Answers
9. C# Programming Examples on Functions
10. RDBMS Questions and Answers
11. C# Programming Examples on LINQ
12. Database Management System Questions and Answers
13. Oracle Database Questions and Answers
14. MySQL Database Questions and Answers
15. Database Questions and Answers – Recursive Queries and Aggregation Features
16. Database Questions and Answers – Rapid Application Development
17. Database Questions and Answers – Authorizations
18. MySQL Questions and Answers – The group by & having Clause
19. Database Questions and Answers – Functional-Dependency Theory
20. Database Questions and Answers – Basic SQL Operations
advertisement

Database Questions and Answers – Modification of


Database
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Modification
of Database”.

1. A Delete command operates on ______ relation.


a) One
b) Two
c) Several
d) Null
View Answer

Answer: a
Explanation: Delete can delete from only one table at a time.
advertisement

2.
Delete from r where P;

The above command


a) Deletes a particular tuple from the relation
b) Deletes the relation
c) Clears all entries from the relation
d) All of the mentioned
View Answer
Answer: a
Explanation: Here P gives the condition for deleting specific rows.

3. Which one of the following deletes all the entries but keeps the structure of the relation.
a) Delete from r where P;
b) Delete from instructor where dept name= ’Finance’;
c) Delete from instructor where salary between 13000 and 15000;
d) Delete from instructor;
View Answer

Answer: d
Explanation: Absence of condition deletes all rows.

4. Which of the following is used to insert a tuple from another relation?


a)
INSERT INTO course (course id, title, dept name, credits)
VALUES (’CS-437’, ’DATABASE Systems’, ’Comp. Sci.’, 4);

b)
advertisement
INSERT INTO instructor
SELECT ID, name, dept name, 18000
FROM student
WHERE dept name = ’Music’ AND tot cred > 144;

c)
INSERT INTO course VALUES (’CS-437’, ’DATABASE Systems’, ’Comp. Sci.’, 4);

d) Not possible
View Answer

Answer: b
Explanation: Using select statement in insert will include rows which are the result of the
selection.

5. Which of the following deletes all tuples in the instructor relation for those instructors
associated with a department located in the Watson building which is in department relation.
a)
DELETE FROM instructor
WHERE dept_name IN 'Watson';

b)
advertisement
DELETE FROM department
WHERE building='Watson';

c)
DELETE FROM instructor
WHERE dept_name IN (SELECT dept name
FROM department
WHERE building = ’Watson’);

d) None of the mentioned


View Answer

Answer: c
Explanation: The query must include building=watson condition to filter the tuples.

6.
UPDATE instructor
_____ salary= salary * 1.05;

Fill in with correct keyword to update the instructor relation.


a) Where
b) Set
c) In
d) Select
View Answer

Answer: b
Explanation: Set is used to update the particular value.

7. _________ are useful in SQL update statements, where they can be used in the set clause.
a) Multiple queries
b) Sub queries
c) Update
d) Scalar subqueries
View Answer

Answer: d
Explanation: None.
advertisement

8. The problem of ordering the update in multiple updates is avoided using


a) Set
b) Where
c) Case
d) When
View Answer

Answer: c
Explanation: The case statements can add the order of updating tuples.

9. Which of the following is the correct format for case statements.


a)
CASE
WHEN pred1 ... result1
WHEN pred2 ... result2
. . .
WHEN predn ... resultn
ELSE result0
END

b)
CASE
WHEN pred1 THEN result1
WHEN pred2 THEN result2
. . .
WHEN predn THEN resultn
ELSE result0
END

c)
CASE
WHEN pred1 THEN result1
WHEN pred2 THEN result2
. . .
WHEN predn THEN resultn
ELSE result0

d) All of the mentioned


View Answer

Answer: b
Explanation: None.

10. Which of the following relation updates all instructors with salary over $100,000 receive a 3
percent raise, whereas all others receive a 5 percent raise.
a)
UPDATE instructor
SET salary = salary * 1.03
WHERE salary > 100000;
UPDATE instructor
SET salary = salary * 1.05
WHERE salary <= 100000;

b)
UPDATE instructor
SET salary = salary * 1.05
WHERE salary < (SELECT avg (salary)
FROM instructor);

c)
UPDATE instructor
SET salary = CASE
WHEN salary <= 100000 THEN salary * 1.03
ELSE salary * 1.05
END

d) None of the mentioned


View Answer

Answer: a
Explanation: The order of the two update statements is important. If we changed the order of the
two statements, an instructor with a salary just under $100,000 would receive an over 8 percent
raise. SQL provides a case construct that we can use to perform both the updates with a single
update statement, avoiding the problem with the order of updates.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
» Next - Database Questions and Answers – Join Expressions
Categories Database MCQsPost navigation
Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
C# Program to Calculate the Length of the String
advertisement
advertisement

Recommended Posts:

1. Bachelor of Computer Applications Questions and Answers


2. Java Programming Examples on Arrays
3. Recruitment Support Service – Employers
4. C Programming Examples on Strings
5. C Programming Examples on File Handling
6. RDBMS Questions and Answers
7. Python Programming Examples on Stacks & Queues
8. Database Management System Questions and Answers
9. MySQL Database Questions and Answers
10. Oracle Database Questions and Answers
11. Database Questions and Answers – Implementation of Isolation Levels
12. Database Questions and Answers – Access SQL From a Programming Language
13. SQL Server Questions and Answers – Modifying Data – 1
14. Database Questions and Answers – Database Design Process
15. Database Questions and Answers – Integrity Constraints
16. Database Questions and Answers – Triggers
17. Database Questions and Answers – Functions and Procedures
18. Database Questions and Answers – Relational Database and Database Schema
19. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
20. Database Questions and Answers – Functional-Dependency Theory
advertisement

Database Questions and Answers – Join


Expressions
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Join
Expressions”.

1. The____condition allows a general predicate over the relations being joined.


a) On
b) Using
c) Set
d) Where
View Answer

Answer: a
Explanation: On gives the condition for the join expression.
advertisement

2. Which of the join operations do not preserve non matched tuples?


a) Left outer join
b) Right outer join
c) Inner join
d) Natural join
View Answer

Answer: c
Explanation: INNER JOIN: Returns all rows when there is at least one match in BOTH tables.

3.
SELECT *
FROM student JOIN takes USING (ID);

The above query is equivalent to


a)
advertisement
SELECT *
FROM student INNER JOIN takes USING (ID);

b)
SELECT *
FROM student OUTER JOIN takes USING (ID);

c)
SELECT *
FROM student LEFT OUTER JOIN takes USING (ID);

d) None of the mentioned


View Answer

Answer: a
Explanation: Join can be replaced by inner join.
advertisement

4. What type of join is needed when you wish to include rows that do not have matching values?
a) Equi-join
b) Natural join
c) Outer join
d) All of the mentioned
View Answer

Answer: c
Explanation: An outer join does not require each record in the two joined tables to have a
matching record..

5. How many tables may be included with a join?


a) One
b) Two
c) Three
d) All of the mentioned
View Answer

Answer: d
Explanation: Join can combine multiple tables.

6. Which are the join types in join condition:


a) Cross join
b) Natural join
c) Join with USING clause
d) All of the mentioned
View Answer

Answer: d
Explanation: There are totally four join types in SQL.

7. How many join types in join condition:


a) 2
b) 3
c) 4
d) 5
View Answer

Answer: d
Explanation: Types are inner join, left outer join, right outer join, full join, cross join.
advertisement

8. Which join refers to join records from the right table that have no matching key in the left
table are include in the result set:
a) Left outer join
b) Right outer join
c) Full outer join
d) Half outer join
View Answer

Answer: b
Explanation: RIGHT OUTER JOIN: Return all rows from the right table and the matched rows
from the left table.

9. The operation which is not considered a basic operation of relational algebra is


a) Join
b) Selection
c) Union
d) Cross product
View Answer

Answer: a
Explanation: None.

10. In SQL the statement select * from R, S is equivalent to


a) Select * from R natural join S
b) Select * from R cross join S
c) Select * from R union join S
d) Select * from R inner join S
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Modification of Database
» Next - Database Questions and Answers – Views
Categories Database MCQsPost navigation
C# Program to Reverse an Array
C Program to Create a Mirror Copy of a Tree
advertisement
advertisement

Recommended Posts:

1. Engineering Geology Questions and Answers


2. Applied Chemistry Questions and Answers
3. Design of Steel Structures Questions and Answers
4. Data Science Questions and Answers
5. Java Programming Examples on Data-Structures
6. HTML Questions and Answers
7. JUnit Questions and Answers
8. C++ Programming Examples on Data-Structures
9. MongoDB Questions and Answers
10. Java Programming Examples on Utility Classes
11. Data Structure Questions and Answers
12. SQL Server Questions and Answers
13. C Programming Examples on Data-Structures
14. CSS Questions and Answers
15. C Programming Examples on Matrix
16. RDBMS Questions and Answers
17. C# Programming Examples on LINQ
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Views


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Views”.

1. Which of the following creates a virtual relation for storing the query?
a) Function
b) View
c) Procedure
d) None of the mentioned
View Answer

Answer: b
Explanation: Any such relation that is not part of the logical model, but is made visible to a user
as a virtual relation, is called a view.
advertisement

2. Which of the following is the syntax for views where v is view name?
a) Create view v as “query name”;
b) Create “query expression” as view;
c) Create view v as “query expression”;
d) Create view “query expression”;
View Answer

Answer: c
Explanation: <query expression> is any legal query expression. The view name is represented
by v.

3.
SELECT course_id
FROM physics_fall_2009
WHERE building= ’Watson’;

Here the tuples are selected from the view.Which one denotes the view.
a) Course_id
b) Watson
c) Building
d) physics_fall_2009
View Answer

Answer: c
Explanation: View names may appear in a query any place where a relation name may appear.

4. Materialised views make sure that


a) View definition is kept stable
b) View definition is kept up-to-date
c) View definition is verified for error
d) View is deleted after specified time
View Answer

Answer: b
Explanation: None.

5. Updating the value of the view


a) Will affect the relation from which it is defined
b) Will not change the view definition
c) Will not affect the relation from which it is defined
d) Cannot determine
View Answer

Answer: a
Explanation: None.
advertisement

6. SQL view is said to be updatable (that is, inserts, updates or deletes can be applied on the
view) if which of the following conditions are satisfied by the query defining the view?
a) The from clause has only one database relation
b) The query does not have a group by or having clause
c) The select clause contains only attribute names of the relation and does not have any
expressions, aggregates, or distinct specification
d) All of the mentioned
View Answer

Answer: d
Explanation: All of the conditions must be satisfied to update the view in sql.

7. Which of the following is used at the end of the view to reject the tuples which do not satisfy
the condition in where clause?
a) With
b) Check
c) With check
d) All of the mentioned
View Answer

Answer: c
Explanation: Views can be defined with a with check option clause at the end of the view
definition; then, if a tuple inserted into the view does not satisfy the view’s where clause
condition, the insertion is rejected by the database system.

8. Consider the two relations instructor and department


Instructor:

ID Name Dept_name Salary


1001 Ted Finance 10000
1002 Bob Music 20000
1003 Ron Physics 50000

Department:

Dept_name Building Budget


Biology Watson 40000
Chemistry Painter 30000
Music Taylor 50000

Which of the following is used to create view for these relations together?
a)
CREATE VIEW instructor_info AS
SELECT ID, name, building
FROM instructor, department
WHERE instructor.dept name= department.dept name;

b)
advertisement
CREATE VIEW instructor_info
SELECT ID, name, building
FROM instructor, department;

c)
CREATE VIEW instructor_info AS
SELECT ID, name, building
FROM instructor;

d)
CREATE VIEW instructor_info AS
SELECT ID, name, building
FROM department;
View Answer
Answer: a
Explanation: None.
9. For the view Create view instructor_info as
SELECT ID, name, building
FROM instructor, department
WHERE instructor.dept name= department.dept name;

If we insert tuple into the view as insert into instructor info values (’69987’, ’White’, ’Taylor’);
What will be the values of the other attributes in instructor and department relations?
a) Default value
b) Null
c) Error statement
d) 0
View Answer

Answer: b
Explanation: The values take null if there is no constraint in the attribute else it is an Erroneous
statement.
advertisement

10.
CREATE VIEW faculty AS
SELECT ID, name, dept name
FROM instructor;

Find the error in this query.


a) Instructor
b) Select
c) View …as
d) None of the mentioned
View Answer

Answer: d
Explanation: Syntax is – create view v as <query expression>;.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Join Expressions
» Next - Database Questions and Answers – Transactions
Categories Database MCQsPost navigation
C Program to Create a Mirror Copy of a Tree
Database Questions and Answers – Transactions
advertisement
advertisement

Recommended Posts:

1. Machine Drawing Questions and Answers


2. Civil Engineering Drawing and Estimates Questions and Answers
3. Java Programming Examples on Utility Classes
4. Genetic Engineering Questions and Answers
5. MongoDB Questions and Answers
6. C# Programming Examples on Files
7. SQL Server Questions and Answers
8. RDBMS Questions and Answers
9. C# Programming Examples on LINQ
10. Oracle Database Questions and Answers
11. Database Management System Questions and Answers
12. MySQL Database Questions and Answers
13. Database Questions and Answers – Relational Query Operations and Relational
Operators
14. Database Questions and Answers – Database Design Process
15. Database Questions and Answers – SQL Data Types and Schemas
16. SQL Server Questions and Answers – Views
17. MySQL Questions and Answers – Using Views
18. Database Questions and Answers – Relational Database and Database Schema
19. Database Questions and Answers – Implementation of Isolation Levels
20. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
advertisement

Database Questions and Answers – Transactions


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transactions”.

1. A _________ consists of a sequence of query and/or update statements.


a) Transaction
b) Commit
c) Rollback
d) Flashback
View Answer

Answer: a
Explanation: Transaction is a set of operation until commit.
advertisement

2. Which of the following makes the transaction permanent in the database?


a) View
b) Commit
c) Rollback
d) Flashback
View Answer

Answer: b
Explanation: Commit work commits the current transaction.

3. In order to undo the work of transaction after last commit which one should be used?
a) View
b) Commit
c) Rollback
d) Flashback
View Answer

Answer: c
Explanation: Rollback work causes the current transaction to be rolled back; that is, it undoes all
the updates performed by the SQL statements in the transaction.

4. Consider the following action:


TRANSACTION.....
Commit;
ROLLBACK;

What does Rollback do?


a) Undoes the transactions before commit
b) Clears all transactions
c) Redoes the transactions before commit
d) No action
View Answer

Answer: d
Explanation: Once a transaction has executed commit work, its effects can no longer be undone
by rollback work.
advertisement

5. In case of any shut down during transaction before commit which of the following statement
is done automatically?
a) View
b) Commit
c) Rollback
d) Flashback
View Answer

Answer: c
Explanation: Once a transaction has executed commit work, its effects can no longer be undone
by rollback work.

6. In order to maintain the consistency during transactions, database provides


a) Commit
b) Atomic
c) Flashback
d) Retain
View Answer

Answer: b
Explanation: By atomic, either all the effects of the transaction are reflected in the database, or
none are (after rollback).

7. Transaction processing is associated with everything below except


a) Conforming an action or triggering a response
b) Producing detail summary or exception report
c) Recording a business activity
d) Maintaining a data
View Answer

Answer: a
Explanation: None.
advertisement

8. A transaction completes its execution is said to be


a) Committed
b) Aborted
c) Rolled back
d) Failed
View Answer

Answer: a
Explanation: A complete transaction always commits.

9. Which of the following is used to get back all the transactions back after rollback?
a) Commit
b) Rollback
c) Flashback
d) Redo
View Answer

Answer: c
Explanation: None.

10. ______ will undo all statements up to commit?


a) Transaction
b) Flashback
c) Rollback
d) Abort
View Answer

Answer: c
Explanation: Flashback will undo all the statements and Abort will terminate the operation.

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
advertisement

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Views
» Next - Database Questions and Answers – Integrity Constraints
Categories Database MCQsPost navigation
Database Questions and Answers – Views
C# Program to Perform a Number Guessing Game
advertisement
advertisement

Recommended Posts:

1. Operating System Questions and Answers


2. Recruitment Support Service – Employers
3. Data Structure Questions and Answers
4. C++ Programming Examples on STL
5. C# Programming Examples on Interfaces
6. Home
7. C Programming Examples on Stacks & Queues
8. Spring Questions and Answers
9. Python Programming Examples on Stacks & Queues
10. SQL Server Questions and Answers
11. Java Programming Examples on Utility Classes
12. RDBMS Questions and Answers
13. MySQL Database Questions and Answers
14. Oracle Database Questions and Answers
15. Database Management System Questions and Answers
16. Database Questions & Answers – A Simple Transaction Model
17. RDBMS Questions and Answers – Transaction Isolation
18. Database Questions and Answers – Insertion Deletion Predicate Reads
19. Operating System Questions and Answers – Atomic Transactions
20. Oracle Database Questions and Answers – Installing Oracle Database 11g and Creating a
Database
advertisement

Database Questions and Answers – Integrity


Constraints
« Prev
Next »
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Integrity
Constraints”.

1. To include integrity constraint in an existing relation use :


a) Create table
b) Modify table
c) Alter table
d) Drop table
View Answer

Answer: c
Explanation: SYNTAX – alter table table-name add constraint, where constraint can be any
constraint on the relation.
advertisement

2. Which of the following is not an integrity constraint?


a) Not null
b) Positive
c) Unique
d) Check ‘predicate’
View Answer

Answer: b
Explanation: Positive is a value and not a constraint.

3.
CREATE TABLE Employee(Emp_id NUMERIC NOT NULL, Name VARCHAR(20) , dept_name
VARCHAR(20), Salary NUMERIC UNIQUE(Emp_id,Name));
INSERT INTO Employee VALUES(1002, Ross, CSE, 10000)
INSERT INTO Employee VALUES(1006,Ted,Finance, );
INSERT INTO Employee VALUES(1002,Rita,Sales,20000);

What will be the result of the query?


a) All statements executed
b) Error in create statement
c) Error in insert into Employee values(1006,Ted,Finance, );
d) Error in insert into Employee values(1008,Ross,Sales,20000);
View Answer

Answer: d
Explanation: The not null specification prohibits the insertion of a null value for the attribute.
The unique specification says that no two tuples in the relation can be equal on all the listed
attributes.

4.
advertisement
CREATE TABLE Manager(ID NUMERIC,Name VARCHAR(20),budget NUMERIC,Details VARCHAR(30));

Inorder to ensure that the value of budget is non-negative which of the following should be
used?
a) Check(budget>0)
b) Check(budget<0)
c) Alter(budget>0)
d) Alter(budget<0)
View Answer

Answer: a
Explanation: A common use of the check clause is to ensure that attribute values satisfy
specified conditions, in effect creating a powerful type system.

5. Foreign key is the one in which the ________ of one relation is referenced in another relation.
a) Foreign key
b) Primary key
c) References
d) Check constraint
View Answer

Answer: b
Explanation: The foreign-key declaration specifies that for each course tuple, the department
name specified in the tuple must exist in the department relation.
advertisement

6.
CREATE TABLE course
( . . .
FOREIGN KEY (dept name) REFERENCES department
. . . );

Which of the following is used to delete the entries in the referenced table when the tuple is
deleted in course table?
a) Delete
b) Delete cascade
c) Set null
d) All of the mentioned
View Answer

Answer: b
Explanation: The delete “cascades” to the course relation, deletes the tuple that refers to the
department that was deleted.

7. Domain constraints, functional dependency and referential integrity are special forms of
_________
a) Foreign key
b) Primary key
c) Assertion
d) Referential constraint
View Answer
Answer: c
Explanation: An assertion is a predicate expressing a condition we wish the database to always
satisfy.
advertisement

8. Which of the following is the right syntax for the assertion?


a) Create assertion ‘assertion-name’ check ‘predicate’;
b) Create assertion check ‘predicate’ ‘assertion-name’;
c) Create assertions ‘predicates’;
d) All of the mentioned
View Answer

Answer: a
Explanation: None.

9. Data integrity constraints are used to:


a) Control who is allowed access to the data
b) Ensure that duplicate records are not entered into the table
c) Improve the quality of data entered for a specific property (i.e., table column)
d) Prevent users from changing the values stored in the table
View Answer

Answer: c
Explanation: None.

10. Which of the following can be addressed by enforcing a referential integrity constraint?
a) All phone numbers must include the area code
b) Certain fields are required (such as the email address, or phone number) before the record is
accepted
c) Information on the customer must be known before anything can be sold to that customer
d) When entering an order quantity, the user must input a number and not some text (i.e., 12
rather than ‘a dozen’)
View Answer

Answer: c
Explanation: The information can be referred to and obtained.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Transactions
» Next - Database Questions and Answers – SQL Data Types and Schemas
Categories Database MCQsPost navigation
C# Program to Perform a Number Guessing Game
Database Questions and Answers – SQL Data Types and Schemas
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Combinatorial Problems & Algorithms


2. C# Basic Programming Examples
3. Python Programming Examples on Trees
4. C Programming Examples on Combinatorial Problems & Algorithms
5. C# Programming Examples on Networking
6. Java Programming Examples on Arrays
7. C++ Programming Examples on Combinatorial Problems & Algorithms
8. C Programming Examples on Arrays
9. Java Programming Examples on Collections
10. Java Programming Examples on Classes
11. Java Programming Examples on File Handling
12. Java Programming Examples on Java.Lang
13. Java Programming Examples on Utility Classes
14. Python Programming Examples on Stacks & Queues
15. C Programming Examples on Stacks & Queues
16. RDBMS Questions and Answers
17. C Programming Examples on File Handling
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – SQL Data


Types and Schemas
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “SQL Data
Types and Schemas”.

1. Dates must be specified in the format


a) mm/dd/yy
b) yyyy/mm/dd
c) dd/mm/yy
d) yy/dd/mm
View Answer

Answer: b
Explanation: yyyy/mm/dd is the default format in sql.
advertisement
2. A ________ on an attribute of a relation is a data structure that allows the database system to
find those tuples in the relation that have a specified value for that attribute efficiently, without
scanning through all the tuples of the relation.
a) Index
b) Reference
c) Assertion
d) Timestamp
View Answer

Answer: a
Explanation: Index is the reference to the tuples in a relation.

3.
Create index studentID_index on student(ID);

Here which one denotes the relation for which index is created?
a) StudentID_index
b) ID
c) StudentID
d) Student
View Answer

Answer: d
Explanation: The statement creates an index named studentID index on the attribute ID of the
relation student.

4. Which of the following is used to store movie and image files?


a) Clob
b) Blob
c) Binary
d) Image
View Answer

Answer: b
Explanation: SQL therefore provides large-object data types for character data (clob) and binary
data (blob). The letters “lob” in these data types stand for “Large OBject”.
advertisement

5. The user defined data type can be created using


a) Create datatype
b) Create data
c) Create definetype
d) Create type
View Answer

Answer: d
Explanation: The create type clause can be used to define new types.Syntax : create type Dollars
as numeric(12,2) final; .
6. Values of one type can be converted to another domain using which of the following?
a) Cast
b) Drop type
c) Alter type
d) Convert
View Answer

Answer: a
Explanation: Example of cast :cast (department.budget to numeric(12,2)). SQL provides drop
type and alter type clauses to drop or modify types that have been created earlier.

7.
CREATE DOMAIN YearlySalary NUMERIC(8,2)
CONSTRAINT salary VALUE test __________;

In order to ensure that an instructor’s salary domain allows only values greater than a specified
value use:
a) Value>=30000.00
b) Not null;
c) Check(value >= 29000.00);
d) Check(value)
View Answer

Answer: c
Explanation: Check(value ‘condition’) is the syntax.

8. Which of the following closely resembles Create view?


a) Create table . . .like
b) Create table . . . as
c) With data
d) Create view as
View Answer

Answer: b
Explanation: The ‘create table . . . as’ statement closely resembles the create view statement and
both are defined by using queries. The main difference is that the contents of the table are set
when the table is created, whereas the contents of a view always reflect the current query result.
advertisement

9. In contemporary databases, the top level of the hierarchy consists of ______ each of which
can contain _____
a) Catalogs, schemas
b) Schemas, catalogs
c) Environment, schemas
d) Schemas, Environment
View Answer

Answer: a
Explanation: None.
10. Which of the following statements creates a new table temp instructor that has the same
schema as an instructor.
a) create table temp_instructor;
b) Create table temp_instructor like instructor;
c) Create Table as temp_instructor;
d) Create table like temp_instructor;
View Answer

Answer: b
Explanation: None.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Integrity Constraints
» Next - Database Questions and Answers – Authorizations
Categories Database MCQsPost navigation
Database Questions and Answers – Integrity Constraints
Database Questions and Answers – Authorizations
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Classes


2. Java Programming Examples on File Handling
3. Java Programming Examples on Exception Handling
4. C# Programming Examples on Delegates
5. Java Programming Examples on Utility Classes
6. SQL Server Questions and Answers
7. C# Programming Examples on Functions
8. RDBMS Questions and Answers
9. Data Structures & Algorithms II – Questions and Answers
10. C Programming Examples on Data-Structures
11. C++ Programming Examples on Data-Structures
12. MongoDB Questions and Answers
13. Data Structure Questions and Answers
14. Java Programming Examples on Data-Structures
15. Java Programming Examples on Collections
16. Data Science Questions and Answers
17. C# Programming Examples on Data Structures
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Authorizations


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on
“Authorizations”.

1. The database administrator who authorizes all the new users, modifies the database and takes
grants privilege is
a) Super user
b) Administrator
c) Operator of operating system
d) All of the mentioned
View Answer

Answer: d
Explanation: The authorizations provided by the administrator to the user is a privilege.
advertisement

2. Which of the following is a basic form of grant statement?


a)
GRANT 'privilege list'
ON 'relation name or view name'
TO 'user/role list';

b)
GRANT 'privilege list'
ON 'user/role list'
TO 'relation name or view name';

c)
advertisement
GRANT 'privilege list'
TO 'user/role list'

d)
GRANT 'privilege list'
ON 'relation name or view name'
ON 'user/role list';
View Answer
Answer: a
Explanation: The privilege list allows the granting of several privileges in one command .
3. Which of the following is used to provide privilege to only a particular attribute?
a) Grant select on employee to Amit
b) Grant update(budget) on department to Raj
c) Grant update(budget,salary,Rate) on department to Raj
d) Grant delete to Amit
View Answer

Answer: b
Explanation: This grant statement gives user Raj update authorization on the budget attribute of
the department relation.
advertisement

4. Which of the following statement is used to remove the privilege from the user Amir?
a) Remove update on department from Amir
b) Revoke update on employee from Amir
c) Delete select on department from Raj
d) Grant update on employee from Amir
View Answer

Answer: b
Explanation: revoke on from ;

5. Which of the following is used to provide delete authorization to instructor?


a)
CREATE ROLE instructor ;
GRANT DELETE TO instructor;

b)
CREATE ROLE instructor;
GRANT SELECT ON takes
TO instructor;

c)
advertisement
CREATE ROLE instructor;
GRANT DELETE ON takes
TO instructor;

d) All of the mentioned


View Answer

Answer: c
Explanation: The role is first created and the authorization is given on relation takes to the role.

6. Which of the following is true regarding views?


a) The user who creates a view cannot be given update authorization on a view without having
update authorization on the relations used to define the view
b) The user who creates a view cannot be given update authorization on a view without having
update authorization on the relations used to define the view
c) If a user creates a view on which no authorization can be granted, the system will allow the
view creation request
d) A user who creates a view receives all privileges on that view
View Answer

Answer: c
Explanation: A user who creates a view does not necessarily receive all privileges on that view.

7. If we wish to grant a privilege and to allow the recipient to pass the privilege on to other
users, we append the __________ clause to the appropriate grant command.
a) With grant
b) Grant user
c) Grant pass privelege
d) With grant option
View Answer

Answer: d
Explanation: None.

8. In authorization graph, if DBA provides authorization to u1 which inturn gives to u2 which of


the following is correct?
a) If DBA revokes authorization from u1 then u2 authorization is also revoked
b) If u1 revokes authorization from u2 then u2 authorization is revoked
c) If DBA & u1 revokes authorization from u1 then u2 authorization is also revoked
d) If u2 revokes authorization then u1 authorization is revoked
View Answer

Answer: c
Explanation: A user has an authorization if and only if there is a path from the root of the
authorization graph down to the node representing the user.

9. Which of the following is used to avoid cascading of authorizations from the user?
a) Granted by current role
b) Revoke select on department from Amit, Satoshi restrict;
c) Revoke grant option for select on department from Amit;
d) Revoke select on department from Amit, Satoshi cascade;
View Answer

Answer: b
Explanation: The revoke statement may specify restrict in order to prevent cascading revocation.
The keyword cascade can be used instead of restrict to indicate that revocation should cascade.

10. The granting and revoking of roles by the user may cause some confusions when that user
role is revoked. To overcome the above situation
a) The privilege must be granted only by roles
b) The privilege is granted by roles and users
c) The user role cannot be removed once given
d) By restricting the user access to the roles
View Answer
Answer: a
Explanation: The current role associated with a session can be set by executing set role name.
The specified role must have been granted to the user, else the set role statement fails.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – SQL Data Types and Schemas
» Next - Database Questions and Answers – Access SQL From a Programming Language
Categories Database MCQsPost navigation
Database Questions and Answers – SQL Data Types and Schemas
C# Program to Interchange any 2 Rows of a Matrix
advertisement
advertisement

Recommended Posts:

1. C# Programming Examples on Files


2. C# Programming Examples on LINQ
3. Python Programming Examples on Searching and Sorting
4. SQL Server Questions and Answers
5. Java Programming Examples on Event Handling
6. C Programming Examples on File Handling
7. C# Programming Examples on Events
8. C# Programming Examples on Data Structures
9. MongoDB Questions and Answers
10. Database Management System Questions and Answers
11. Oracle Database Questions and Answers
12. MySQL Database Questions and Answers
13. Database Questions and Answers – Application Security
14. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
15. Database Questions and Answers – Functions and Procedures
16. Database Questions and Answers – Tuple Relational Calculus and Domain Relational
Calculus
17. Database Questions and Answers – Relational Database and Database Schema
18. MongoDB Questions and Answers – Authorization
19. Database Questions and Answers – Access SQL From a Programming Language
20. Database Questions and Answers – Reduction to Relational Schemas
advertisement
Database Questions and Answers – Access SQL
From a Programming Language
« Prev
Next »

This set of Database Multiple Choice Questions & Answers focuses on “Access SQL From a
Programming Language”.

1. Which of the following is used to access the database server at the time of executing the
program and get the data from the server accordingly?
a) Embedded SQL
b) Dynamic SQL
c) SQL declarations
d) SQL data analysis
View Answer

Answer: b
Explanation: Embedded SQL, the SQL statements are identified at compile time using a
preprocessor. The preprocessor submits the SQL statements to the database system for
precompilation and optimization; then it replaces the SQL statements in the application program
with appropriate code and function calls before invoking the programming-language compiler.
advertisement

2. Which of the following header must be included in java program to establish database
connectivity using JDBC ?
a) Import java.sql.*;
b) Import java.sql.odbc.jdbc.*;
c) Import java.jdbc.*;
d) Import java.sql.jdbc.*;
View Answer

Answer: a
Explanation: The Java program must import java.sql.*, which contains the interface definitions
for the functionality provided by JDBC.

3. DriverManager.getConnection(_______ , ______ , ______)


What are the two parameters that are included?
a) URL or machine name where server runs, Password, User ID
b) URL or machine name where server runs, User ID, Password
c) User ID, Password, URL or machine name where server runs
d) Password, URL or machine name where server runs, User ID
View Answer

Answer: b
Explanation: The database must be opened first in order to perform any operations for which
this get connection method is used.
4. Which of the following invokes functions in sql?
a) Prepared Statements
b) Connection statement
c) Callable statements
d) All of the mentioned
View Answer

Answer: c
Explanation: JDBC provides a Callable Statement interface that allows invocation of SQL
stored procedures and functions.

5. Which of the following function is used to find the column count of the particular resultset?
a) getMetaData()
b) Metadata()
c) getColumn()
d) get Count()
View Answer

Answer: a
Explanation: The interface ResultSet
has a method, getMetaData(), that returns a ResultSetMetaData object that contains metadata
about the result set. ResultSetMetaData, in turn, has methods to find metadata information, such
as the number of columns in the result, the name of a specified column, or the type of a specified
column.
advertisement

6. Which of the following is a following statement is a prepared statements?


a) Insert into department values(?,?,?)
b) Insert into department values(x,x,x)
c) SQLSetConnectOption(conn, SQL AUTOCOMMIT, 0)
d) SQLTransact(conn, SQL ROLLBACK)
View Answer

Answer: a
Explanation:? is used as a placeholder whose value can be provided later.

7. Which of the following is used as the embedded SQL in COBOL?


a) EXEC SQL <embedded SQL statement >;
b) EXEC SQL <embedded SQL statement > END-EXEC
c) EXEC SQL <embedded SQL statement >
d) EXEC SQL <embedded SQL statement > END EXEC;
View Answer

Answer: b
Explanation: EXEC SQL <embedded SQL statement >; is normally in C.

8. Which of the following is used to distinguish the variables in SQL from the host language
variables?
a) .
b) –
c) :
d) ,
View Answer

Answer: b
Explanation:
EXEC SQL
DECLARE c cursor FOR
SELECT ID, name
FROM student
WHERE tot cred > :credit amount;

.
advertisement

9. The update statement can be executed in host language using


a) EXEC SQL update c;
b) EXEC SQL update c into :si, :sn;
c)
EXEC SQL
UPDATE instructor
SET salary = salary + 100
WHERE CURRENT OF c;

d) EXEC SQL update END-SQL


View Answer

Answer: c
Explanation: The SQL can be terminated by ; to terminate the sentence.
advertisement

10. Which of the following is used to access large objects from a database ?
a) setBlob()
b) getBlob()
c) getClob()
d) all of the mentioned
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database, here is complete set on 1000+ Multiple Choice Questions and
Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Authorizations
» Next - Database Questions and Answers – Functions and Procedures
Categories Database MCQsPost navigation
C# Program to Interchange any 2 Rows of a Matrix
Database Questions and Answers – Functions and Procedures
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on String Handling


2. Home
3. Java Programming Examples on Classes
4. C# Programming Examples on Networking
5. Java Programming Examples on Multithreading
6. Java Programming Examples on Data-Structures
7. C# Programming Examples on Data Structures
8. 100+ Java Android Programming Examples
9. Java Programming Examples on Collection API
10. Java Programming Examples on Event Handling
11. Java Programming Examples on Collections
12. Database Management System Questions and Answers
13. Java Programming Examples on File Handling
14. Programming Questions and Answers
15. Java Programming Examples
16. Java Programming Examples on Exception Handling
17. Java Programming Examples on Utility Classes
18. Java Programming Examples on Networking
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Functions and


Procedures
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Functions and
Procedures”.

1.
Create function dept count(dept_name varchar(20))
begin
declare d count integer;
select count(*) into d count
from instructor
where instructor.dept_name= dept_name
return d count;
end
advertisement

Find the error in the the above statement.


a) Return type missing
b) Dept_name is mismatched
c) Reference relation is not mentioned
d) All of the mentioned
View Answer

Answer: a
Explanation: Return integer should be given after create function for this particular function.

2. For the function created in Question 1, which of the following is a proper select statement ?
a)
SELECT dept name, budget
FROM instructor
WHERE dept COUNT() > 12;

b)
SELECT dept name, budget
FROM instructor
WHERE dept COUNT(dept name) > 12;

c)
advertisement
SELECT dept name, budget
WHERE dept COUNT(dept name) > 12;

d)
SELECT dept name, budget
FROM instructor
WHERE dept COUNT(budget) > 12;
View Answer
Answer: b
Explanation: The count of the dept_name must be checked for the displaying from instructor
relation.

3. Which of the following is used to input the entry and give the result in a variable in a
procedure?
a) Put and get
b) Get and put
c) Out and In
d) In and out
View Answer

Answer: d
Explanation: Create procedure dept count proc(in dept name varchar(20), out d count integer).
Here in and out refers to input and result of procedure.
4.
Create procedure dept_count proc(in dept name varchar(20),
out d count integer)
begin
select count(*) into d count
from instructor
where instructor.dept name= dept count proc.dept name
end

Which of the following is used to call the procedure given above ?


a)
Declare d_count integer;

b)
Declare d_count integer;
call dept_count proc(’Physics’, d_count);
advertisement

c)
Declare d_count integer;
call dept_count proc(’Physics’);

d)
Declare d_count;
call dept_count proc(’Physics’, d_count);
View Answer
Answer: b
Explanation: Here the ‘Physics’ is in variable and d_count is out variable.

5. The format for compound statement is


a) Begin ……. end
b) Begin atomic……. end
c) Begin ……. repeat
d) Both Begin ……. end and Begin atomic……. end
View Answer

Answer: d
Explanation: A compound statement is of the form begin . . . end, and it may contain multiple
SQL statements between the begin and the end.A compound statement of the form begin atomic
. . . end ensures that all the statements contained within it are executed as a single transaction.

6.
Repeat
sequence of statements;
__________________
end repeat
Fill in the correct option :
a) While Condition
b) Until variable
c) Until boolean expression
d) Until 0
View Answer

Answer: c
Explanation: None.

7. Which of the following is the correct format for if statement?


a)
If boolean expression
then statement or compound statement
elseif boolean expression
then statement or compound statement
else statement or compound statement
end if

b)
If boolean expression
then statement or compound statement
elsif boolean expression
then statement or compound statement
else statement or compound statement
end if
advertisement

c)
If boolean expression
then statement or compound statement
elif boolean expression
then statement or compound statement
else statement or compound statement
end if

d)
If boolean expression
then statement or compound statement
else
statement or compound statement
else statement or compound statement
end if
View Answer
Answer: a
Explanation: The conditional statements supported by SQL include if-then-else statements by
using this syntax. elif and elsif are not allowed.

8. A stored procedure in SQL is a___________


a) Block of functions
b) Group of Transact-SQL statements compiled into a single execution plan.
c) Group of distinct SQL statements.
d) None of the mentioned
View Answer

Answer: b
Explanation: If it an atomic statement then the statements are in single transaction.

9. Temporary stored procedures are stored in _________ database.


a) Master
b) Model
c) User specific
d) Tempdb
View Answer

Answer: d
Explanation: None.

10. Declare out of classroom seats condition


DECLARE exit handler FOR OUT OF classroom seats
BEGIN
SEQUENCE OF statements
END

The above statements are used for


a) Calling procedures
b) Handling Exception
c) Handling procedures
d) All of the mentioned
View Answer

Answer: b
Explanation: The SQL procedural language also supports the signaling of exception conditions,
and declaring of handlers that can handle the exception, as in this code.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Access SQL From a Programming Language
» Next - Database Questions and Answers – Triggers
Categories Database MCQsPost navigation
Database Questions and Answers – Access SQL From a Programming Language
Database Questions and Answers – Triggers
advertisement
advertisement
Recommended Posts:

1. C# Programming Examples on Strings


2. Java Programming Examples on Set & String Problems & Algorithms
3. C Tutorials
4. VHDL Questions and Answers
5. Java Programming Examples on Exception Handling
6. Java Programming Examples on Utility Classes
7. Genetic Engineering Questions and Answers
8. Simple C Programs
9. Java Questions and Answers
10. C# Programming Examples on LINQ
11. C Programming Examples on Strings
12. Linux Questions and Answers
13. Simple Java Programs
14. C Programming Examples on Mathematical Functions
15. C Programming Examples on Bitwise Operations
16. Java Programming Examples on Mathematical Functions
17. Database Management System Questions and Answers
18. C# Programming Examples on Functions
19. Oracle Database Questions and Answers
20. MySQL Database Questions and Answers
advertisement

Database Questions and Answers – Triggers


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Triggers”.

1. A __________ is a special kind of a store procedure that executes in response to certain


action on the table like insertion, deletion or updation of data.
a) Procedures
b) Triggers
c) Functions
d) None of the mentioned
View Answer

Answer: b
Explanation: Triggers are automatically generated when a particular operation takes place.
advertisement

2. Triggers are supported in


a) Delete
b) Update
c) Views
d) All of the mentioned
View Answer
Answer: c
Explanation: The triggers run after an insert, update or delete on a table. They are not supported
for views.

3. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies
the table name on which the trigger is to be attached. The ______ specifies that this is an
AFTER INSERT trigger.
a) for insert, on
b) On, for insert
c) For, insert
d) None of the mentioned
View Answer

Answer: b
Explanation: The triggers run after an insert, update or delete on a table. They are not supported
for views.

4. What are the after triggers?


a) Triggers generated after a particular operation
b) These triggers run after an insert, update or delete on a table
c) These triggers run after an insert, views, update or delete on a table
d) All of the mentioned
View Answer

Answer: b
Explanation: AFTER TRIGGERS can be classified further into three types as: AFTER INSERT
Trigger, AFTER UPDATE Trigger, AFTER DELETE Trigger.
advertisement

5. The variables in the triggers are declared using


a) –
b) @
c) /
d) /@
View Answer

Answer: b
Explanation: Example : declare @empid int; where empid is the variable.

6. The default extension for an Oracle SQL*Plus file is:


a) .txt
b) .pls
c) .ora
d) .sql
View Answer

Answer: d
Explanation: Example :None.
7. Which of the following is NOT an Oracle-supported trigger?
a) BEFORE
b) DURING
c) AFTER
d) INSTEAD OF
View Answer

Answer: b
Explanation: Example: During trigger is not possible in any database.
advertisement

8. What are the different in triggers?


a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) All of the mentioned
View Answer

Answer: c
Explanation: Triggers are not possible for create, drop.

9. Triggers ________ enabled or disabled


a) Can be
b) Cannot be
c) Ought to be
d) Always
View Answer

Answer: a
Explanation: Triggers can be manipulated.

10. Which prefixes are available to Oracle triggers?


a) : new only
b) : old only
c) Both :new and : old
d) Neither :new nor : old
View Answer

Answer: c
Explanation: None.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Functions and Procedures
» Next - Database Questions and Answers – Recursive Queries and Aggregation Features
Categories Database MCQsPost navigation
Database Questions and Answers – Functions and Procedures
Database Questions and Answers – Recursive Queries and Aggregation Features
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Event Handling


2. C# Basic Programming Examples
3. C# Programming Examples on Delegates
4. Python Programming Examples on Trees
5. C Programming Examples on Strings
6. C# Programming Examples on Files
7. Java Programming Examples on Collections
8. C# Programming Examples on Threads
9. Python Programming Examples on Stacks & Queues
10. 100+ Java Android Programming Examples
11. Java Programming Examples on File Handling
12. Java Programming Examples on Utility Classes
13. Java Programming Examples on Arrays
14. C Programming Examples on File Handling
15. SQL Server Questions and Answers
16. C# Programming Examples on Events
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Recursive


Queries and Aggregation Features
« Prev
Next »

This set of Database Quiz focuses on “Recursive Queries and Aggregation Features”.

1. Any recursive view must be defined as the union of two subqueries: a _______ query that is
nonrecursive and a __________ query.
a) Base, recursive
b) Recursive, Base
c) Base, Redundant
d) View, Base
View Answer
Answer: a
Explanation: First compute the base query and add all the resultant tuples to the recursively
defined view relation.
advertisement

2. Ranking of queries is done by which of the following?


a) Group by
b) Order by
c) Having
d) Both Group by and Order by
View Answer

Answer: b
Explanation: Order by clause arranges the values in ascending or descending order where a
default is ascending order.

3. In rank() function if one value is shared by two tuples then


a) The rank order continues as counting numbers
b) The rank order continues by leaving one rank in the middle
c) The user specifies the order
d) The order does not change
View Answer

Answer: b
Explanation: Example. rank() over (order by (GPA) desc).

4. The __________ function that does not create gaps in the ordering.
a) Intense_rank()
b) Continue_rank()
c) Default_rank()
d) Dense_rank()
View Answer

Answer: d
Explanation: For dense_rank() the tuples with the second highest value all get rank 2, and tuples
with the third highest value get rank 3, and so on.

5.
advertisement
SELECT ID, GPA
FROM student grades
ORDER BY GPA
____________;

Inorder to give only 10 rank on the whole we should use


a) Limit 10
b) Upto 10
c) Only 10
d) Max 10
View Answer
Answer: a
Explanation: However, the limit clause does not support partitioning, so we cannot get the top n
within each partition without performing ranking; further, if more than one student gets the same
GPA, it is possible that one is included in the top 10, while another is excluded.

6. If there are n tuples in the partition and the rank of the tuple is r, then its ________ is defined
as (r −1)/(n−1).
a) Ntil()
b) Cum_rank
c) Percent_rank
d) rank()
View Answer

Answer: c
Explanation: Percent rank of a tuple gives the rank of the tuple as a fraction.

7. Inorder to simplify the null value confusion in the rank function we can specify
a) Not Null
b) Nulls last
c) Nulls first
d) Either Nulls last or first
View Answer

Answer: d
Explanation: select ID, rank () over (order by GPA desc nulls last) as s rank from student
grades;.
advertisement

8. Suppose we are given a view tot credits (year, num credits) giving the total number of credits
taken by students in each year. The query that computes averages over the 3 preceding tuples in
the specified sort order is
a)
SELECT YEAR, avg(num credits)
OVER (ORDER BY YEAR ROWS 3 preceding)
AS avg total credits
FROM tot credits;

b)
SELECT YEAR, avg(num credits)
OVER (ORDER BY YEAR ROWS 3 unbounded preceding)
AS avg total credits
FROM tot credits;

c) All of the mentioned


d) None of the mentioned
View Answer

Answer: a
Explanation: Suppose that instead of going back a fixed number of tuples, we want the window
to consist of all prior years we use rows unbounded preceding.
advertisement
9. The functions which construct histograms and use buckets for ranking is
a) Rank()
b) Newtil()
c) Ntil()
d) None of the mentioned
View Answer

Answer: c
Explanation: For each tuple, ntile(n) then gives the number of the bucket in which it is placed,
with bucket numbers starting with 1.

10. The command ________________ such tables are available only within the transaction
executing the query and are dropped when the transaction finishes.
a) Create table
b) Create temporary table
c) Create view
d) Create label view
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Quizzes, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Triggers
» Next - Database Questions and Answers – OLAP
Categories Database MCQsPost navigation
Database Questions and Answers – Triggers
Database Questions and Answers – OLAP
advertisement
advertisement

Recommended Posts:

1. Mining Engineering Questions and Answers


2. RDBMS Questions and Answers
3. MongoDB Questions and Answers
4. C# Programming Examples on Events
5. Python Questions and Answers
6. C# Programming Examples on Arrays
7. Java Programming Examples on Utility Classes
8. Python Programming Examples
9. SQL Server Questions and Answers
10. Computer Science Questions and Answers
11. Information Science Questions and Answers
12. Information Technology Questions and Answers
13. Programming Questions and Answers
14. Master of Computer Applications Questions and Answers
15. C# Basic Programming Examples
16. Bachelor of Computer Applications Questions and Answers
17. C# Programming Examples on LINQ
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – OLAP


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “OLAP”.

1. OLAP stands for


a) Online analytical processing
b) Online analysis processing
c) Online transaction processing
d) Online aggregate processing
View Answer

Answer: a
Explanation: OLAP is the manipulation of information to support decision making.
advertisement

2. Data that can be modeled as dimension attributes and measure attributes are called _______
data.
a) Multidimensional
b) Singledimensional
c) Measured
d) Dimensional
View Answer

Answer: a
Explanation: Given a relation used for data analysis, we can identify some of its attributes as
measure attributes, since they measure some value, and can be aggregated upon.Dimension
attribute define the dimensions on which measure attributes, and summaries of measure
attributes, are viewed.

3. The generalization of cross-tab which is represented visually is ____________ which is also


called as data cube.
a) Two dimensional cube
b) Multidimensional cube
c) N-dimensional cube
d) Cuboid
View Answer

Answer: a
Explanation: Each cell in the cube is identified for the values for the three dimensional
attributes.

4. The process of viewing the cross-tab (Single dimensional) with a fixed value of one attribute
is
a) Slicing
b) Dicing
c) Pivoting
d) Both Slicing and Dicing
View Answer

Answer: a
Explanation: The slice operation selects one particular dimension from a given cube and
provides a new sub-cube. Dice selects two or more dimensions from a given cube and provides a
new sub-cube.

5. The operation of moving from finer-granularity data to a coarser granularity (by means of
aggregation) is called a ________
a) Rollup
b) Drill down
c) Dicing
d) Pivoting
View Answer

Answer: a
Explanation: The opposite operation—that of moving fromcoarser-granularity data to finer-
granularity data—is called a drill down.
advertisement

6. In SQL the cross-tabs are created using


a) Slice
b) Dice
c) Pivot
d) All of the mentioned
View Answer

Answer: a
Explanation: Pivot (sum(quantity) for color in (’dark’,’pastel’,’white’)).

7.
{ (item name, color, clothes size), (item name, color), (item name, clothes size),
(color, clothes size), (item name), (color), (clothes size), () }
This can be achieved by using which of the following ?
a) group by rollup
b) group by cubic
c) group by
d) none of the mentioned
View Answer

Answer: d
Explanation: ‘Group by cube’ is used .
advertisement

8. What do data warehouses support?


a) OLAP
b) OLTP
c) OLAP and OLTP
d) Operational databases
View Answer

Answer: a
Explanation: None.

9.
SELECT item name, color, clothes SIZE, SUM(quantity)
FROM sales
GROUP BY rollup(item name, color, clothes SIZE);

How many grouping is possible in this rollup?


a) 8
b) 4
c) 2
d) 1
View Answer

Answer: b
Explanation: { (item name, color, clothes size), (item name, color), (item name), () }.
advertisement

10. Which one of the following is the right syntax for DECODE?
a) DECODE (search, expression, result [, search, result]… [, default])
b) DECODE (expression, result [, search, result]… [, default], search)
c) DECODE (search, result [, search, result]… [, default], expression)
d) DECODE (expression, search, result [, search, result]… [, default])
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Recursive Queries and Aggregation Features
» Next - Database Questions and Answers – Relational Algebra
Categories Database MCQsPost navigation
Database Questions and Answers – Recursive Queries and Aggregation Features
Database Questions and Answers – Relational Algebra
advertisement
advertisement

Recommended Posts:

1. C Programming Examples without using Recursion


2. Java Programming Examples on Set & String Problems & Algorithms
3. Master of Computer Applications Questions and Answers
4. Java Programming Examples on Computational Geometry Problems & Algorithms
5. C++ Programming Examples on Set & String Problems & Algorithms
6. Bachelor of Computer Applications Questions and Answers
7. Java Programming Examples on Classes
8. C Programming Examples on Computational Geometry Problems & Algorithms
9. C# Programming Examples on Data Structures
10. VHDL Questions and Answers
11. C# Programming Examples on Arrays
12. MongoDB Questions and Answers
13. SQL Server Questions and Answers
14. Computer Graphics Questions and Answers
15. RDBMS Questions and Answers
16. C Programming Examples on Searching and Sorting
17. Python Programming Examples on Searching and Sorting
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Relational


Algebra
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Relational
Algebra”.

1. Relational Algebra is a __________ query language that takes two relations as input and
produces another relation as an output of the query.
a) Relational
b) Structural
c) Procedural
d) Fundamental
View Answer

Answer: c
Explanation: This language has fundamental and other operations which are used on relations.
advertisement

2. Which of the following is a fundamental operation in relational algebra?


a) Set intersection
b) Natural join
c) Assignment
d) None of the mentioned
View Answer

Answer: d
Explanation: The fundamental operations are select, project, union, set difference, Cartesian
product, and rename.

3. Which of the following is used to denote the selection operation in relational algebra?
a) Pi (Greek)
b) Sigma (Greek)
c) Lambda (Greek)
d) Omega (Greek)
View Answer

Answer: b
Explanation: The select operation selects tuples that satisfy a given predicate.

4. For select operation the ________ appear in the subscript and the ___________ argument
appears in the paranthesis after the sigma.
a) Predicates, relation
b) Relation, Predicates
c) Operation, Predicates
d) Relation, Operation
View Answer

Answer: a
Explanation: None.
advertisement

5. The ___________ operation, denoted by −, allows us to find tuples that are in one relation but
are not in another.
a) Union
b) Set-difference
c) Difference
d) Intersection
View Answer
Answer: b
Explanation: The expression r − s produces a relation containing those tuples in r but not in s.

6. Which is a unary operation:


a) Selection operation
b) Primitive operation
c) Projection operation
d) Generalized selection
View Answer

Answer: d
Explanation: Generalization Selection takes only one argument for operation.

7. Which is a join condition contains an equality operator:


a) Equijoins
b) Cartesian
c) Natural
d) Left
View Answer

Answer: a
Explanation: None.
advertisement

8. In precedence of set operators, the expression is evaluated from


a) Left to left
b) Left to right
c) Right to left
d) From user specification
View Answer

Answer: b
Explanation: The expression is evaluated from left to right according to the precedence.

9. Which of the following is not outer join?


a) Left outer join
b) Right outer join
c) Full outer join
d) All of the mentioned
View Answer

Answer: d
Explanation: The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT
joins.

10. The assignment operator is denoted by


a) ->
b) <-
c) =
d) ==
View Answer

Answer: b
Explanation: The result of the expression to the right of the ← is assigned to the relation
variable on the left of the ←.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – OLAP
» Next - Database Questions and Answers – Tuple Relational Calculus and Domain Relational
Calculus
Categories Database MCQsPost navigation
Database Questions and Answers – OLAP
Database Questions and Answers – Tuple Relational Calculus and Domain Relational Calculus
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Arrays


2. SQL Server Questions and Answers
3. Numerical Methods Questions and Answers
4. C# Programming Examples on LINQ
5. C Programming Examples using Recursion
6. C# Programming Examples on Sorting
7. LISP Questions and Answers
8. Simple Java Programs
9. C Programming Examples on Matrix
10. Java Programming Examples on Utility Classes
11. Genetic Engineering Questions and Answers
12. Home
13. Discrete Mathematics Questions and Answers
14. C# Basic Programming Examples
15. Java Questions and Answers
16. C# Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. RDBMS Questions and Answers
20. Database Questions and Answers – Querying database part-2 DML
advertisement
Database Questions and Answers – Tuple
Relational Calculus and Domain Relational
Calculus
« Prev
Next »

This set of Database test focuses on “Tuple Relational Calculus and Domain Relational
Calculus”.

1. Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000 .
a) {t | t ε instructor ∧ t[salary] > 80000}
b) Э t ∈ r (Q(t))
c) {t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}
d) None of the mentioned
View Answer

Answer: a
Explanation: This expression is in tuple relational format.

2. A query in the tuple relational calculus is expressed as:


a) {t | P() | t}
b) {P(t) | t }
c) {t | P(t)}
d) All of the mentioned
View Answer

Answer: c
Explanation: The tuple relational calculus, is a nonprocedural query language. It describes the
desired information without giving a specific procedure for obtaining that information.
advertisement

3.
{t | Э s ε instructor (t[name] = s[name]
∧ Э u ε department (u[dept name] = s[dept name]
∧ u[building] = “Watson”))}

Which of the following best describes the query?


a) Finds the names of all instructors whose department is in the Watson building
b) Finds the names of all department is in the Watson building
c) Finds the name of the dapartment whose instructor and building is Watson
d) Returns the building name of all the departments
View Answer

Answer: a
Explanation: This query has two “there exists” clauses in our tuple-relational-calculus
expression, connected by and (∧).
advertisement
4. Which of the following symbol is used in the place of except?
a) ^
b) V
c) ¬
d) ~
View Answer

Answer: c
Explanation: The query ¬P negates the value of P.

5. “Find all students who have taken all courses offered in the Biology department.” The
expressions that matches this sentence is :
a) Э t ε r (Q(t))
b) ∀ t ε r (Q(t))
c) ¬ t ε r (Q(t))
d) ~ t ε r (Q(t))
View Answer

Answer: b
Explanation: ∀ is used denote “for all” in SQL.

6. Which of the following is the comparison operator in tuple relational calculus


a) ⇒
b) =
c) ε
d) All of the mentioned
View Answer

Answer: b
Explanation: The comparison operators are (<, ≤, =, =, >, ≥).

7. An expression in the domain relational calculus is of the form


a) {P(x1, x2, . . . , xn) | < x1, x2, . . . , xn > }
b) {x1, x2, . . . , xn | < x1, x2, . . . , xn > }
c) { x1, x2, . . . , xn | x1, x2, . . . , xn}
d) {< x1, x2, . . . , xn > | P(x1, x2, . . . , xn)}
View Answer

Answer: d
Explanation: Here x1, x2, . . . , xn represent domain variables. P represents a formula composed
of atoms, as was the case in the tuple relational calculus.
advertisement

8. Find the names of all instructors in the Physics department together with the course id of all
courses they teach:
a)
{< c > | Э s (< c, a, s, y, b, r, t >ε section
∧s = “Fall” ∧ y = “2009”
∨Эu (< c, a, s, y, b, r, t >ε section
∧s = “Spring” ∧ y = “2010”
b)
{< n, c > | Э i, a (< i, c, a, s, y > ε teaches
∧ Э d, s (< i, n, d, s > ε instructor ∧ d = “Physics”))}

c)
{< n > | Э i, d, s (< i, n, d, s > ε instructor ∧ s > 80000)}

d)
{< i, n, d, s > | < i, n, d, s > ε instructor ∧ s > 80000}
View Answer
Answer: b
Explanation: None.

9. In domain relaional calculus “there exist” can be expressed as


a) (P1(x))
b) (P1(x)) Э x
c) V x (P1(x))
d) Э x (P1(x))
View Answer

Answer: d
Explanation:Э is used to denote “some” values in relational calculus.
advertisement

10. A set of possible data values is called


a) Attribute
b) Degree
c) Tuple
d) Domain
View Answer

Answer: d
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for tests, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Relational Algebra
» Next - Database Questions and Answers – The Entity-Relationship Model
Categories Database MCQsPost navigation
Database Questions and Answers – Relational Algebra
Database Questions and Answers – The Entity-Relationship Model
advertisement
advertisement

Recommended Posts:

1. MongoDB Questions and Answers


2. Recruitment Support Service – Employers
3. SQL Server Questions and Answers
4. RDBMS Questions and Answers
5. MySQL Database Questions and Answers
6. Oracle Database Questions and Answers
7. Database Management System Questions and Answers
8. Database Questions and Answers – SQL Basics and SQL Data Definition
9. Database Questions and Answers – Integrity Constraints
10. RDBMS Questions and Answers – Features of Good Relational Design
11. Database Questions and Answers – Database Design Process
12. Database Questions and Answers – Functional-Dependency Theory
13. Database Questions and Answers – Authorizations
14. Database Questions and Answers – SQL Queries
15. Database Questions and Answers – SQL Data Types and Schemas
16. Database Questions and Answers – Basic SQL Operations
17. Database Questions and Answers – Transformation of Relational Expressions
18. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
19. Database Questions and Answers – Relational Algebra
20. Database Questions and Answers – Querying database part-1 DDL
advertisement

Database Questions and Answers – The Entity-


Relationship Model
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “The Entity-
Relationship Model”.

1. An ________ is a set of entities of the same type that share the same properties, or attributes.
a) Entity set
b) Attribute set
c) Relation set
d) Entity model
View Answer

Answer: a
Explanation: An entity is a “thing” or “object” in the real world that is distinguishable from all
other objects.
advertisement

2. Entity is a _________
a) Object of relation
b) Present working model
c) Thing in real world
d) Model of relation
View Answer

Answer: c
Explanation: For example, each person in a university is an entity.

3. The descriptive property possessed by each entity set is _________


a) Entity
b) Attribute
c) Relation
d) Model
View Answer

Answer: b
Explanation: Possible attributes of the instructor entity set are ID, name, dept name, and salary.

4. The function that an entity plays in a relationship is called that entity’s _____________
a) Participation
b) Position
c) Role
d) Instance
View Answer

Answer: c
Explanation: A relationship is an association among several entities.

5. The attribute name could be structured as an attribute consisting of first name, middle initial,
and last name. This type of attribute is called
a) Simple attribute
b) Composite attribute
c) Multivalued attribute
d) Derived attribute
View Answer

Answer: b
Explanation: Composite attributes can be divided into subparts (that is, other attributes).
advertisement

6. The attribute AGE is calculated from DATE_OF_BIRTH. The attribute AGE is


a) Single valued
b) Multi valued
c) Composite
d) Derived
View Answer
Answer: d
Explanation: The value for this type of attribute can be derived from the values of other related
attributes or entities.

7. Not applicable condition can be represented in relation entry as


a) NA
b) 0
c) NULL
d) Blank Space
View Answer

Answer: c
Explanation: NULL always represents that the value is not present.

8. Which of the following can be a multivalued attribute?


a) Phone_number
b) Name
c) Date_of_birth
d) All of the mentioned
View Answer

Answer: a
Explanation: Name and Date_of_birth cannot hold more than 1 value.

9. Which of the following is a single valued attribute


a) Register_number
b) Address
c) SUBJECT_TAKEN
d) Reference
View Answer

Answer: a
Explanation: None.
advertisement

10. In a relation between the entities the type and condition of the relation should be specified.
That is called as______attribute.
a) Desciptive
b) Derived
c) Recursive
d) Relative
View Answer

Answer: a
Explanation: Consider the entity sets student and section, which participate in a relationship set
takes. We may wish to store a descriptive attribute grade with the relationship to record the
grade that a student got in the class.

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

The Entity-Relationship Model

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Tuple Relational Calculus and Domain Relational
Calculus
» Next - Database Questions and Answers – Constraints
Categories Database MCQsPost navigation
Database Questions and Answers – Tuple Relational Calculus and Domain Relational Calculus
Database Questions and Answers – Constraints
advertisement
advertisement

Recommended Posts:

1. C++ Questions and Answers


2. Software Engineering Questions & Answers
3. Hazardous Waste Management Questions and Answers
4. Information Technology Questions and Answers
5. C# Programming Examples on Inheritance
6. HTML Questions and Answers
7. SQL Server Questions and Answers
8. Master of Computer Applications Questions and Answers
9. JUnit Questions and Answers
10. Bachelor of Computer Applications Questions and Answers
11. Home
12. C# Programming Examples on Functions
13. Statistical Quality Control Questions and Answers
14. Software Architecture & Design Questions and Answers
15. MongoDB Questions and Answers
16. VHDL Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Constraints


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Constraints”.
1. _____________ express the number of entities to which another entity can be associated via a
relationship set.
a) Mapping Cardinality
b) Relational Cardinality
c) Participation Constraints
d) None of the mentioned
View Answer

Answer: a
Explanation: Mapping cardinality is also called as cardinality ratio.
advertisement

2. An entity in A is associated with at most one entity in B, and an entity in B is associated with
at most one entity in A.This is called as
a) One-to-many
b) One-to-one
c) Many-to-many
d) Many-to-one
View Answer

Answer: b
Explanation: Here one entity in one set is related to one one entity in other set.

3. An entity in A is associated with at most one entity in B. An entity in B, however, can be


associated with any number (zero or more) of entities in A.
a) One-to-many
b) One-to-one
c) Many-to-many
d) Many-to-one
View Answer

Answer: d
Explanation: Here more than one entity in one set is related to one one entity in other set.

4. Data integrity constraints are used to:


a) Control who is allowed access to the data
b) Ensure that duplicate records are not entered into the table
c) Improve the quality of data entered for a specific property
d) Prevent users from changing the values stored in the table
View Answer

Answer: c
Explanation: The data entered will be in a particular cell (i.e., table column).
advertisement

5. Establishing limits on allowable property values, and specifying a set of acceptable,


predefined options that can be assigned to a property are examples of:
a) Attributes
b) Data integrity constraints
c) Method constraints
d) Referential integrity constraints
View Answer

Answer: b
Explanation: Only particular value satisfying the constraints are entered in the column.

6. Which of the following can be addressed by enforcing a referential integrity constraint?


a) All phone numbers must include the area code
b) Certain fields are required (such as the email address, or phone number) before the record is
accepted
c) Information on the customer must be known before anything can be sold to that customer
d) Then entering an order quantity, the user must input a number and not some text (i.e., 12
rather than ‘a dozen’)
View Answer

Answer: c
Explanation: None.

7. ______ is a special type of integrity constraint that relates two relations & maintains
consistency across the relations.
a) Entity Integrity Constraints
b) Referential Integrity Constraints
c) Domain Integrity Constraints
d) Domain Constraints
View Answer

Answer: b
Explanation: None.
advertisement

8. Which one of the following uniquely identifies the elements in the relation?
a) Secondary Key
b) Primary key
c) Foreign key
d) Composite key
View Answer

Answer: b
Explanation: Primary key checks for not null and uniqueness constraint.

9. Drop Table cannot be used to drop a table referenced by a _________ constraint.


a) Local Key
b) Primary Key
c) Composite Key
d) Foreign Key
View Answer

Answer: d
Explanation: Foreign key is used when primary key of one relation is used in another relation.
10. ____________ is preferred method for enforcing data integrity
a) Constraints
b) Stored Procedure
c) Triggers
d) Cursors
View Answer

Answer: a
Explanation: Constraints are specified to restrict entries in the relation.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – The Entity-Relationship Model
» Next - Database Questions and Answers – Entity-Relationship Diagrams
Categories Database MCQsPost navigation
Database Questions and Answers – The Entity-Relationship Model
Database Questions and Answers – Entity-Relationship Diagrams
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Collections


2. C Programming Examples on Combinatorial Problems & Algorithms
3. JUnit Questions and Answers
4. VHDL Questions and Answers
5. Java Programming Examples on Combinatorial Problems & Algorithms
6. Avionics Questions and Answers
7. C Programming Examples on Linked List
8. C++ Programming Examples on Combinatorial Problems & Algorithms
9. LISP Questions and Answers
10. Java Programming Examples on Utility Classes
11. MongoDB Questions and Answers
12. Aircraft Maintenance Questions and Answers
13. Hadoop Questions and Answers
14. C# Programming Examples on Mathematics
15. C# Basic Programming Examples
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Entity-


Relationship Diagrams
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Entity-
Relationship Diagrams”.

1. Which of the following gives a logical structure of the database graphically?


a) Entity-relationship diagram
b) Entity diagram
c) Database diagram
d) Architectural representation
View Answer

Answer: a
Explanation: E-R diagrams are simple and clear—qualities that may well account in large part
for the widespread use of the E-R model.
advertisement

2. The entity relationship set is represented in E-R diagram as


a) Double diamonds
b) Undivided rectangles
c) Dashed lines
d) Diamond
View Answer

Answer: d
Explanation: Dashed lines link attributes of a relationship set to the relationship set.

3. The Rectangles divided into two parts represents


a) Entity set
b) Relationship set
c) Attributes of a relationship set
d) Primary key
View Answer

Answer: a
Explanation: The first part of the rectangle, contains the name of the entity set. The second part
contains the names of all the attributes of the entity set.

4. Consider a directed line(->) from the relationship set advisor to both entity sets instructor and
student. This indicates _________ cardinality
a) One to many
b) One to one
c) Many to many
d) Many to one
View Answer

Answer: b
Explanation: This indicates that an instructor may advise at most one student, and a student may
have at most one advisor.
advertisement

5. We indicate roles in E-R diagrams by labeling the lines that connect ___________ to
__________
a) Diamond , diamond
b) Rectangle, diamond
c) Rectangle, rectangle
d) Diamond, rectangle
View Answer

Answer: d
Explanation: Diamond represents a relationship set and rectangle represents a entity set.

6. An entity set that does not have sufficient attributes to form a primary key is termed a
__________
a) Strong entity set
b) Variant set
c) Weak entity set
d) Variable set
View Answer

Answer: c
Explanation: An entity set that has a primary key is termed a strong entity set.

7. For a weak entity set to be meaningful, it must be associated with another entity set, called the
a) Identifying set
b) Owner set
c) Neighbour set
d) Strong entity set
View Answer

Answer: a
Explanation: Every weak entity must be associated with an identifying entity; that is, the weak
entity set is said to be existence dependent on the identifying entity set. The identifying entity
set is said to own the weak entity set that it identifies. It is also called as owner entity set.
advertisement

8. Weak entity set is represented as


a) Underline
b) Double line
c) Double diamond
d) Double rectangle
View Answer
Answer: c
Explanation: An entity set that has a primary key is termed a strong entity set.

9. If you were collecting and storing information about your music collection, an album would
be considered a(n) _____
a) Relation
b) Entity
c) Instance
d) Attribute
View Answer

Answer: b
Explanation: An entity set is a logical container for instances of an entity type and instances of
any type derived from that entity type.

10. What term is used to refer to a specific record in your music database; for instance;
information stored about a specific album?
a) Relation
b) Instance
c) Table
d) Column
View Answer

Answer: b
Explanation: The environment of database is said to be an instance. A database instance or an
‘instance’ is made up of the background processes needed by the database.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Constraints
» Next - Database Questions and Answers – Reduction to Relational Schemas
Categories Database MCQsPost navigation
Database Questions and Answers – Constraints
Database Questions and Answers – Reduction to Relational Schemas
advertisement
advertisement

Recommended Posts:

1. Information Technology Questions and Answers


2. C++ Programming Examples on Data-Structures
3. Heat Transfer Operations Questions and Answers
4. Master of Computer Applications Questions and Answers
5. Cloud Computing Questions and Answers
6. Bachelor of Computer Applications Questions and Answers
7. C# Programming Examples on Functions
8. C# Programming Examples on Networking
9. Computer Graphics Questions and Answers
10. C Programming Examples on Data-Structures
11. C# Programming Examples on Mathematics
12. C# Programming Examples on Inheritance
13. Java Programming Examples on Mathematical Functions
14. Java Programming Examples on Classes
15. VHDL Questions and Answers
16. RDBMS Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. Database Management System Questions and Answers
20. Database Questions and Answers – Relational Query Operations and Relational
Operators
advertisement

Database Questions and Answers – Reduction to


Relational Schemas
« Prev
Next »

This set of Database Problems focuses on “Reduction to Relational Schemas”.

Consider the following relational schemas and answer the questions below

The section relation


Course_id Sec_id Semester Year Building
BIO-101 1 Spring 2010 Painter
CS-102 4 Summer 2009 Packyard
EE-201 3 Fall 2010 Watson
FIN-301 1 Spring 2011 Richard

advertisement
The teaches relation
Id Course_id Sec_id Semester Year
1001 CS-101 1 Fall 2009
1002 EE-201 2 Spring 2010
1003 FIN-301 3 Fall 2009
1004 BIO-101 1 Summer 2011

1. Which one of the following can be treated as a primary key in teaches relation?
a) Id
b) Semester
c) Sec_id
d) Year
View Answer

Answer: a
Explanation: Here Id is the only attribute that has to have a unique entry.

2. The primary key in the section relation is


a) Course_id
b) Sec_id
c) Both Course_id and Sec_id
d) All the attributes
View Answer

Answer: c
Explanation: Both the entries has unique entry.

3.
advertisement
SELECT * FROM teaches WHERE Sec_id = 'CS-101';

Which of the following Id is selected for the following query?


a) 1003
b) 1001
c) None
d) Error message appears
View Answer

Answer: d
Explanation: The value CS-101 matches the Course_id but not Id.

4.
SELECT Id, Course_id, Building FROM SECTION s AND teaches t WHERE t.year=2009;

Which of the following Id are displayed?


a) 1003
b) 1001
c) Both 1003 and 1001
d) Error message appears
View Answer

Answer: c
Explanation: Two rows are select in the above query.
advertisement

5. The query which selects the Course_id ‘CS-101’ from the section relation is
a) Select Course_id from section where Building = ‘Richard’;
b) Select Course_id from section where Year = ‘2009’;
c) Select Course_id from teaches where Building = ‘Packyard’;
d) Select Course_id from section where Sec_id = ‘3’;
View Answer

Answer: b
Explanation: The year ‘2009’ should be selected from the section relation.

6.
CREATE TABLE SECTION
(Course_id VARCHAR (8),
Sec_id VARCHAR (8),
Semester VARCHAR (6),
YEAR NUMERIC (4,0),
Building NUMERIC (15),
PRIMARY KEY (course id, sec id, semester, YEAR),
FOREIGN KEY (course id) REFERENCES course);

Which of the following has an error in the above create table for the relation section
a) Primary key (course id, sec id, semester, year)
b) Foreign key (course id) references course
c) Year numeric (4,0)
d) Building numeric (15)
View Answer

Answer: d
Explanation: It should be replaced by Year Building varchar (15).

7. The relation with primary key can be created using


a) Create table instructor (Id, Name)
b) Create table instructor (Id, Name, primary key(name))
c) Create table instructor (Id, Name, primary key (Id))
d) Create table instructor ( Id unique, Name )
View Answer

Answer: c
Explanation: The value Name cannot be a primary key.
advertisement

8. How can the values in the relation teaches be deleted?


a) Drop table teaches;
b) Delete from teaches;
c) Purge table teaches;
d) Delete from teaches where Id =’Null’;
View Answer

Answer: b
Explanation: Delete table cleans the entry from the table.

9. In the above teaches relation ” Select * from teaches where Year = ‘2010’” displays how
many rows?
a) 2
b) 4
c) 5
d) 1
View Answer

Answer: a
Explanation: There are two tuples with the year is 2009.

10. The relation changes can be got back using ________ command
a) Flashback
b) Purge
c) Delete
d) Getback
View Answer

Answer: a
Explanation: Purge deletes the table and delete cleans the table entry.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Problems, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Entity-Relationship Diagrams
» Next - Database Questions and Answers – Entity-Relationship Design Issues
Categories Database MCQsPost navigation
Database Questions and Answers – Entity-Relationship Diagrams
Database Questions and Answers – Entity-Relationship Design Issues
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Java.Lang


2. Java Programming Examples on Collections
3. Dairy Engineering Questions and Answers
4. C# Programming Examples on Files
5. Python Programming Examples on Searching and Sorting
6. Java Programming Examples on Event Handling
7. Java Programming Examples on Arrays
8. C# Programming Examples on Delegates
9. SQL Server Questions and Answers
10. RDBMS Questions and Answers
11. C# Programming Examples on LINQ
12. C Programming Examples on Stacks & Queues
13. C# Basic Programming Examples
14. C Programming Examples on File Handling
15. Python Programming Examples on Stacks & Queues
16. C# Programming Examples on Events
17. Java Programming Examples on Utility Classes
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Entity-


Relationship Design Issues
« Prev
Next »

This set of Database online test focuses on “Entity-Relationship Design Issues”.

1. Let us consider phone_number ,which can take single or several values .


Treating phone_numberas an _________ permits instructors to have several phone numbers
(including zero) associated with them.
a) Entity
b) Attribute
c) Relation
d) Value
View Answer

Answer: a
Explanation: Treating a phone as an attribute phone_number implies that instructors have
precisely one phone number each.
advertisement

2. The total participation by entities is represented in E-R diagram as


a) Dashed line
b) Double line
c) Double rectangle
d) Circle
View Answer

Answer: b
Explanation: It is used to represent the relation between several attributes.

3. Given the basic ER and relational models, which of the following is INCORRECT?
a) An attribute of an entity can have more than one value
b) An attribute of an entity can be composite
c) In a row of a relational table, an attribute can have more than one value
d) In a row of a relational table, an attribute can have exactly one value or a NULL value
View Answer
Answer: c
Explanation: It is possible to have several values for a single attribute provide it is a multi-
valued attribute.

4. Which of the following indicates the maximum number of entities that can be involved in a
relationship?
a) Minimum cardinality
b) Maximum cardinality
c) ERD
d) Greater Entity Count
View Answer

Answer: b
Explanation: In SQL (Structured Query Language), the term cardinality refers to the uniqueness
of data values contained in a particular column (attribute) of a database table.
advertisement

5. In E-R diagram generalization is represented by


a) Ellipse
b) Dashed ellipse
c) Rectangle
d) Triangle
View Answer

Answer: d
Explanation: Ellipse represents attributes, rectangle represents entity.

6. What is a relationship called when it is maintained between two entities?


a) Unary
b) Binary
c) Ternary
d) Quaternary
View Answer

Answer: b
Explanation: Binary word usually represents two attributes.

7. Which of the following is a low level operator?


a) Insert
b) Update
c) Delete
d) Directory
View Answer

Answer: d
Explanation: Directory is a low level to word on in file system.
advertisement

8. Key to represent relationship between tables is called


a) Primary key
b) Secondary Key
c) Foreign Key
d) None of the mentioned
View Answer

Answer: c
Explanation: Primary key of one relation used as an attribute in another relation is called foreign
key.

9. A window into a portion of a database is


a) Schema
b) View
c) Query
d) Data dictionary
View Answer

Answer: b
Explanation: View is a logical portion of a database which is needed by some users.

10. A primary key is combined with a foreign key creates


a) Parent-Child relation ship between the tables that connect them
b) Many to many relationship between the tables that connect them
c) Network model between the tables that connect them
d) None of the mentioned
View Answer

Answer: a
Explanation: Using the two relationships mother and father provides us a record of a child’s
mother, even if we are not aware of the father’s identity; a null value would be required if the
ternary relationship parent is used. Using binary relationship sets is preferable in this case.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for online tests, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Reduction to Relational Schemas
» Next - Database Questions and Answers – Extended E-R Features
Categories Database MCQsPost navigation
Database Questions and Answers – Reduction to Relational Schemas
Database Questions and Answers – Extended E-R Features
advertisement
advertisement

Recommended Posts:
1. C++ Programming Examples on STL
2. Design of Electrical Machines Questions and Answers
3. C# Programming Examples on Data Structures
4. Java Programming Examples on Collections
5. Software Architecture & Design Questions and Answers
6. C Programming Examples on Linked List
7. Python Programming Examples on Linked Lists
8. Data Structure Questions and Answers
9. Java Programming Examples on Utility Classes
10. C# Programming Examples on Networking
11. C Programming Examples on Stacks & Queues
12. C++ Programming Examples on Data-Structures
13. Java Programming Examples on Data-Structures
14. Python Programming Examples on Stacks & Queues
15. Home
16. RDBMS Questions and Answers
17. C Programming Examples on Data-Structures
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Extended E-R


Features
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Extended E-R
Features”.

1. The entity set person is classified as student and employee. This process is called _________
a) Generalization
b) Specialization
c) Inheritance
d) Constraint generalization
View Answer

Answer: b
Explanation: The process of designating subgroupings within an entity set is called
specialization.
advertisement

2. Which relationship is used to represent a specialization entity?


a) ISA
b) AIS
c) ONIS
d) WHOIS
View Answer

Answer: a
Explanation: In terms of an E-R diagram, specialization is depicted by a hollow arrow-head
pointing from the specialized entity to the other entity.

3. The refinement from an initial entity set into successive levels of entity subgroupings
represents a ________ design process in which distinctions are made explicit.
a) Hierarchy
b) Bottom-up
c) Top-down
d) Radical
View Answer

Answer: c
Explanation: The design process may also proceed in a bottom-up manner, in which multiple
entity sets are synthesized into a higher-level entity set on the basis of common features.

4. There are similarities between the instructor entity set and the secretary entity set in the sense
that they have several attributes that are conceptually the same across the two entity sets:
namely, the identifier, name, and salary attributes. This process is called
a) Commonality
b) Specialization
c) Generalization
d) Similarity
View Answer

Answer: c
Explanation: Generalization is used to emphasize the similarities among lower-level entity sets
and to hide the differences.
advertisement

5. If an entity set is a lower-level entity set in more than one ISA relationship, then the entity set
has
a) Hierarchy
b) Multilevel inheritance
c) Single inheritance
d) Multiple inheritance
View Answer

Answer: d
Explanation: The attributes of the higher-level entity sets are said to be inherited by the lower-
level entity sets.

6. A _____________ constraint requires that an entity belong to no more than one lower-level
entity set.
a) Disjointness
b) Uniqueness
c) Special
d) Relational
View Answer

Answer: a
Explanation: For example, student entity can satisfy only one condition for the student type
attribute; an entity can be either a graduate student or an undergraduate student, but cannot be
both.

7. Consider the employee work-team example, and assume that certain employees participate in
more than one work team. A given employee may therefore appear in more than one of the team
entity sets that are lower level entity sets of employee. Thus, the generalization is
_____________
a) Overlapping
b) Disjointness
c) Uniqueness
d) Relational
View Answer

Answer: a
Explanation: In overlapping generalizations, the same entity may belong to more than one
lower-level entity set within a single generalization.
advertisement

8. The completeness constraint may be one of the following: Total generalization or


specialization, Partial generalization or specialization. Which is the default?
a) Total
b) Partial
c) Should be specified
d) Cannot be determined
View Answer

Answer: b
Explanation: Partial generalization or specialization – Some higher-level entities may not belong
to any lower-level entity set.

9. Functional dependencies are a generalization of


a) Key dependencies
b) Relation dependencies
c) Database dependencies
d) None of the mentioned
View Answer

Answer: a
Explanation: The subclasses are combined to form the superclass.

10. Which of the following is another name for a weak entity?


a) Child
b) Owner
c) Dominant
d) All of the mentioned
View Answer

Answer: a
Explanation: A parent may be called as a strong entity.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Entity-Relationship Design Issues
» Next - Database Questions and Answers – Querying database part-1 DDL
Categories Database MCQsPost navigation
Database Questions and Answers – Entity-Relationship Design Issues
Database Questions and Answers – Querying database part-1 DDL
advertisement
advertisement

Recommended Posts:

1. Master of Computer Applications Questions and Answers


2. C++ Questions and Answers
3. Bachelor of Computer Applications Questions and Answers
4. Java Programming Examples on Arrays
5. Java Programming Examples
6. Java Questions and Answers
7. Object Oriented Programming Questions and Answers
8. RDBMS Questions and Answers
9. C# Programming Examples
10. C# Programming Examples on LINQ
11. Python Questions and Answers
12. C Programming Examples on File Handling
13. C# Programming Examples on Strings
14. Java Programming Examples on Classes
15. C# Programming Examples on Networking
16. Java Programming Examples on Inheritance
17. MySQL Database Questions and Answers
18. C# Programming Examples on Inheritance
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement
Database Questions and Answers – Querying
database part-1 DDL
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Querying
database part-1 DDL”.

SQL data definition for part of the university database.


advertisement
CREATE TABLE department
(dept_name VARCHAR (20),
building VARCHAR (15),
budget NUMBER,
PRIMARY KEY (dept_name));

CREATE TABLE course


(course_id VARCHAR (7),
title VARCHAR (50),
dept_name VARCHAR (20),
credits NUMERIC (2,0),
PRIMARY KEY (course_id),
FOREIGN KEY (dept_name) __________ department);

CREATE TABLE instructor


(ID VARCHAR (5),
name VARCHAR (20) NOT NULL,
dept_name VARCHAR (20),
salary NUMERIC (8,2),
FOREIGN KEY (dept_name) _______ department);

CREATE TABLE SECTION


(course_id VARCHAR (8),
sec_id VARCHAR (8),
semester VARCHAR (6),
YEAR NUMERIC (4,0),
building VARCHAR (15),
room_number VARCHAR (7),
time_slot id VARCHAR (4),
PRIMARY KEY (course_id, sec_id, semester, YEAR),
FOREIGN KEY (_______) ______ course);

CREATE TABLE teaches


(ID VARCHAR (5),
course_id VARCHAR (8),
sec_id VARCHAR (8),
semester VARCHAR (6),
YEAR NUMERIC (4,0),
PRIMARY KEY (ID, course_id, sec_id, semester, YEAR),
FOREIGN KEY (course_id, sec_id, semester, YEAR) REFERENCES SECTION,
FOREIGN KEY (ID) _______ instructor);

Answer questions based on the above commands

1. Which is the main relation which is used in the university database which is referenced by all
other relation of the university?
a) Teaches
b) Course
c) Department
d) Section
View Answer

Answer: c
Explanation: Department is the only relation which forms the main part of the university
database.

2. The department relation has the an entry budget whose type has to be replaced by
a) Varchar (20)
b) Varchar2 (20)
c) Numeric (12,2)
d) Numeric
View Answer

Answer: c
Explanation: Department is the only relation which forms the main part of the university
database.
advertisement

3. In the course relation, the title field should throw an error in case of any missing title. The
command to be added in title is
a) Unique
b) Not null
c) 0
d) Null
View Answer

Answer: b
Explanation: By specifying not null the value cannot be left blank.

4. In the above DDL command the foreign key entries are got by using the keyword
a) References
b) Key reference
c) Relating
d) None of the mentioned
View Answer

Answer: a
Explanation: References (table_name) give the prior table name for the entry.

5. Identify the error in the section relation


a) No error
b) Year numeric (4,0)
c) Building varchar (15)
d) Sec_id varchar (8)
View Answer
Answer: a
Explanation: The building and the sec_id have varchar values and year is of numeric type. So no
such errors are found in the relation.

6. The following entry is given in to the instructor relation .


advertisement
(100202,Drake,Biology,30000)

Identify the output of the query given


a) Row(s) inserted
b) Error in ID of insert
c) Error in Name of insert
d) Error in Salary of the insert
View Answer

Answer: b
Explanation: The varchar(5) value cannot hold the entry 100202.

7. Which of the following can be used as a primary key entry of the instructor relation.
a) DEPT_NAME
b) NAME
c) ID
d) All of the mentioned
View Answer

Answer: c
Explanation: The value ID can only be primary key unlike dept_name which is used as a foreign
key.

8. In the section relation which of the following is used as a foreign key?


a) Course_id
b) Course_id,sec_id
c) Room_number
d) Course_id,sec_id,room_number
View Answer

Answer: a
Explanation: Course_id is the only field which is present in the course relation.
advertisement

9. In order to include an attribute Name to the teaches relation which of the following command
is used?
a) Alter table teaches include Name;
b) Alter table teaches add Name;
c) Alter table teaches add Name varchar;
d) Alter table teaches add Name varchar(20);
View Answer

Answer: d
Explanation: The form of the alter table command is
alter table r add AD;
where r is the name of an existing relation, A is the name of the attribute to be added, and D is
the type of the added attribute.

10. To replace the relation section with some other relation the initial step to be carried out is
a) Delete section;
b) Drop section;
c) Delete from section;
d) Replace section new_table ;
View Answer

Answer: b
Explanation: Droping the table drops all the references to that table.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Extended E-R Features
» Next - Database Questions and Answers – Querying database part-2 DML
Categories Database MCQsPost navigation
Database Questions and Answers – Extended E-R Features
Database Questions and Answers – Querying database part-2 DML
advertisement
advertisement

Recommended Posts:

1. Microprocessor Questions & Answers


2. C# Programming Examples on Mathematics
3. Numerical Methods Questions and Answers
4. MATLAB Questions and Answers
5. Compilers Questions and Answers
6. C++ Questions and Answers
7. Genetic Engineering Questions and Answers
8. PHP Questions and Answers
9. Simple C Programs
10. RDBMS Questions and Answers
11. Java Programming Examples on Utility Classes
12. MongoDB Questions and Answers
13. C# Basic Programming Examples
14. Python Questions and Answers
15. Simple Java Programs
16. SQL Server Questions and Answers
17. JUnit Questions and Answers
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Querying


database part-2 DML
« Prev
Next »
This set of Database Questions & Answers focuses on “Querying database part-1 DML”
The instructor relation
ID Name Dept_name Salary
10101 Hayley Comp.Sci. 65000
12121 Jackson Finance 90000
15151 Nathan Music 87000
22222 April Biology 73000
34345 Crick Comp.Sci. 100000
The course relation
Course_id Title Dept_name Credits
CS-101 Robotics Comp.Sci. 5
BIO-244 Genetics Biology 4
PHY-333 Physical Principles Physics 3
MUS-562 Music Video Production Music 2
FIN-101 Investment Banking Finance 3
advertisement

Answer the questions based on the above relations

1. Which of the following command is used to display the departments of the instructor relation?
a) Select * from instructor where Dept_name = Finance;
b) Select * from instructor ;
c) Select dept_name from instructor;
d) Select dept_name for instructor where Name=Jackson;
View Answer

Answer: c
Explanation: Only one field is necessary for the query and where clause is not needed for the
selection.

2. How can we select the elements which have common Dept_name in both the relation ?
a) Select * from instructor i , course c where i.Dept_name=c.Dept_name;
b) Select Dept name from instructor ,Course ;
c) Select * from instructor i , course c ;
d) Select Dept_name from instructor where Dept_name = NULL;
View Answer
Answer: a
Explanation: Here only the common elements are displayed .

3. Select distinct Dept_name from instructor ;


How many row(s) are displayed ?
a) 4
b) 3
c) 5
d) Error
View Answer

Answer: a
Explanation: Distinct keyword eliminates the the common Dept_name .
advertisement

4. Suppose the Authority want to include a new instructor for the title Neuroscience what
command should be inserted ?
a) Insert into instructor values(12111,Emma,NeuroScience,200000);
b) Insert into course values(12111,Introduction,NeuroScience,2);
c)
Insert into instructor values(12111,Emma,Biology,200000);
Insert into course values(BIO-112,Introduction to Neuro Science,NeuroScience,2);

d) Insert into course values(12111,Emma,NeuroScience,200000);


View Answer

Answer: c
Explanation: The values have to be inserted into both the relations to be intact .

5. If a person all the people in Music department gets fired which of the following has to be
performed on the instructor relation ?
a) Delete Dept_name=Music in instructor;
b) Delete from instructor where Dept_name=Music;
c) Remove Dept_name= Music
d) All of the mentioned
View Answer

Answer: b
Explanation: Delete from table_name where condition .

6.
SELECT DISTINCT T.name
FROM instructor AS T, instructor AS S
WHERE T.salary > S.salary AND S.dept name = ’Comp.Sci.’;

What will be displayed as the value of name for the above query?
a) Hayley
b) Jackson
c) Hayley and Crick
d) Crick
View Answer

Answer: d
Explanation: Only the greatest salary in Comp.Sci dept is selected for the query.
advertisement

7.
SELECT Name
FROM instructor
WHERE salary > SOME (SELECT salary FROM instructor WHERE dept_name = 'Comp.Sci.');

How many rows are selected ?


a) 3
b) 4
c) 2
d) 1
View Answer

Answer: d
Explanation: This displays the names of instructors with salary greater than that of some (at least
one) instructor in the Biology department .

8. How will you select the Names whose first letter is E ?


a)
advertisement
SELECT Name
FROM instructor
WHERE Name LIKE ’A%;

b)
SELECT Name
FROM course
WHERE Name LIKE ’A%;

c)
SELECT Dept_name
FROM instructor
WHERE Name LIKE ’A%;

d)
SELECT Name
FROM instructor
WHERE Dept_name LIKE ’A%;
View Answer
Answer: a
Explanation: % is used to indicate that some characters may appear .
9. Which function is used to find the count of distinct departments?
a) Dist
b) Distinct
c) Count
d) Count,Dist
View Answer

Answer: a
Explanation: Count (distinct ID) is the correct usage.

10. Which function is used to identify the title with Least scope?
a) Min(Credits)
b) Max(Credits)
c) Min(title)
d) Min(Salary)
View Answer

Answer: a
Explanation: Max is used to find the highest element and Min is used to find the lowest element.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Freshers, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Querying database part-1 DDL
» Next - Database Questions and Answers – Atomic Domains
Categories Database MCQsPost navigation
Database Questions and Answers – Querying database part-1 DDL
Database Questions and Answers – Atomic Domains
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Arrays


2. RDBMS Questions and Answers
3. Recruitment Support Service – Employers
4. MySQL Database Questions and Answers
5. Database Management System Questions and Answers
6. Oracle Database Questions and Answers
7. Database Questions and Answers – Tuple Relational Calculus and Domain Relational
Calculus
8. Database Questions and Answers – SQL Data Types and Schemas
9. Database Questions and Answers – Reduction to Relational Schemas
10. SQL Server Questions and Answers – Aggregation of Data
11. Database Questions and Answers – Authorizations
12. Database Questions and Answers – Querying database part 3
13. SQL Server Questions and Answers – Modifying Data – 1
14. Database Questions and Answers – Functional-Dependency Theory
15. Database Questions and Answers – Querying Database – 4
16. SQL Server Questions and Answers – Subqueries
17. Database Questions and Answers – Functions and Procedures
18. Database Questions and Answers – Null Values Operations
19. Database Questions and Answers – Relational Database and Database Schema
20. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
advertisement

Database Questions and Answers – Atomic


Domains
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Atomic
Domains”.

1. A domain is ______ if elements of the domain are considered to be indivisible units.


a) Atomic
b) Subatomic
c) Substructure
d) Subset
View Answer

Answer: a
Explanation: A set of names is an example of a nonatomic value.
advertisement

2. Identify the composite attributes


a) Salary
b) Credits
c) Section_id
d) None of the mentioned
View Answer

Answer: d
Explanation: Composite attributes, such as an attribute address with component attributes street,
city, state, and zip have nonatomic domains.

3. Consider the relation given below and ind the maximum normal form applicable to them
i. R(A, B) WITH productions { A --> B }
ii. R(A, B) WITH productions { B --> A }
iii. R(A, B) WITH productions {A —> B, B --> A }
iv. R(A, B, C) WITH productions {A -->B, B --> A, AB --> C }
a) i, ii and iii are in 3NF and iv is in BCNF
b) i and ii are in BCNF and iii and iv are in 3NF
c) All are in 3NF
d) All are in BCNF
View Answer

Answer: d
Explanation: One of the more desirable normal forms that we can obtain is Boyce–Codd normal
form (BCNF). It eliminates all redundancy that can be discovered based on functional
dependencies.
advertisement

4. Which one is based on multi-valued dependency:


a) First
b) Second
c) Third
d) Fourth
View Answer

Answer: d
Explanation: One of the more desirable normal forms that we can obtain is Boyce–Codd normal
form (BCNF). It eliminates all redundancy that can be discovered based on functional
dependencies.

5. If a relation is in BCNF, then it is also in


a) 1 NF
b) 2 NF
c) 3 NF
d) All of the mentioned
View Answer

Answer: d
Explanation: Third normal form (3NF) relaxes this constraint slightly by allowing certain
nontrivial functionaldependencieswhose left side is not a superkey.

6. If every non-key attribute is functionally dependent primary key, then the relation will be in
a) First normal form
b) Second normal form
c) Third form
d) Fourth normal form
View Answer

Answer: b
Explanation: Third normal form (3NF) relaxes this constraint slightly by allowing certain
nontrivial functionaldependencieswhose left side is not a superkey.

7. If an attribute of a composite key is dependent on an attribute of the other composite key, a


normalization called _____ is needed.
a) DKNF
b) BCNF
c) Fourth
d) Third
View Answer

Answer: b
Explanation: BCNF eliminates all redundancy that can be discovered based on functional
dependencies.
advertisement

8. The term for information that describes what type of data is available in a database is:
a) Data dictionary
b) data repository
c) Index data
d) Metadata
View Answer

Answer: d
Explanation: Meta data is generally data about a data.

9. A data type that creates unique numbers for key columns in Microsoft Access is:
a) Autonumber
b) Boolean
c) Sequential key
d) Sequential number
View Answer

Answer: a
Explanation: This can be taken as a primary key.

10. A dependency exist between two columns when


a) Together they constitute a composite key for the table
b) Knowing the value in one column determines the value stored in another column
c) The table is in 3NF
d) Together they constitute a foreign key
View Answer

Answer: a
Explanation: Given a set F of functional dependencies on a schema, we can prove that certain
other functional dependencies also hold on the schema.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
advertisement

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Querying database part-2 DML
» Next - Database Questions & Answers – Normal Forms
Categories Database MCQsPost navigation
Database Questions and Answers – Querying database part-2 DML
Database Questions & Answers – Normal Forms
advertisement
advertisement

Recommended Posts:

1. Information Technology Questions and Answers


2. Master of Computer Applications Questions and Answers
3. Bachelor of Computer Applications Questions and Answers
4. Cloud Computing Questions and Answers
5. Strength of Materials Questions and Answers
6. MongoDB Questions and Answers
7. Recruitment Support Service – Employers
8. VHDL Questions and Answers
9. Software Architecture & Design Questions and Answers
10. SQL Server Questions and Answers
11. C# Programming Examples on Functions
12. Statistical Quality Control Questions and Answers
13. Computer Graphics Questions and Answers
14. Bioinformatics Questions and Answers
15. Automata Theory Questions and Answers
16. JUnit Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions & Answers – Normal Forms


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Normal
Forms”.

1. In the __________ normal form, a composite attribute is converted to individual attributes.


a) First
b) Second
c) Third
d) Fourth
View Answer

Answer: a
Explanation: The first normal form is used to eliminate the duplicate information.
advertisement
2. A table on the many side of a one to many or many to many relationship must:
a) Be in Second Normal Form (2NF)
b) Be in Third Normal Form (3NF)
c) Have a single attribute key
d) Have a composite key
View Answer

Answer: d
Explanation: The relation in second normal form is also in first normal form and no partial
dependencies on any column in primary key.

3. Tables in second normal form (2NF):


a) Eliminate all hidden dependencies
b) Eliminate the possibility of a insertion anomalies
c) Have a composite key
d) Have all non key fields depend on the whole primary key
View Answer

Answer: a
Explanation: The relation in second normal form is also in first normal form and no partial
dependencies on any column in primary key.

4. Which-one ofthe following statements about normal forms is FALSE?


a) BCNF is stricter than 3 NF
b) Lossless, dependency -preserving decomposition into 3 NF is always possible
c) Loss less, dependency – preserving decomposition into BCNF is always possible
d) Any relation with two attributes is BCNF
View Answer

Answer: c
Explanation: We say that the decomposition is a lossless decomposition if there is no loss of
information by replacing r (R) with two relation schemas r1(R1) andr2(R2).

5. Functional Dependencies are the types of constraints that are based on______
a) Key
b) Key revisited
c) Superset key
d) None of the mentioned
View Answer

Answer: a
Explanation: Key is the basic element needed for the constraints.
advertisement

6. Which is a bottom-up approach to database design that design by examining the relationship
between attributes:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
View Answer

Answer: c
Explanation: Normalisation is the process of removing redundancy and unwanted data.

7. Which forms simplifies and ensures that there are minimal data aggregates and repetitive
groups:
a) 1NF
b) 2NF
c) 3NF
d) All of the mentioned
View Answer

Answer: c
Explanation: The first normal form is used to eliminate the duplicate information.

8. Which forms has a relation that possesses data about an individual entity:
a) 2NF
b) 3NF
c) 4NF
d) 5NF
View Answer

Answer: c
Explanation: A Table is in 4NF if and only if, for every one of its non-trivial multivalued
dependencies X \twoheadrightarrow Y, X is a superkey—that is, X is either a candidate key or a
superset thereof.

9. Which forms are based on the concept of functional dependency:


a) 1NF
b) 2NF
c) 3NF
d) 4NF
View Answer

Answer: c
Explanation: The table is in 3NF if every non-prime attribute of R is non-transitively dependent
(i.e. directly dependent) on every superkey of R.
advertisement

10.
Empdt1(empcode, name, street, city, state, pincode).

For any pincode, there is only one city and state. Also, for given street, city and state, there is
just one pincode. In normalization terms, empdt1 is a relation in
a) 1 NF only
b) 2 NF and hence also in 1 NF
c) 3NF and hence also in 2NF and 1NF
d) BCNF and hence also in 3NF, 2NF and 1NF
View Answer

Answer: b
Explanation: The relation in second normal form is also in first normal form and no partial
dependencies on any column in primary key.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Atomic Domains
» Next - Database Questions and Answers – Functional-Dependency Theory
Categories Database MCQsPost navigation
Database Questions and Answers – Atomic Domains
Database Questions and Answers – Functional-Dependency Theory
advertisement
advertisement

Recommended Posts:

1. Engineering Mathematics Questions and Answers


2. Automata Theory Questions and Answers
3. Bioinformatics Questions and Answers
4. Recruitment Support Service – Employers
5. JUnit Questions and Answers
6. MySQL Database Questions and Answers
7. RDBMS Questions and Answers
8. Oracle Database Questions and Answers
9. Database Management System Questions and Answers
10. Database Questions and Answers – Extended E-R Features
11. Oracle Database Questions and Answers – Attribute, Tuple and Entity
12. Database Questions and Answers – Relational Database and Database Schema
13. Database Questions and Answers – Querying database part-1 DDL
14. Automata Theory Questions and Answers – CFL- Other Normal Forms
15. RDBMS Questions and Answers – Functional-Dependency Theory
16. Database Questions and Answers – Transformation of Relational Expressions
17. Database Questions and Answers – Keys
18. Database Questions and Answers – Functional-Dependency Theory
19. RDBMS Questions and Answers – Features of Good Relational Design
20. Database Questions and Answers – Querying Database – 4
advertisement
Database Questions and Answers – Functional-
Dependency Theory
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Functional-
Dependency Theory”.

1. We can use the following three rules to find logically implied functional dependencies. This
collection of rules is called
a) Axioms
b) Armstrong’s axioms
c) Armstrong
d) Closure
View Answer

Answer: b
Explanation: By applying these rules repeatedly, we can find all of F+, given F.
advertisement

2. Which of the following is not Armstrong’s Axiom?


a) Reflexivity rule
b) Transitivity rule
c) Pseudotransitivity rule
d) Augmentation rule
View Answer

Answer: c
Explanation: It is possible to use Armstrong’s axioms to prove that Pseudotransitivity rule is
sound.

3. The relation employee(ID,name,street,Credit,street,city,salary) is decomposed into


employee1 (ID, name)
employee2 (name, street, city, salary)

This type of decomposition is called


a) Lossless decomposition
b) Lossless-join decomposition
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: d
Explanation: Lossy-join decomposition is the decomposition used here .
advertisement

4. Inst_dept (ID, name, salary, dept name, building, budget) is decomposed into
instructor (ID, name, dept name, salary)
department (dept name, building, budget)

This comes under


a) Lossy-join decomposition
b) Lossy decomposition
c) Lossless-join decomposition
d) Both Lossy and Lossy-join decomposition
View Answer

Answer: d
Explanation: Lossy-join decomposition is the decomposition used here .

5. There are two functional dependencies with the same set of attributes on the left side of the
arrow:
A->BC
A->B
This can be combined as
a) A->BC
b) A->B
c) B->C
d) None of the mentioned
View Answer

Answer: a
Explanation: This can be computed as the canonical cover.

6. Consider a relation R(A,B,C,D,E) with the following functional dependencies:


advertisement
ABC -> DE and
D -> AB

The number of superkeys of R is:


a) 2
b) 7
c) 10
d) 12
View Answer

Answer: c
Explanation: A superkey is a combination of columns that uniquely identifies any row within a
relational database management system (RDBMS) table.

7. Suppose we wish to find the ID’s of the employees that are managed by people who are
managed by the employee with ID 123. Here are two possible queries:
I.SELECT ee.empID
FROM Emps ee, Emps ff
WHERE ee.mgrID = ff.empID AND ff.mgrID = 123;
II.SELECT empID
FROM Emps
WHERE mgrID IN
(SELECT empID FROM Emps WHERE mgrID = 123);
Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee
ID’s?
a) Both I and II
b) I only
c) II only
d) Neither I nor I
View Answer

Answer: a
Explanation: The query can be satisfied by any of the two options.
advertisement

8. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C)
currently has {(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL query:
<i>SELECT *
FROM R NATURAL OUTER JOIN S; </i>IS:

a) 2
b) 4
c) 6
d) None of the mentioned
View Answer

Answer: a
Explanation: The SQL NATURAL JOIN is a type of EQUI JOIN and is structured in such a
way that, columns with same name of associate tables will appear once only.

9. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples, respectively
(again, not necessarily distinct). If m is the number of (not necessarily distinct) tuples in the
result of the SQL query:
R intersect S;

Then which of the following is the most restrictive, correct condition on the value of m?
a) m = min(r,s)
b) 0 <= m <= r + s
c) min(r,s) <= m <= max(r,s)
d) 0 <= m <= min(r,s)
View Answer

Answer: d
Explanation: The value of m must lie between the min value of r and s and 0.

10. Suppose relation R(A,B,C,D,E) has the following functional dependencies:


A -> B
B -> C
BC -> A
A -> D
E -> A
D -> E
Which of the following is not a key?
a) A
b) E
c) B, C
d) D
View Answer

Answer: c
Explanation: Here the keys are not formed by B and C.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions & Answers – Normal Forms
» Next - Database Questions and Answers – Algorithms for Decomposition
Categories Database MCQsPost navigation
Database Questions & Answers – Normal Forms
Database Questions and Answers – Algorithms for Decomposition
advertisement
advertisement

Recommended Posts:

1. Engineering Chemistry I Questions and Answers


2. Information Science Questions and Answers
3. Computer Science Questions and Answers
4. Information Technology Questions and Answers
5. Theory of Machines Questions and Answers
6. Master of Computer Applications Questions and Answers
7. Automata Theory Questions and Answers
8. Bachelor of Computer Applications Questions and Answers
9. MongoDB Questions and Answers
10. JUnit Questions and Answers
11. SQL Server Questions and Answers
12. Recruitment Support Service – Employers
13. Software Engineering Questions & Answers
14. Network Theory Questions and Answers
15. Python Questions and Answers
16. Electromagnetic Theory Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Algorithms for


Decomposition
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Algorithms for
Decomposition”.

1. A relation is in ____________ if an attribute of a composite key is dependent on an attribute


of other composite key.
a) 2NF
b) 3NF
c) BCNF
d) 1NF
View Answer

Answer: b
Explanation: A relation is in 3 NF if an attribute of a composite key is dependent on an attribute
of other composite key. (If an attribute of a composite key is dependent on an attribute of other
composite key then the relation is not in BCNF, hence it has to be decomposed.).
advertisement

2. What are the desirable properties of a decomposition


a) Partition constraint
b) Dependency preservation
c) Redundancy
d) Security
View Answer

Answer: b
Explanation: Lossless join and dependency preserving are the two goals of the decomposition.

3. R (A,B,C,D) is a relation. Which of the following does not have a lossless join dependency
preserving BCNF decomposition?
a) A->B, B->CD
b) A->B, B->C, C->D
c) AB->C, C->AD
d) A->BCD
View Answer

Answer: d
Explanation: This relation gives a relation without any loss in the values.

4.
Class (course id, title, dept name, credits, sec id, semester, YEAR, building, room
NUMBER, capacity, TIME slot id)
The SET OF functional dependencies that we require TO hold ON class are:
course id->title, dept name, credits
building, room number->capacity
course id, sec id, semester, year->building, room NUMBER, TIME slot id
A candidate KEY FOR this schema IS {course id, sec id, semester, YEAR}

Consider the above conditions. Which of the following relation holds?


a) Course id-> title, dept name, credits
b) Title-> dept name, credits
c) Dept name-> credits
d) Cannot be determined
View Answer

Answer: a
Explanation: Here course id is not a superkey. Thus, class is not in BCNF.
advertisement

5. The algorithm that takes a set of dependencies and adds one schema at a time, instead of
decomposing the initial schema repeatedly is
a) BCNF algorithm
b) 2NF algorithm
c) 3NF synthesis algorithm
d) 1NF algorithm
View Answer

Answer: c
Explanation: The result is not uniquely defined, since a set of functional dependencies can have
more than one canonical cover, and, further, in some cases, the result of the algorithm depends
on the order in which it considers the dependencies in Fc.

6. The functional dependency can be tested easily on the materialized view, using the constraints
____________.
a) Primary key
b) Null
c) Unique
d) Both Null and Unique
View Answer

Answer: d
Explanation: Primary key contains both unique and not null constraints.

7. Which normal form is considered adequate for normal relational database design?
a) 2NF
b) 5NF
c) 4NF
d) 3NF
View Answer

Answer: d
Explanation: A relational database table is often described as “normalized” if it is in the Third
Normal Form because most of the 3NF tables are free of insertion, update, and deletion
anomalies.
advertisement

8. Relation R with an associated set of functional dependencies, F, is decomposed into BCNF.


The redundancy (arising out of functional dependencies) in the resulting set of relations is
a) Zero
b) More than zero but less than that of an equivalent 3NF decomposition
c) Proportional to the size of F+
d) Indeterminate
View Answer

Answer: b
Explanation: Redundancy in BCNF is low when compared to 3NF. For more details on BCNF.

9. A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
F1->F3
F2->F4
(F1,F2)->F5

in terms of normalization, this table is in


a) 1NF
b) 2NF
c) 3NF
d) None of the mentioned
View Answer

Answer: a
Explanation: Since the primary key is not given we have to derive the primary key of the table.
Using the closure set of attributes we get the primary key as (F1, F2). From functional
dependencies, “F1->F3, F2->F4”, we can see that there is partial functional dependency
therefore it is not in 1NF. Hence the table is in 1NF.
advertisement

10. Let R(A,B,C,D,E,P,G) be a relational schema in which the following FDs are known to
hold:
AB->CD
DE->P
C->E
P->C
B->G

The relation schema R is


a) in BCNF
b) in 3NF, but not in BCNF
c) in 2NF, but not in 3NF
d) not in 2NF
View Answer
Answer: d
Explanation: From the closure set of attributes we can see that the key for the relation is AB.
The FD B->G is a partial dependency, hence it is not in 2NF.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Functional-Dependency Theory
» Next - Database Questions and Answers – Multivalued Dependencies
Categories Database MCQsPost navigation
Database Questions and Answers – Functional-Dependency Theory
Database Questions and Answers – Multivalued Dependencies
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Computational Geometry Problems & Algorithms


2. C Programming Examples on Combinatorial Problems & Algorithms
3. Java Programming Examples on Computational Geometry Problems & Algorithms
4. C++ Programming Examples on Computational Geometry Problems & Algorithms
5. C++ Programming Examples on Hard Graph Problems & Algorithms
6. C++ Programming Examples on Numerical Problems & Algorithms
7. C Programming Examples on Numerical Problems & Algorithms
8. Java Programming Examples on Combinatorial Problems & Algorithms
9. Java Programming Examples on Numerical Problems & Algorithms
10. Java Programming Examples on Set & String Problems & Algorithms
11. RDBMS Questions and Answers
12. C Programming Examples on Graph Problems & Algorithms
13. C++ Programming Examples on Graph Problems & Algorithms
14. C++ Programming Examples on Set & String Problems & Algorithms
15. C++ Algorithms, Problems & Programming Examples
16. C++ Programming Examples on Combinatorial Problems & Algorithms
17. C Programming Examples on Set & String Problems & Algorithms
18. Java Algorithms, Problems & Programming Examples
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Multivalued


Dependencies
« Prev
Next »

This set of Database online quiz focuses on “Using Multivalued Dependencies”.

1. The normal form which satisfies multivalued dependencies and which is in BCNF is
a) 4 NF
b) 3 NF
c) 2 NF
d) All of the mentioned
View Answer

Answer: a
Explanation: Fourth normal form is more restrictive than BCNF.
advertisement

2. Which of the following is a tuple-generating dependencies?


a) Functional dependency
b) Equality-generating dependencies
c) Multivalued dependencies
d) Non-functional dependency
View Answer

Answer: c
Explanation: Multivalued dependencies, do not rule out the existence of certain tuples. Instead,
they require that other tuples of a certain form be present in the relation.

3. The main task carried out in the __________ is to remove repeating attributes to separate
tables.
a) First Normal Form
b) Second Normal Form
c) Third Normal Form
d) Fourth Normal Form
View Answer

Answer: a
Explanation: Multivalued dependencies, do not rule out the existence of certain tuples. Instead,
they require that other tuples of a certain form be present in the relation.

4. Which of the normal form is based on multivalued dependencies?


a) First
b) Second
c) Third
d) Fourth
View Answer

Answer: d
Explanation: Multivalued dependencies, do not rule out the existence of certain tuples. Instead,
they require that other tuples of a certain form be present in the relation.
advertisement
5. Which forms has a relation that possesses data about an individual entity?
a) 2NF
b) 3NF
c) 4NF
d) 5NF
View Answer

Answer: c
Explanation: A Table is in 4NF if and only if, for every one of its non-trivial multivalued
dependencies X \twoheadrightarrow Y, X is a superkey—that is, X is either a candidate key or a
superset thereof.

6. If a multivalued dependency holds and is not implied by the corresponding functional


dependency, it usually arises from one of the following sources.
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) Both A many-to-many relationship set and A multivalued attribute of an entity set
View Answer

Answer: d
Explanation: For a many-to-many relationship set each related entity set has its own schema and
there is an additional schema for the relationship set. For a multivalued attribute, a separate
schema is created consisting of that attribute and the primary key of the entity set.

7. Which of the following has each related entity set has its own schema and there is an
additional schema for the relationship set?
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) None of the mentioned
View Answer

Answer: a
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.
advertisement

8. In which of the following, a separate schema is created consisting of that attribute and the
primary key of the entity set.
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) None of the mentioned
View Answer

Answer: b
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.
9. Fifth Normal form is concerned with
a) Functional dependency
b) Multivalued dependency
c) Join dependency
d) Domain-key
View Answer

Answer: c
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.

10. In 2NF
a) No functional dependencies (FDs) exist
b) No multivalued dependencies (MVDs) exist
c) No partial FDs exist
d) No partial MVDs exist
View Answer

Answer: c
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for online Quizzes, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Algorithms for Decomposition
» Next - Database Questions and Answers – Database Design Process
Categories Database MCQsPost navigation
Database Questions and Answers – Algorithms for Decomposition
Database Questions and Answers – Database Design Process
advertisement
advertisement

Recommended Posts:

1. C# Programming Examples on Networking


2. C# Programming Examples on Functions
3. Recruitment Support Service – Employers
4. SQL Server Questions and Answers
5. Python Questions and Answers
6. JUnit Questions and Answers
7. MySQL Database Questions and Answers
8. RDBMS Questions and Answers
9. Oracle Database Questions and Answers
10. Database Management System Questions and Answers
11. Database Questions and Answers – Query Processing
12. Database Questions and Answers – Querying Database – 4
13. Oracle Database Questions and Answers – Attribute, Tuple and Entity
14. Database Questions and Answers – Keys
15. Database Questions and Answers – Entity-Relationship Diagrams
16. Database Questions and Answers – Entity-Relationship Design Issues
17. Database Questions and Answers – Functional-Dependency Theory
18. RDBMS Questions and Answers – Normal Forms
19. Database Questions and Answers – Extended E-R Features
20. Database Questions and Answers – The Entity-Relationship Model
advertisement

Database Questions and Answers – Database


Design Process
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Database
Design Process”.

1. _____________ can help us detect poor E-R design.


a) Database Design Process
b) E-R Design Process
c) Relational scheme
d) Functional dependencies
View Answer

Answer: d
Explanation: For eg.,Suppose an instructor entity set had attributes dept name and dept address,
and there is a functional dependency dept name -> dept address.
advertisement

2. If a multivalued dependency holds and is not implied by the corresponding functional


dependency, it usually arises from one of the following sources.
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) Both A many-to-many relationship set and A multivalued attribute of an entity set
View Answer

Answer: d
Explanation: For a many-to-many relationship set each related entity set has its own schema and
there is an additional schema for the relationship set. For a multivalued attribute, a separate
schema is created consisting of that attribute and the primary key of the entity set.
3. Which of the following has each related entity set has its own schema and there is an
additional schema for the relationship set.
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) All of the mentioned
View Answer

Answer: a
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.

4. In which of the following, a separate schema is created consisting of that attribute and the
primary key of the entity set.
a) A many-to-many relationship set
b) A multivalued attribute of an entity set
c) A one-to-many relationship set
d) All of the mentioned
View Answer

Answer: b
Explanation: If a multivalued dependency holds and is not implied by the corresponding
functional dependency, it usually arises from this source.

5. Suppose the user finds the usage of room number and phone number in a relational schema
there is confusion.This is reduced by
a) Unique-role assumption
b) Unique-key assignment
c) Role intergral assignment
d) None of the mentioned
View Answer

Answer: a
Explanation: A desirable feature of a database design is the unique-role assumption, which
means that each attribute name has a unique meaning in the database.
advertisement

6. What is the best way to represent the attributes in a large database?


a) Relational-and
b) Concatenation
c) Dot representation
d) All of the mentioned
View Answer

Answer: b
Explanation: Example inst sec and student sec.

7. Designers use which of the following to tune the performance of systems to support time-
critical operations?
a) Denormalization
b) Redundant optimization
c) Optimization
d) Realization
View Answer

Answer: a
Explanation: The process of taking a normalized schema and making it nonnormalized is called
denormalization.

8. In the schema (dept name, size) we have relations total inst 2007, total inst 2008. Which
dependency have lead to this relation ?
a) Dept name, year->size
b) Year->size
c) Dept name->size
d) Size->year
View Answer

Answer: a
Explanation: The process of taking a normalized schema and making it nonnormalized is called
denormalization.

9. Relation dept year(dept name, total inst 2007, total inst 2008, total inst 2009). Here the only
functional dependencies are from dept name to the other attributes. This relation is in
a) Fourth NF
b) BCNF
c) Third NF
d) Second NF
View Answer

Answer: b
Explanation: BCNF has only one normal form.
advertisement

10. Thus a _______ of course data gives the values of all attributes, such as title and department,
of all courses at a particular point in time.
a) Instance
b) Snapshot
c) Both Instance and Snapshot
d) All of the mentioned
View Answer

Answer: b
Explanation: We use the term snapshot of data to mean the value of the data at a particular point
in time.

11. Representations such as the in the dept year relation, with one column for each value of an
attribute, are called _______ they are widely used in spreadsheets and reports and in data
analysis tools.
a) Cross-tabs
b) Snapshot
c) Both Cross-tabs and Snapshot
d) All of the mentioned
View Answer

Answer: a
Explanation: SQL includes features to convert data from a normal relational representation to a
crosstab.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Multivalued Dependencies
» Next - Database Questions and Answers – Application Programs and User Interfaces
Categories Database MCQsPost navigation
Database Questions and Answers – Multivalued Dependencies
Database Questions and Answers – Application Programs and User Interfaces
advertisement
advertisement

Recommended Posts:

1. About
2. Software Engineering Questions & Answers
3. SAN – Storage Area Networks Questions & Answers
4. VHDL Questions and Answers
5. C# Programming Examples on Networking
6. Master of Computer Applications Questions and Answers
7. Statistical Quality Control Questions and Answers
8. Machine Design Questions and Answers
9. SQL Server Questions and Answers
10. Design of Electrical Machines Questions and Answers
11. JUnit Questions and Answers
12. Distillation Design Questions and Answers
13. Aircraft Design Questions and Answers
14. Design of Steel Structures Questions and Answers
15. Chemical Process Calculation Questions and Answers
16. Software Architecture & Design Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. RDBMS Questions and Answers
20. RDBMS Questions and Answers – Decomposition Using Functional Dependencies
advertisement
Database Questions and Answers – Application
Programs and User Interfaces
« Prev
Next »

This set of Database Assessment Questions and Answers focuses on “Application Programs and
User Interfaces”.

1. An approach to website design with the emphasis on converting visitors to outcomes required
by the owner is referred to as:
a) Web usability
b) Persuasion
c) Web accessibility
d) None of the mentioned
View Answer

Answer: b
Explanation: In computing, graphical user interface is a type of user interface that allows users
to interact with electronic devices.
advertisement

2. A method of modelling and describing user tasks for an interactive application is referred to
as:
a) Customer journey
b) Primary persona
c) Use case
d) Web design persona
View Answer

Answer: c
Explanation: The actions in GUI are usually performed through direct manipulation of the
graphical elements.

3. Information architecture influences:


a) Answer choice
b) Site structure
c) Labeling
d) Navigation design
View Answer

Answer: b
Explanation: The actions in GUI are usually performed through direct manipulation of the
graphical elements.

4. Also known as schematics, a way of illustrating the layout of an individual webpage is a:


a) Wireframe
b) Sitemap
c) Card sorting
d) Blueprint
View Answer

Answer: a
Explanation: An application programming interface specifies how some software components
should interact with each other.
advertisement

5. A graphical or text depiction of the relationship between different groups of content on a


website is referred to as a:
a) Wireframe
b) Blueprint
c) Sitemap
d) Card sorting
View Answer

Answer: c
Explanation: An application programming interface specifies how some software components
should interact with each other.

6. Blueprints are intended to:


a) Prototype of the screen layout showing navigation and main design elements
b) Show the grouping of pages and user journeys
c) Indicate the structure of a site during site design and as a user feature
d) Prototype typical customer journeys or clickstreams through a website
View Answer

Answer: c
Explanation: A blueprint is a reproduction of a technical drawing, documenting an architecture
or an engineering design, using a contact print process.

7. Storyboards are intended to:


a) Indicate the structure of a site during site design and as a user feature
b) Prototype of the screen layout showing navigation and main design elements
c) Integrate consistently available components on the webpage (e.g. navigation, search boxes)
d) Prototype typical customer journeys or click streams through a website
View Answer

Answer: d
Explanation: An application programming interface specifies how some software components
should interact with each other.
advertisement

8. Which of the following occupies boot record of hard and floppy disks and activated during
computer startup?
a) Worm
b) Boot sector virus
c) Macro virus
d) Virus
View Answer
Answer: b
Explanation: A blueprint is a reproduction of a technical drawing, documenting an architecture
or an engineering design, using a contact print process.

9. A graphical or text depiction of the relationship between different groups of content on a


website is a:
a) Page template
b) Wireframe
c) Site map
d) Cascading style sheet (CSS)
View Answer

Answer: c
Explanation: In computing, graphical user interface is a type of user interface that allows users
to interact with electronic devices.

10. Which of the following is a description of information organization schemes?


a) Minimising the number of clicks needed to access relevant content
b) Providing an overall design to a site consistent with the positioning of the products and
services
c) The menu options chosen to group and categorize information
d) Providing specific content and services appropriate to different audience members
View Answer

Answer: c
Explanation: In computing, graphical user interface is a type of user interface that allows users
to interact with electronic devices.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Assessment Questions, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Database Design Process
» Next - Database Questions and Answers – Web Fundamentals
Categories Database MCQsPost navigation
Database Questions and Answers – Database Design Process
Database Questions and Answers – Web Fundamentals
advertisement
advertisement

Recommended Posts:

1. Highway Engineering Questions and Answers


2. Information Science Questions and Answers
3. Cloud Computing Questions and Answers
4. Avionics Questions and Answers
5. RDBMS Questions and Answers
6. Software Architecture & Design Questions and Answers
7. Software Engineering Questions & Answers
8. Master of Computer Applications Questions and Answers
9. Java Programming Examples on Utility Classes
10. CSS Questions and Answers
11. Copyright
12. Privacy Policy
13. 100+ Java Android Programming Examples
14. Simple Java Programs
15. Terms of Service
16. Simple C Programs
17. Oracle Database Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. C# Programming Examples on Interfaces
advertisement

Database Questions and Answers – Web


Fundamentals
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Web
Fundamentals”.

1. Which of the following is a valid uniform resource locator?


a) http://www.acm.org/sigmod
b) www.google.com
c) www.ann.in
d) http:/www.acm.org/sigmod/
View Answer

Answer: a
Explanation: A uniform resource locator (URL) is a globally unique name for each document
that can be accessed on the Web.
advertisement

2. http://www.google.com/search?q=silberschatz
In the above URL which one is the argument which is used for processing of the URL?
a) google
b) google.com
c) search
d) q=silberschatz
View Answer
Answer: d
Explanation: Argument is always placed after ? symbol.

3. HTTP defines two ways in which values entered by a user at the browser can be sent to the
Web server. The _____ method encodes the values as part of the URL.
a) Post
b) Get
c) Read
d) Argument
View Answer

Answer: b
Explanation: For example, if the Google search page used a form with an input parameter
named q with the get method, and the user typed in the string “silberschatz” and submitted the
form, the browser would request the following URL from the Web server:
http://www.google.com/search?q=silberschatz.

4. A __________ is a program running on the server machine, which accepts requests from a
Web browser and sends back results in the form of HTML documents.
a) HTML
b) HTTP
c) Web Server
d) Web browser
View Answer

Answer: c
Explanation: The browser and Web server communicate via HTTP. Web servers provide
powerful features, beyond the simple transfer of documents.
advertisement

5. The application program typically communicates with a database server, through


___________ or other protocols, in order to get or store data.
a) JDBC
b) ODBC
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: The common gateway interface (CGI) standard defines how the Web server
communicates with application programs.

6. This extra information is usually maintained in the form of a _________ at the client.
a) Cookie
b) History
c) Remainder
d) None of the mentioned
View Answer
Answer: a
Explanation: A cookie is simply a small piece of text containing identifying information and
with an associated name.

7. Which of the following is not true about HTML ?


a) <meta>…</meta>
b) <meta…./>
c) <metadata>…</metadata>
d) <metadata name=”” />
View Answer

Answer: b
Explanation: Meta data is the data about data which is included in the meta data tag.
advertisement

8. Html code contains:


a) Tags
b) Attributes
c) Elements
d) All of the mentioned
View Answer

Answer: d
Explanation: <> are tags,size is a attribute.

9. Html document must always be saved with:


a) .html
b) .htm
c) .doc
d) Both .html & .htm
View Answer

Answer: d
Explanation: .doc is used only for the word document format.

10. How many levels of headings are in html:


a) 2
b) 7
c) 6
d) 4
View Answer

Answer: c
Explanation: The heading levels are h1,h2,h3,h4,h5,h6.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Application Programs and User Interfaces
» Next - Database Questions and Answers – Servlets and JSP
Categories Database MCQsPost navigation
Database Questions and Answers – Application Programs and User Interfaces
Database Questions and Answers – Servlets and JSP
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Utility Classes


2. Java Questions and Answers
3. MongoDB Questions and Answers
4. Cloud Computing Questions and Answers
5. C# Programming Examples on Data Structures
6. Java Programming Examples on Networking
7. Information Science Questions and Answers
8. Master of Computer Applications Questions and Answers
9. CSS Questions and Answers
10. 100+ Java Android Programming Examples
11. Javascript Questions and Answers
12. Programming Questions and Answers
13. SQL Server Questions and Answers
14. Computer Fundamentals Questions and Answers
15. Privacy Policy
16. Database Management System Questions and Answers
17. Oracle Database Questions and Answers
18. JUnit Questions and Answers
19. MySQL Database Questions and Answers
20. HTML Questions and Answers
advertisement

Database Questions and Answers – Servlets and


JSP
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Servlets and
JSP”.

1. The Java __________ specification defines an application programming interface for


communication between the Web server and the application program.
a) Servlet
b) Server
c) Program
d) Randomize
View Answer

Answer: a
Explanation: Servlets are commonly used to generate dynamic responses to HTTP requests.
advertisement

2. The doGet() method in the example extracts values of the parameter’s type and number by
using __________
a) request.getParameter()
b) request.setParameter()
c) responce.getParameter()
d) responce.getAttribute()
View Answer

Answer: a
Explanation: These methods uses these values to run a query against a database.

3. How many JDBC driver types does Sun define?


a) One
b) Two
c) Three
d) Four
View Answer

Answer: d
Explanation: JBDB.DriverManager.getConnection() is used to get the connection to the
database.

4. Which JDBC driver Type(s) can be used in either applet or servlet code?
a) Both Type 1 and Type 2
b) Both Type 1 and Type 3
c) Both Type 3 and Type 4
d) Type 4 only
View Answer

Answer: c
Explanation: In a Type 3 driver, a three-tier approach is used to accessing databases. The JDBC
clients use standard network sockets to communicate with an middleware application server. In
a Type 4 driver, a pure Java-based driver that communicates directly with vendor’s database
through socket connection.
advertisement

5. What MySQL property is used to create a surrogate key in MySQL?


a) UNIQUE
b) SEQUENCE
c) AUTO_INCREMENT
d) None of the mentioned
View Answer

Answer: c
Explanation: A surrogate key in a database is a unique identifier for either an entity in the
modeled world or an object in the database.

6. A JSP is transformed into a(n):


a) Java applet
b) Java servlet
c) Either 1 or 2 above
d) Neither 1 nor 2 above
View Answer

Answer: b
Explanation: Servlets are commonly used to generate dynamic responses to HTTP requests.

7. Which JDBC driver Type(s) is(are) the JDBC-ODBC bridge?


a) Type 1
b) Type 2
c) Type 3
d) Type 4
View Answer

Answer: a
Explanation: In a Type 1 driver, a JDBC bridge is used to access ODBC drivers installed on
each client machine.
advertisement

8. What programming language(s) or scripting language(s) does Java Server Pages (JSP)
support?
a) VBScript only
b) Jscript only
c) Java only
d) All of the mentioned
View Answer

Answer: c
Explanation: JSP primarily uses Java for certain codes.

9. What is bytecode?
a) Machine-specific code
b) Java code
c) Machine-independent code
d) None of the mentioned
View Answer

Answer: c
Explanation: Java bytecode is the form of instructions that the Java virtual machine executes.
Each bytecode opcode is one byte in length, although some require parameters, resulting in
some multi-byte instructions.

10. Where is metadata stored in MySQL?


a) In the MySQL database metadata
b) In the MySQL database metasql
c) In the MySQL database mysql
d) None of the mentioned
View Answer

Answer: c
Explanation: Metadata contains data about other data which is given in the <meta>…</meta>
tags.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Web Fundamentals
» Next - Database Questions and Answers – Application Architectures
Categories Database MCQsPost navigation
Database Questions and Answers – Web Fundamentals
Database Questions and Answers – Application Architectures
advertisement
advertisement

Recommended Posts:

1. Machine Tools & Machining Questions and Answers


2. Java Programming Examples on Multithreading
3. Java Programming Examples on Collection API
4. Master of Computer Applications Questions and Answers
5. Java Programming Examples on Exception Handling
6. Bachelor of Computer Applications Questions and Answers
7. JUnit Questions and Answers
8. Java Programming Examples
9. SQL Server Questions and Answers
10. C# Programming Examples on Networking
11. Java Programming Examples on Utility Classes
12. 100+ Java Android Programming Examples
13. Spring Questions and Answers
14. Java Questions and Answers
15. Java Programming Examples on Networking
16. Home
17. Programming Questions and Answers
18. Database Management System Questions and Answers
19. Oracle Database Questions and Answers
20. MySQL Database Questions and Answers
advertisement

Database Questions and Answers – Application


Architectures
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Application
Architectures”.

1. Which of the following is true for Seeheim model?


a) Presentation is abstracted from dialogue and Application
b) Presentation and Dialogue is abstracted from Application
c) Presentation and Application is abstracted from Dialogue
d) None of the mentioned
View Answer

Answer: a
Explanation: Presentation is abstracted from dialogue and application.
advertisement

2. Which of the unit operation is used in Model view controller?


a) Is a Decomposition
b) Part Whole Decomposition
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: b
Explanation: Part whole decomposition is applied to MVC.

3. Memory address refers to the successive memory words and the machine is called as
_______________
a) word addressable
b) byte addressable
c) bit addressable
d) Terra byte addressable
View Answer

Answer: a
Explanation: Part whole decomposition is applied to MVC.

4. Which layer deals which deals with user interaction is called _____________ layer.
a) Business logic
b) Presentation
c) User interaction
d) Data access
View Answer

Answer: b
Explanation: The single application may have several different versions of this layer,
corresponding to distinct kinds of interfaces such as Web browsers, and user interfaces of
mobile phones, which have much smaller screens.
advertisement

5. The _____________ layer, which provides a high-level view of data and actions on data.
a) Business logic
b) Presentation
c) User interaction
d) Data access
View Answer

Answer: a
Explanation: The single application may have several different versions of this layer,
corresponding to distinct kinds of interfaces such as Web browsers, and user interfaces of
mobile phones, which have much smaller screens.

6. The ______________ layer, which provides the interface between the business-logic layer
and the underlying database.
a) Business logic
b) Presentation
c) User interaction
d) Data access
View Answer

Answer: d
Explanation: Many applications use an object-oriented language to code the business-logic
layer, and use an object-oriented model of data, while the underlying database is a relational
database.

7. The _____________ system is widely used for mapping from Java objects to relations.
a) Hibernate
b) Object oriented
c) Objective
d) None of the mentioned
View Answer

Answer: a
Explanation: In Hibernate, the mapping from each Java class to one or more relations is
specified in a mapping file.
advertisement

8. Which among the following are the functions that any system with a user interface must
provide?
a) Presentation
b) Dialogue
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: a
Explanation: Presentation and Application are the functions that any system with a user interface
must provide.

9. Which of the following is the main task accomplished by the user?


a) Compose a document
b) Create a spread sheet
c) Send mail
d) All of the mentioned
View Answer

Answer: d
Explanation: All of the mentioned are the main task accomplished by the user.

10. What are the portability concerns founded in Seeheim model?


a) Replacing the presentation toolkit
b) Replacing the application toolkit
c) Replacing the dialogue toolkit
d) Replacing the presentation & application toolkit
View Answer

Answer: d
Explanation: The portability concerns founded in Seeheim model are- Replacing the
presentation toolkit and Replacing the application toolkit.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Servlets and JSP
» Next - Database Questions and Answers – Rapid Application Development
Categories Database MCQsPost navigation
Database Questions and Answers – Servlets and JSP
Database Questions and Answers – Rapid Application Development
advertisement
advertisement

Recommended Posts:
1. IOT Questions and Answers
2. Software Engineering Questions & Answers
3. C# Programming Examples on Interfaces
4. Artificial Intelligence Questions and Answers
5. Java Questions and Answers
6. Neural Networks Questions and Answers
7. Java Programming Examples on Collections
8. Software Architecture & Design Questions and Answers
9. Computer Fundamentals Questions and Answers
10. Computer Networks Questions and Answers
11. Java Programming Examples
12. Java Programming Examples on Networking
13. JUnit Questions and Answers
14. SQL Server Questions and Answers
15. Cloud Computing Questions and Answers
16. MongoDB Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Rapid


Application Development
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Rapid
Application Development”.

1. Which schema object instructs Oracle to connect to a remotely access an object of a database?
a) Sequence
b) Remote link
c) Database link
d) Data link
View Answer

Answer: d
Explanation: A database link (DBlink) is a definition of how to establish a connection from one
Oracle database to another.
advertisement

2. DML changes are


a) Insert
b) Update
c) Create
d) Both Insert and Update
View Answer

Answer: d
Explanation: Create is a DDL operation.

3. Which of the following object types below cannot be replicated?


a) Data
b) Trigger
c) View
d) Sequence
View Answer

Answer: d
Explanation: Sequence is a series of items which is like a unique index.

4. How to force a log switch?


a) By using ALTER SYSTEM LOG
b) By using ALTER SYSTEM SWITCH LOGFILE
c) By using ALTER SYSTEM SWITCH LOGS
d) By using ALTER SYS LOGFILES
View Answer

Answer: b
Explanation: ALTER SYSTEM ARCHIVE LOG CURRENT is the best practice for production
backup scripts with RMAN. .

5. In the following query, which expression is evaluated first?


advertisement
SELECT id_number, (quantity - 100 / 0.15 - 35 * 20) FROM inventory

a) 100 / 0.15
b) quantity – 100
c) 35*20
d) 0.15-35
View Answer

Answer: a
Explanation: According to the precedence of expression as in BODMAS the expression
evaluated.

6. The ORDER BY clause can only be used in


a) SELECT queries
b) INSERT queries
c) GROUP BY queries
d) HAVING queries
View Answer

Answer: a
Explanation: SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;.

7. Which of the following rule below are categories of an index?


a) Column and Functional
b) Multiple Column and functional
c) Column, Multiple Column and functional
d) None of the mentioned
View Answer

Answer: a
Explanation: The CREATE INDEX statement is used to create indexes in tables.
advertisement

8. What is the purpose of SMON background process?


a) Performs crash recovery when a failed instance starts up again
b) Performs recovery when a user process fails
c) Writes redo log entries to disk
d) None of the mentioned
View Answer

Answer: a
Explanation: SMON (System MONitor) is an Oracle background process created when you start
a database instance.

9. Which of the following queries are legal?


a) SELECT deptno, count(deptno) FROM emp GROUP BY ename;
b) SELECT deptno, count(deptno), job FROM emp GROUP BY deptno;
c) SELECT deptno, avg(sal) FROM emp;
d) SELECT deptno, avg(sal) FROM emp GROUP BY deptno;
View Answer

Answer: d
Explanation: For aggregate functions group by clause is necessary.

10. Which of the following queries displays the sum of all employee salaries for those
employees not making commission, for each job, including only those sums greater than 2500?
a) select job, sum(sal) from emp where sum(sal) > 2500 and comm is null;
b) select job, sum(sal) from emp where comm is null group by job having sum(sal) > 2500;
c) select job, sum(sal) from emp where sum(sal) > 2500 and comm is null group by job;
d) select job, sum(sal) from emp group by job having sum(sal) > 2500 and comm is not null;
View Answer

Answer: b
Explanation: For aggregate functions group by clause is necessary.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
advertisement
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Application Architectures
» Next - Database Questions and Answers – Application Performance
Categories Database MCQsPost navigation
Database Questions and Answers – Application Architectures
Database Questions and Answers – Application Performance
advertisement
advertisement

Recommended Posts:

1. RDBMS Questions and Answers


2. SQL Server Questions and Answers
3. C# Programming Examples on LINQ
4. Oracle Database Questions and Answers
5. MySQL Database Questions and Answers
6. Database Management System Questions and Answers
7. Database Questions and Answers – Views
8. Database Questions and Answers – SQL Queries
9. Database Questions and Answers – Application Programs and User Interfaces
10. MySQL Questions and Answers – Query Clauses
11. Database Questions and Answers – Null Values Operations
12. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 1
13. Database Questions and Answers – Application Architectures
14. Database Questions and Answers – Application Security
15. Database Questions and Answers – Insertion Deletion Predicate Reads
16. Database Questions and Answers – Aggregate Functions and Nested Subqueries – 2
17. Database Questions and Answers – Application Performance
18. Database Questions and Answers – Querying database part-2 DML
19. Database Questions and Answers – Recursive Queries and Aggregation Features
20. Database Questions and Answers – Modification of Database
advertisement

Database Questions and Answers – Application


Performance
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Application
Performance”.

1. The indirect change of the values of a variable in one module by another module is called
a) Internal change
b) Inter-module change
c) Side effect
d) Side-module update
View Answer

Answer: c
Explanation: The module of the search tree and the flow is directed by its values.
advertisement

2. Which of the following data structure is not linear data structure?


a) Arrays
b) Linked lists
c) Arrays & Linked lists
d) None of the mentioned
View Answer

Answer: d
Explanation: Both array and linked lists are in data structure concepts.

3. Which of the following data structure is linear data structure?


a) Trees
b) Graphs
c) Arrays
d) None of the mentioned
View Answer

Answer: c
Explanation: Tree and graphs are not linear.

4. Which of the following criterion is NOT written using the proper syntax?
a) “Haris”
b) <500
c) NO VALUE
d) Between #1/1/2000# and #12/31/2000#
View Answer

Answer: c
Explanation: NO VALUE cannot be specified.
advertisement

5. The operation of processing each element in the list is known as


a) Sorting
b) Merging
c) Inserting
d) Traversal
View Answer

Answer: d
Explanation: There are several types of traversals.

6. Finding the location of the element with a given value is:


a) Traversal
b) Search
c) Sort
d) None of the mentioned
View Answer

Answer: b
Explanation: Search is performed by traversing through the tree.

7. Arrays are best data structures


a) For relatively permanent collections of data
b) For the size of the structure and the data in the structure are constantly changing
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: a
Explanation: The operator tree has a tree like format where the evaluation starts from root of the
tree.
advertisement

8. Linked lists are best suited


a) For relatively permanent collections of data
b) For the size of the structure and the data in the structure are constantly changing
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: b
Explanation: A linked list is a data structure consisting of a group of nodes which together
represent a sequence.

9. Each array declaration need not give, implicitly or explicitly, the information about
a) The name of array
b) The data type of array
c) The first data from the set to be stored
d) The index set of the array
View Answer

Answer: c
Explanation: The operator tree has a tree like format where the evaluation starts from root of the
tree.

10. The elements of an array are stored successively in memory cells because
a) By this way computer can keep track only the address of the first element and the addresses
of other elements can be calculated
b) The architecture of computer memory does not allow arrays to store other than serially
c) All of the mentioned
d) None of the mentioned
View Answer
Answer: a
Explanation: Memory is always allotted in order.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Rapid Application Development
» Next - Database Questions and Answers – Application Security
Categories Database MCQsPost navigation
Database Questions and Answers – Rapid Application Development
Database Questions and Answers – Application Security
advertisement
advertisement

Recommended Posts:

1. Python Programming Examples on Trees


2. C Programming Examples using Recursion
3. C Programming Examples on Trees
4. C++ Programming Examples on Combinatorial Problems & Algorithms
5. Java Programming Examples on Combinatorial Problems & Algorithms
6. MySQL Database Questions and Answers
7. C++ Algorithms, Problems & Programming Examples
8. C Programming Examples without using Recursion
9. C Programming Examples on Combinatorial Problems & Algorithms
10. Database Management System Questions and Answers
11. C# Programming Examples on Data Structures
12. C Programming Examples on Stacks & Queues
13. Oracle Database Questions and Answers
14. C Programming Examples
15. Java Programming Examples on Data-Structures
16. C Programming Examples on Linked List
17. C++ Programming Examples on Data-Structures
18. Python Programming Examples on Linked Lists
19. Database Questions and Answers – Concurrency in Index Structures
20. Oracle Database Questions and Answers – Oracle Database 11g Architecture
advertisement

Database Questions and Answers – Application


Security
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Application
Security”.

1. In _________________ attacks, the attacker manages to get an application to execute an SQL


query created by the attacker.
a) SQL injection
b) SQL
c) Direct
d) Application
View Answer

Answer: a
Explanation: Application security has to deal with several security threats and issues beyond
those handled by SQL authorization.
advertisement

2. A Web site that allows users to enter text, such as a comment or a name, and then stores it and
later display it to other users, is potentially vulnerable to a kind of attack called a
___________________ attack.
a) Two-factor authentication
b) Cross-site request forgery
c) Cross-site scripting
d) Cross-site scoring scripting
View Answer

Answer: c
Explanation: In such an attack, a malicious user enters code written in a client-side scripting
language such as JavaScript or Flash instead of entering a valid name or comment.

3. _________ is an attack which forces an end user to execute unwanted actions on a web
application in which he/she is currently authenticated.
a) Two-factor authentication
b) Cross-site request forgery
c) Cross-site scripting
d) Cross-site scoring scripting
View Answer

Answer: b
Explanation: Cross-site request forgery, also known as a one-click attack or session riding and
abbreviated as CSRF or XSRF.

4. Many applications use _________________ where two independent factors are used to
identify a user.
a) Two-factor authentication
b) Cross-site request forgery
c) Cross-site scripting
d) Cross-site scoring scripting
View Answer
Answer: a
Explanation: The two factors should not share a common vulnerability.
advertisement

5. Even with two-factor authentication, users may still be vulnerable to_____________attacks.


a) Radiant
b) Cross attack
c) scripting
d) Man-in-the-middle
View Answer

Answer: d
Explanation: In such attacks, a user attempting to connect to the application is diverted to a fake
Web site, which accepts the password from the user, and uses it immediately to authenticate to
the original application.

6. A single ______________ further allows the user to be authenticated once, and multiple
applications can then verify the user’s identity through an authentication service without
requiring reauthentication.
a) OpenID
b) Sign-on system
c) Security Assertion Markup Language (SAML)
d) Virtual Private Database (VPD)
View Answer

Answer: b
Explanation: Once the user logged in at one site, he does not have to enter his user name and
password at other sites that use the same single sign-on service.

7. The ___________________ is a standard for exchanging authentication and authorization


information between different security domains, to provide cross-organization single sign-on.
a) OpenID
b) Sign-on system
c) Security Assertion Markup Language (SAML)
d) Virtual Private Database (VPD)
View Answer

Answer: c
Explanation: The user’s password and other authentication factors are never revealed to the
application, and the user need not register explicitly with the application.
advertisement

8. The __________ standard is an alternative for single sign-on across organizations, and has
seen increasing acceptance in recent years.
a) OpenID
b) Single-site system
c) Security Assertion Markup Language (SAML)
d) Virtual Private Database (VPD)
View Answer
Answer: a
Explanation: The user’s password and other authentication factors are never revealed to the
application, and the user need not register explicitly with the application.

9. _______________ allows a system administrator to associate a function with a relation; the


function returns a predicate that must be added to any query that uses the relation.
a) OpenID
b) Single-site system
c) Security Assertion Markup Language (SAML)
d) Virtual Private Database (VPD)
View Answer

Answer: d
Explanation: Some database systems provide mechanisms for fine-grained authorization.

10. VPD provides authorization at the level of specific tuples, or rows, of a relation, and is
therefore said to be a _____________ mechanism.
a) Row-level authorization
b) Column-level authentication
c) Row-type authentication
d) Authorization security
View Answer

Answer: a
Explanation: Oracle Virtual Private Database (VPD) allows a system administrator to associate
a function with a relation.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Application Performance
» Next - Database Questions and Answers – Encryption and Its Applications
Categories Database MCQsPost navigation
Database Questions and Answers – Application Performance
C# Program to Demonstrate Boxing Operations
advertisement
advertisement

Recommended Posts:

1. Object Oriented Programming Questions and Answers


2. RDBMS Questions and Answers
3. Simple C Programs
4. Software Engineering Questions & Answers
5. Privacy Policy
6. Computer Fundamentals Questions and Answers
7. Terms of Service
8. PHP Questions and Answers
9. Computer Networks Questions and Answers
10. C# Programming Examples on Inheritance
11. Spring Questions and Answers
12. Operating System Questions and Answers
13. SQL Server Questions and Answers
14. C# Programming Examples on Networking
15. MongoDB Questions and Answers
16. MySQL Database Questions and Answers
17. Cryptography and Network Security Questions and Answers
18. Oracle Database Questions and Answers
19. Cyber Security Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Encryption


and Its Applications
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Encryption
and Its Applications”.

1. ___________ is widely used today for protecting data in transit in a variety of applications
such as data transfer on the Internet, and on cellular phone networks.
a) Encryption
b) Data mining
c) Internet Security
d) Architectural security
View Answer

Answer: a
Explanation: Encryption is also used to carry out other tasks, such as authentication.
advertisement

2. In a database where the encryption is applied the data is cannot be handled by the
unauthorised user without
a) Encryption key
b) Decryption key
c) Primary key
d) Authorised key
View Answer
Answer: b
Explanation: Even if the message is intercepted by an enemy, the enemy, not knowing the key,
will not be able to decrypt and understand the message.

3. Which of the following is not a property of good encryption technique?


a) Relatively simple for authorized users to encrypt and decrypt data
b) Decryption key is extremely difficult for an intruder to determine
c) Encryption depends on a parameter of the algorithm called the encryption key
d) None of the mentioned
View Answer

Answer: d
Explanation: Here a, b and c are the properties have to be present in a good design of an
encryption technique.

4. In which of the following encryption key is used to encrypt and decrypt the data?
a) Public key
b) Private key
c) Symmetric key
d) Asymmetric key
View Answer

Answer: c
Explanation: In public-key (also known as asymmetric-key) encryption techniques, there are
two different keys, the public key and the private key, used to encrypt and decrypt the data.
advertisement

5. Encryption of small values, such as identifiers or names, is made complicated by the


possibility of __________
a) Dictionary attacks
b) Database attacks
c) Minor attacks
d) Random attacks
View Answer

Answer: a
Explanation: This happens when particularly if the encryption key is publicly available.

6. Which one of the following uses a 128bit round key to encrypt the data using XOR and use it
in reverse to decrypt it?
a) Round key algorithm
b) Public key algorithm
c) Advanced Encryption Standard
d) Asymmetric key algorithm
View Answer

Answer: c
Explanation: The standard is based on the Rijndael algorithm.
7. Which of the following requires no password travel across the internet?
a) Readable system
b) Manipulation system
c) Challenge–response system
d) Response system
View Answer

Answer: c
Explanation: The database system sends a challenge string to the user. The user encrypts the
challenge string using a secret password as encryption key and then returns the result. The
database system can verify the authenticity of the user by decrypting the string with the same
secret password and checking the result with the original challenge string.
advertisement

8. Assymmetric Encryption: Why can a message encrypted with the Public Key only be
decrypted with the receiver’s appropriate Private Key?
a) Not true, the message can also be decrypted with the Public Key
b) A so called “one way function with back door” is applied for the encryption
c) The Public Key contains a special function which is used to encrypt the message and which
can only be reversed by the appropriate Private Key
d) The encrypted message contains the function for decryption which identifies the Private Key
View Answer

Answer: b
Explanation: An one-way function is a function which a computer can calculate quickly, but
whose reversal would last months or years. An one-way function with back door can be reversed
with the help of a couple of additional information (the back door), but scarcely without this
information. The information for the back door is contained in the private Key.

9. Which is the largest disadvantage of symmetric Encryption?


a) More complex and therefore more time-consuming calculations
b) Problem of the secure transmission of the Secret Key
c) Less secure encryption function
d) Isn’t used any more
View Answer

Answer: b
Explanation: As there is only one key in the symmetrical encryption, this must be known by
both sender and recipient and this key is sufficient to decrypt the secret message. Therefore it
must be exchanged between sender and receiver in such a manner that an unauthorized person
can in no case take possession of it.

10. Which is the principle of the encryption using a key?


a) The key indicates which function is used for encryption. Thereby it is more difficult to
decrypt an intercepted message as the function is unknown
b) The key contains the secret function for encryption including parameters. Only a password
can activate the key
c) All functions are public, only the key is secret. It contains the parameters used for the
encryption resp. decryption
d) The key prevents the user of having to reinstall the software at each change in technology or
in the functions for encryption
View Answer

Answer: b
Explanation: The encoding of a message is calculated by an algorithm. If always the same
algorithm would be used, it would be easy to crack intercepted messages. However, it isn’t
possible to invent a new algorithm whenever the old one was cracked, therefore the possibility
to parameterize algorithms is needed and this is the assignment of the key.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Application Security
» Next - Database Questions and Answers – Physical Storage Media
Categories Database MCQsPost navigation
C# Program to Illustrate Pascal Triangle
Database Questions and Answers – Physical Storage Media
advertisement
advertisement

Recommended Posts:

1. Discrete Mathematics Questions and Answers


2. C++ Programming Examples on Numerical Problems & Algorithms
3. Digital Communication Questions and Answers
4. MongoDB Questions and Answers
5. C Programming Examples on Numerical Problems & Algorithms
6. C Programming Examples on Searching and Sorting
7. Java Programming Examples on Numerical Problems & Algorithms
8. Java Programming Examples on Inheritance
9. SQL Server Questions and Answers
10. Object Oriented Programming Questions and Answers
11. C++ Programming Examples on Set & String Problems & Algorithms
12. C Programming Examples on Set & String Problems & Algorithms
13. Master of Computer Applications Questions and Answers
14. Bachelor of Computer Applications Questions and Answers
15. Java Programming Examples on Set & String Problems & Algorithms
16. Cryptography and Network Security Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. C# Programming Examples on Strings
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Physical


Storage Media
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Physical
Storage Media”.

1. Which of the following is a physical storage media?


a) Tape Storage
b) Optical Storage
c) Flash memory
d) All of the mentioned
View Answer

Answer: d
Explanation: The storage media are classified by the speed with which data can be accessed, by
the cost per unit of data to buy the medium, and by the medium’s reliability.
advertisement

2. The _________ is the fastest and most costly form of storage, which is relatively small; its
use is managed by the computer system hardware.
a) Cache
b) Disk
c) Main memory
d) Flash memory
View Answer

Answer: a
Explanation: Cache storage is easy to access because it is closer to the processor.

3. Which of the following stores several gigabytes of data but usually lost when power failure?
a) Flash memory
b) Disk
c) Main memory
d) Secondary memory
View Answer

Answer: c
Explanation: The contents of main memory are usually lost if a power failure or system crash
occurs.

4. The flash memory storage used are


a) NOR Flash
b) OR Flash
c) AND Flash
d) All of the mentioned
View Answer

Answer: a
Explanation: NAND flash has a much higher storage capacity for a given cost, and is widely
used for data storage in devices such as cameras, music players, and cell phones.
advertisement

5. __________ is increasingly being used in server systems to improve performance by caching


frequently used data, since it provides faster access than disk, with larger storage capacity than
main memory.
a) Flash memory
b) Disk
c) Main memory
d) Secondary memory
View Answer

Answer: a
Explanation: Flash memory is of two types – NAND and NOR.

6. Which is the cheapest memory device in terms of costs/ bit?


a) Semiconductor memory
b) Magnetic disks
c) Compact disks
d) Magnetic tapes
View Answer

Answer: c
Explanation: Compact disk is used for easy storage at lower cost.

7. The primary medium for the long-term online storage of data is the __________ where the
entire database is stored on magnetic disk.
a) Semiconductor memory
b) Magnetic disks
c) Compact disks
d) Magnetic tapes
View Answer

Answer: b
Explanation: The system must move the data from disk to main memory so that they can be
accessed.
advertisement

8. Optical disk _______ systems contain a few drives and numerous disks that can be loaded
into one of the drives automatically (by a robot arm) on demand.
a) Tape Storage
b) Jukebox
c) Flash memory
d) All of the mentioned
View Answer
Answer: b
Explanation: The most popular form of optical disks are CD and DVD.

9. There are “record-once” versions of the compact disk and digital video disk, which can be
written only once; such disks are also called __________ disks.
a) Write-once, read-many (WORM)
b) CD-R
c) DVD-W
d) CD-ROM
View Answer

Answer: a
Explanation: There are also “multiple-write” versions of compact disk (called CD-RW) and
digital video disk (DVD-RW, DVD+RW, and DVD-RAM), which can be written multiple
times.

10. Tape storage is referred to as __________ storage.


a) Direct-access
b) Random-access
c) Sequential-access
d) All of the mentioned
View Answer

Answer: c
Explanation: Tape storage is used primarily for backup and archival data.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Encryption and Its Applications
» Next - Database Questions and Answers – Magnetic Disk and Flash Storage
Categories Database MCQsPost navigation
Database Questions and Answers – Encryption and Its Applications
Database Questions and Answers – Magnetic Disk and Flash Storage
advertisement
advertisement

Recommended Posts:

1. Information Science Questions and Answers


2. Object Oriented Programming Questions and Answers
3. C Questions and Answers
4. Programming Questions and Answers
5. VLSI Questions and Answers
6. Digital Circuits Questions and Answers
7. SQL Server Questions and Answers
8. MongoDB Questions and Answers
9. Master of Computer Applications Questions and Answers
10. Computer Organization & Architecture Questions and Answers
11. C# Programming Examples on Gaming
12. C# Programming Examples on Files
13. Home
14. RDBMS Questions and Answers
15. Computer Fundamentals Questions and Answers
16. Operating System Questions and Answers
17. Oracle Database Questions and Answers
18. MySQL Database Questions and Answers
19. SAN – Storage Area Networks Questions & Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Magnetic Disk


and Flash Storage
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Magnetic Disk
and Flash Storage”.

1. In magnetic disk ________ stores information on a sector magnetically as reversals of the


direction of magnetization of the magnetic material.
a) Read–write head
b) Read-assemble head
c) Head–disk assemblies
d) Disk arm
View Answer

Answer: d
Explanation: Each side of a platter of a disk has a read–write head that moves across the platter
to access different tracks.
advertisement

2. A __________ is the smallest unit of information that can be read from or written to the disk.
a) Track
b) Spindle
c) Sector
d) Platter
View Answer
Answer: c
Explanation: The disk surface is logically divided into tracks, which are subdivided into sectors.

3. The disk platters mounted on a spindle and the heads mounted on a disk arm are together
known as ___________
a) Read-disk assemblies
b) Head–disk assemblies
c) Head-write assemblies
d) Read-read assemblies
View Answer

Answer: b
Explanation: Each side of a platter of a disk has a read–write head that moves across the platter
to access different tracks.

4. The disk controller uses ________ at each sector to ensure that the data is not corrupted on
data retrieval.
a) Checksum
b) Unit drive
c) Read disk
d) Readsum
View Answer

Answer: a
Explanation: A disk controller interfaces between the computer system and the actual hardware
of the disk drive.
advertisement

5. _________ is the time from when a read or write request is issued to when data transfer
begins.
a) Access time
b) Average seek time
c) Seek time
d) Rotational latency time
View Answer

Answer: a
Explanation: To access (that is, to read or write) data on a given sector of a disk, the arm first
must move so that it is positioned over the correct track, and then must wait for the sector to
appear under it as the disk rotates.

6. The time for repositioning the arm is called the ________ and it increases with the distance
that the arm must move.
a) Access time
b) Average seek time
c) Seek time
d) Rotational latency time
View Answer
Answer: c
Explanation: Typical seek times range from 2 to 30 milliseconds, depending on how far the
track is from the initial arm position.

7. _________ is around one-half of the maximum seek time.


a) Access time
b) Average seek time
c) Seek time
d) Rotational latency time
View Answer

Answer: b
Explanation: Average seek times currently range between 4 and 10 milliseconds, depending on
the disk model.
advertisement

8. Once the head has reached the desired track, the time spent waiting for the sector to be
accessed to appear under the head is called the _______________
a) Access time
b) Average seek time
c) Seek time
d) Rotational latency time
View Answer

Answer: d
Explanation: Rotational speeds of disks today range from 5400 rotations per minute (90
rotations per second) up to 15,000 rotations per minute (250 rotations per second), or,
equivalently, 4 milliseconds to 11.1 milliseconds per rotation.

9. In Flash memory, the erase operation can be performed on a number of pages, called an
_______ at once, and takes about 1 to 2 milliseconds.
a) Delete block
b) Erase block
c) Flash block
d) Read block
View Answer

Answer: b
Explanation: The size of an erase block (often referred to as just “block” in flash literature) is
usually significantly larger than the block size of the storage system.

10. Hybrid disk drives are hard-disk systems that combine magnetic storage with a smaller
amount of flash memory, which is used as a cache for frequently accessed data.
a) Hybrid drivers
b) Disk drivers
c) Hybrid disk drivers
d) All of the mentioned
View Answer
Answer: b
Explanation: Frequently accessed data that are rarely updated are ideal for caching in flash
memory.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Physical Storage Media
» Next - Database Questions and Answers – RAID
Categories Database MCQsPost navigation
Database Questions and Answers – Physical Storage Media
Database Questions and Answers – RAID
advertisement
advertisement

Recommended Posts:

1. Information Technology Questions and Answers


2. Master of Computer Applications Questions and Answers
3. JUnit Questions and Answers
4. Bachelor of Computer Applications Questions and Answers
5. Java Programming Examples on Utility Classes
6. Java Programming Examples on Collections
7. Java Programming Examples on Classes
8. Java Programming Examples on File Handling
9. C# Basic Programming Examples
10. SQL Server Questions and Answers
11. 100+ Java Android Programming Examples
12. RDBMS Questions and Answers
13. Operating System Questions and Answers
14. C# Programming Examples on Files
15. MongoDB Questions and Answers
16. SAN – Storage Area Networks Questions & Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. Database Management System Questions and Answers
20. Database Questions and Answers – Selection Operation
advertisement

Database Questions and Answers – RAID


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “RAID”.

1. Which level of RAID refers to disk mirroring with block striping?


a) RAID level 1
b) RAID level 2
c) RAID level 0
d) RAID level 3
View Answer

Answer: a
Explanation: RAID level 1 refers to disk mirroring with block striping.
advertisement

2. Optical disk technology uses


a) Helical scanning
b) DAT
c) A laser beam
d) RAID
View Answer

Answer: d
Explanation: Redundant Array of Inexpensive Disks.

3. With multiple disks, we can improve the transfer rate as well by ___________ data across
multiple disks.
a) Striping
b) Dividing
c) Mirroring
d) Dividing
View Answer

Answer: a
Explanation: Data striping consists of splitting the bits of each byte across multiple disks; such
striping is called bitlevel striping.

4. Which one of the following is a Stripping technique?


a) Byte level stripping
b) Raid level stripping
c) Disk level stripping
d) Block level stripping
View Answer

Answer: d
Explanation: Block-level striping stripes blocks across multiple disks. It treats the array of disks
as a single large disk, and it gives blocks logical numbers.
advertisement
5. The RAID level which mirroring is done along with stripping is
a) RAID 1+0
b) RAID 0
c) RAID 2
d) Both RAID 1+0 and RAID 0
View Answer

Answer: d
Explanation: Mirroring without striping can also be used with arrays of disks, to give the
appearance of a single large, reliable disk.

6. Where performance and reliability are both important, RAID level ____ is used.
a) 0
b) 1
c) 2
d) 0+1
View Answer

Answer: d
Explanation: Mirroring without striping can also be used with arrays of disks, to give the
appearance of a single large, reliable disk.

7. ______________ partitions data and parity among all N+1 disks, instead of storing data in N-
disks and parity in one disk.
a) Block interleaved parity
b) Block interleaved distributed parity
c) Bit parity
d) Bit interleaved parity
View Answer

Answer: b
Explanation: In level 5, all disks can participate in satisfying read requests, unlike RAID level 4,
where the parity disk cannot participate, so level 5 increases the total number of requests that
can be met in a given amount of time.
advertisement

8. Hardware RAID implementations permit _________ that is, faulty disks can be removed and
replaced by new ones without turning power off.
a) Scrapping
b) Swapping
c) Hot swapping
d) None of the mentioned
View Answer

Answer: c
Explanation: Hot
swapping reduces the mean time to repair since replacement of a disk does not have to wait until
a time when the system can be shut down.
9. ___________ is popular for applications such as storage of log files in a database system
since it offers the best write performance.
a) RAID level 1
b) RAID level 2
c) RAID level 0
d) RAID level 3
View Answer

Answer: a
Explanation: RAID level 1 refers to disk mirroring with block striping.

10. ______________ which increases the number of I/O operations needed to write a single
logical block, pays a significant time penalty in terms of write performance.
a) RAID level 1
b) RAID level 2
c) RAID level 5
d) RAID level 3
View Answer

Answer: a
Explanation: In level 5, all disks can participate in satisfying read requests, unlike RAID level 4,
where the parity disk cannot participate, so level 5 increases the total number of requests that
can be met in a given amount of time.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Magnetic Disk and Flash Storage
» Next - Database Questions and Answers – Tertiary Storage
Categories Database MCQsPost navigation
Database Questions and Answers – Magnetic Disk and Flash Storage
Database Questions and Answers – Tertiary Storage
advertisement
advertisement

Recommended Posts:

1. Information Science Questions and Answers


2. Computer Fundamentals Questions and Answers
3. Programming Questions and Answers
4. Information Technology Questions and Answers
5. Master of Computer Applications Questions and Answers
6. C Programming Examples on Stacks & Queues
7. Bachelor of Computer Applications Questions and Answers
8. MongoDB Questions and Answers
9. About
10. C# Programming Examples on Files
11. Java Programming Examples on Exception Handling
12. Java Programming Examples on Multithreading
13. SAN – Storage Area Networks Questions & Answers
14. C# Programming Examples on Gaming
15. RDBMS Questions and Answers
16. SQL Server Questions and Answers
17. Operating System Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Tertiary


Storage
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Tertiary
Storage”.

1. Tertiary storage is built with :


a) a lot of money
b) unremovable media
c) removable media
d) secondary storage
View Answer

Answer: c
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.
advertisement

2. Operating system is responsible for


a) disk initialization
b) booting from disk
c) bad-bock recovery
d) all of the mentioned
View Answer

Answer: d
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.

3. A typical tape drive is ________ a typical disk drive.


a) more expensive than
b) cheaper than
c) of the same cost as
d) none of the mentioned
View Answer

Answer: a
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.

4. During recovery from a failure


a) each pair of physical block is examined
b) specified pair of physical block is examined
c) first pair of physical block is examined
d) none of the mentioned
View Answer

Answer: a
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.
advertisement

5. A magneto-optic disk is :
a) primary storage
b) secondary storage
c) tertiary storage
d) none of the mentioned
View Answer

Answer: c
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.

6. Which of the following are the process of selecting the data storage and data access
characteristics of the database?
a) Logical database design
b) Physical database design
c) Testing and performance tuning
d) Evaluation and selecting
View Answer
Answer: b
Explanation: Physical database design is the process of selecting the data storage and data
access characteristics of the database.

7. The replacement of a bad block generally is not totally automatic because


a) data in bad block cannot be replaced
b) data in bad block is usually lost
c) bad block does not contain any data
d) none of the mentioned
View Answer

Answer: b
Explanation: Physical database design is the process of selecting the data storage and data
access characteristics of the database.
advertisement

8. Which of the following is the oldest database model?


a) Relational
b) Hierarchical
c) Physical
d) Network
View Answer

Answer: d
Explanation: Network model has data stored in a hierarchical network flow.

9. The surface area of a tape is ________ the surface area of a disk.


a) much lesser than
b) much larger than
c) equal to
d) none of the mentioned
View Answer

Answer: b
Explanation: Network model has data stored in a hierarchical network flow.

10. Which one of the following is not a secondary storage?


a) magnetic disks
b) magnetic tapes
c) ram
d) none of the mentioned
View Answer

Answer: c
Explanation: Tertiary storage involves a robotic mechanism which will mount (insert) and
dismount removable mass storage media into a storage device according to the system’s
demands; this data is often copied to secondary storage before use.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – RAID
» Next - Database Questions and Answers – File Organisations
Categories Database MCQsPost navigation
Database Questions and Answers – RAID
Database Questions and Answers – File Organisations
advertisement
advertisement

Recommended Posts:

1. Aircraft Maintenance Questions and Answers


2. Programming Questions and Answers
3. Information Technology Questions and Answers
4. Waste Water Engineering Questions and Answers
5. Information Science Questions and Answers
6. SQL Server Questions and Answers
7. Instrumentation Transducers Questions and Answers
8. RDBMS Questions and Answers
9. Master of Computer Applications Questions and Answers
10. Biochemistry Questions and Answers
11. Computer Networks Questions and Answers
12. Bioinformatics Questions and Answers
13. Computer Fundamentals Questions and Answers
14. Cloud Computing Questions and Answers
15. Operating System Questions and Answers
16. Control Systems Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. SAN – Storage Area Networks Questions & Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – File


Organisations
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “File
Organisations”.
1. Which level of RAID refers to disk mirroring with block striping?
a) RAID level 1
b) RAID level 2
c) RAID level 0
d) RAID level 3
View Answer

Answer: a
Explanation: RAID (redundant array of independent disks) is a way of storing the same data in
different places (thus, redundantly) on multiple hard disks.
advertisement

2. A unit of storage that can store one or more records in a hash file organization is denoted as
a) Buckets
b) Disk pages
c) Blocks
d) Nodes
View Answer

Answer: a
Explanation: A unit of storage that can store one or more records in a hash file organization is
denoted as buckets.

3. The file organization which allows us to read records that would satisfy the join condition by
using one block read is
a) Heap file organization
b) Sequential file organization
c) Clustering file organization
d) Hash file organization
View Answer

Answer: c
Explanation: All systems in the cluster share a common file structure via NFS, but not all disks
are mounted on all other systems.

4. What are the correct features of a distributed database?


a) Is always connected to the internet
b) Always requires more than three machines
c) Users see the data in one global schema.
d) Have to specify the physical location of the data when an update is done
View Answer

Answer: c
Explanation: Users see the data in one global schema.
advertisement

5. Each tablespace in an Oracle database consists of one or more files called


a) Files
b) name space
c) datafiles
d) PFILE
View Answer

Answer: c
Explanation: A data file is a computer file which stores data to use by a computer application or
system.

6. The management information system (MIS) structure with one main computer system is
called a
a) Hierarchical MIS structure
b) Distributed MIS structure
c) Centralized MIS structure
d) Decentralized MIS structure
View Answer

Answer: c
Explanation: Structure of MIS may be understood by looking at the physical components of the
information system in an organization.

7. A top-to-bottom relationship among the items in a database is established by a


a) Hierarchical schema
b) Network schema
c) Relational schema
d) All of the mentioned
View Answer

Answer: a
Explanation: A hierarchical database model is a data model in which the data is organized into a
tree-like structure. The structure allows representing information using parent/child
relationships.
advertisement

8. Choose the RDBMS which supports full fledged client server application development
a) dBase V
b) Oracle 7.1
c) FoxPro 2.1
d) Ingress
View Answer

Answer: b
Explanation: RDBMS is Relational Database Management System.

9. One approach to standardization storing of data?


a) MIS
b) Structured programming
c) CODASYL specification
d) None of the mentioned
View Answer
Answer: c
Explanation: CODASYL is an acronym for “Conference on Data Systems Languages”.

10. The highest level in the hierarchy of data organization is called


a) Data bank
b) Data base
c) Data file
d) Data record
View Answer

Answer: b
Explanation: Database is a collection of all tables which contains the data in form of fields.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Tertiary Storage
» Next - Database Questions and Answers – Organization of Records in Files
Categories Database MCQsPost navigation
Database Questions and Answers – Tertiary Storage
Database Questions and Answers – Organization of Records in Files
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Stacks & Queues


2. Information Science Questions and Answers
3. C# Programming Examples on Files
4. MongoDB Questions and Answers
5. Computer Organization & Architecture Questions and Answers
6. Computer Science Questions and Answers
7. C# Programming Examples on Data Structures
8. Information Technology Questions and Answers
9. Home
10. Operating System Questions and Answers
11. SQL Server Questions and Answers
12. Bachelor of Computer Applications Questions and Answers
13. Master of Computer Applications Questions and Answers
14. SAN – Storage Area Networks Questions & Answers
15. MySQL Database Questions and Answers
16. Java Programming Examples on File Handling
17. C Programming Examples on File Handling
18. RDBMS Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Organization


of Records in Files
« Prev
Next »

This set of Database Questions and Answers for Aptitude test focuses on “Organization of
Records in Files”.

1. If a piece of data is stored in two places in the database, then


a) Storage space is wasted
b) Changing the data in one spot will cause data inconsistency
c) In can be more easily accessed
d) Storage space is wasted & Changing the data in one spot will cause data inconsistency
View Answer

Answer: d
Explanation: The database is always consistent and so there is no duplication.
advertisement

2. An audit trail ___________


a) Is used to make backup copies
b) Is the recorded history of operations performed on a file
c) Can be used to restore lost information
d) None of the mentioned
View Answer

Answer: b
Explanation: This is more useful for all recovery actions.

3. Large collection of files are called ____________


a) Fields
b) Records
c) Database
d) Sectors
View Answer

Answer: c
Explanation: The operator tree has a tree like format where the evaluation starts from root of the
tree .

4. Which of the following hardware component is the most important to the operation of a
database management system?
a) High resolution video display
b) Printer
c) High speed, large capacity disk
d) Mouse
View Answer

Answer: c
Explanation: All the data are stored in form of memory in the disk.
advertisement

5. Which of the following is not true of the traditional approach to information processing
a) There is common sharing of data among the various applications
b) It is file oriented
c) Programs are dependent on the file
d) It is inflexible
View Answer

Answer: a
Explanation: All the data are stored in form of memory in the disk.

6. Which of these is not a feature of Hierarchical model?


a) Organizes the data in tree-like structure
b) Parent node can have any number of child nodes
c) Root node does not have any parent
d) Child node can have any number of parent nodes
View Answer

Answer: d
Explanation: The data are traversed using several algorithms.

7. Which of these data models is an extension of the relational data model?


a) Object-oriented data model
b) Object-relational data model
c) Semi structured data model
d) None of the mentioned
View Answer

Answer: b
Explanation: All the data are stored in form of memory in the disk.
advertisement

8. The information about data in a database is called _______


a) Metadata
b) Hyper data
c) Tera data
d) None of the mentioned
View Answer

Answer: a
Explanation: Metadata is information about a data.
9. A data dictionary is a special file that contains?
a) The names of all fields in all files
b) The data types of all fields in all files
c) The widths of all fields in all files
d) All of the mentioned
View Answer

Answer: d
Explanation: The data dictionary is structured in tables and views, just like other database data.

10. The DBMS acts as an interface between what two components of an enterprise-class
database system?
a) Database application and the database
b) Data and the database
c) The user and the database application
d) Database application and SQL
View Answer

Answer: a
Explanation: Database application is the interface with the user to access the database.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Aptitude test, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – File Organisations
» Next - Database Questions and Answers – Data-Dictionary Storage
Categories Database MCQsPost navigation
Database Questions and Answers – File Organisations
Database Questions and Answers – Data-Dictionary Storage
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Trees


2. Operating System Questions and Answers
3. Python Programming Examples
4. C Programming Examples on Linked List
5. Python Questions and Answers
6. Python Programming Examples on Trees
7. MongoDB Questions and Answers
8. Computer Organization & Architecture Questions and Answers
9. Java Programming Examples
10. C# Programming Examples on LINQ
11. Home
12. C Programming Examples
13. Java Programming Examples on Utility Classes
14. Java Programming Examples on File Handling
15. RDBMS Questions and Answers
16. C Programming Examples on File Handling
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. Database Management System Questions and Answers
20. Database Questions and Answers – Relational Database and Database Schema
advertisement

Database Questions and Answers – Data-


Dictionary Storage
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Data-
Dictionary Storage”.

1. A relational database system needs to maintain data about the relations, such as the schema of
the relations. This is called
a) Metadata
b) Catalog
c) Log
d) Dictionary
View Answer

Answer: a
Explanation: Each side of a platter of a disk has a read–write head that moves across the platter
to access different tracks.
advertisement

2. Relational schemas and other metadata about relations are stored in a structure called the
____________
a) Metadata
b) Catalog
c) Log
d) Data Dictionary
View Answer

Answer: d
Explanation: Data dictionary is also called as system catalog.

3. ___________ is the collection of memory structures and Oracle background processes that
operates against an Oracle database.
a) Database
b) Instance
c) Tablespace
d) Segment
View Answer

Answer: b
Explanation: Instance is a snapshot of database at any point of time.

4. A ________ is a logical grouping of database objects, usually to facilitate security,


performance, or the availability of database objects such as tables and indexes.
a) Tablespace
b) Segments
c) Extents
d) Blocks
View Answer

Answer: a
Explanation: A tablespace is a storage location where the actual data underlying database
objects can be kept.
advertisement

5. A tablespace is further broken down into ________


a) Tablespace
b) Segments
c) Extents
d) Blocks
View Answer

Answer: b
Explanation: Segment names are used in create table and create index commands to place tables
or indexes on specific database devices.

6. __________ is a contiguous group of blocks allocated for use as part of a table, index, and so
forth.
a) Tablespace
b) Segment
c) Extent
d) Block
View Answer

Answer: c
Explanation: An extent is a set of contiguous blocks allocated in a database.

7. ________ is the smallest unit of allocation in an Oracle database.


a) Database
b) Instance
c) Tablespace
d) Database Block
View Answer
Answer: d
Explanation: Data block is a form of database space allocation.
advertisement

8. An Oracle __________ is a set of tables and views that are used as a read-only reference
about the database.
a) Database dictionary
b) Dictionary table
c) Data dictionary
d) Dictionary
View Answer

Answer: c
Explanation: Data dictionary is also called as system catalog.

9. A data dictionary is created when a __________ created.


a) Instance
b) Segment
c) Database
d) Dictionary
View Answer

Answer: c
Explanation: Data dictionary is also called as system catalog.

10. An Oracle object type has two parts the _________ and__________
a) Instance and body
b) Segment and blocks
c) Specification and body
d) Body and segment
View Answer

Answer: c
Explanation: Segment names are used in create table and create index commands to place tables
or indexes on specific database devices. An extent is a set of contiguous blocks allocated in a
database.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Organization of Records in Files
» Next - Database Questions and Answers – Database Buffer
Categories Database MCQsPost navigation
Database Questions and Answers – Organization of Records in Files
Database Questions and Answers – Database Buffer
advertisement
advertisement

Recommended Posts:

1. Information Science Questions and Answers


2. Home
3. Information Technology Questions and Answers
4. Programming Questions and Answers
5. C# Programming Examples on Functions
6. Data Structures & Algorithms II – Questions and Answers
7. Ruby Programming Questions and Answers
8. Python Questions and Answers
9. Java Programming Examples on Exception Handling
10. Data Science Questions and Answers
11. Java Programming Examples on Classes
12. SAN – Storage Area Networks Questions & Answers
13. Data Structure Questions and Answers
14. C++ Programming Examples on Data-Structures
15. C# Programming Examples on Data Structures
16. C Programming Examples on Data-Structures
17. Java Programming Examples on Data-Structures
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Bioinformatics Questions and Answers – Multiple Sequence Formats & Storage of
Information in a Sequence Database
advertisement

Database Questions and Answers – Database


Buffer
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Database
Buffer”.

1. The _______ is that part of main memory available for storage of copies of disk blocks.
a) Buffer
b) Catalog
c) Storage
d) Secondary storage
View Answer

Answer: a
Explanation: There is always a copy kept on disk of every block, but the copy on disk may be a
version of the block older than the version in the buffer.
advertisement

2. A major goal of the database system is to minimize the number of block transfers between the
disk and memory. This is achieved by
a) Buffer
b) Catalog
c) Storage
d) Secondary storage
View Answer

Answer: a
Explanation: There is always a copy kept on disk of every block, but the copy on disk may be a
version of the block older than the version in the buffer.

3. The subsystem responsible for the allocation of buffer space is called the ___________
a) Buffer
b) Buffer manager
c) Storage
d) Secondary storage
View Answer

Answer: b
Explanation: Programs in a database system make requests (that is, calls) on the buffer manager
when they need a block from disk.

4. In the buffer where there is no space for another block, the block can be inserted using
a) Pinned block strategy
b) Forced output block
c) Buffer replacement strategy
d) All of the mentioned
View Answer

Answer: c
Explanation: Most operating systems use a least recently used (LRU) scheme, in which the
block that was referenced least recently is written back to disk and is removed from the buffer.
advertisement

5. A block that is not allowed to be written back to disk is said to be ______________


a) Pinned
b) Forced
c) Buffer
d) All of the mentioned
View Answer

Answer: a
Explanation: Although many operating systems do not support pinned blocks, such a feature is
essential for a database system that is resilient to crashes.

6. There are situations in which it is necessary to write back the block to disk, even though the
buffer space that it occupies is not needed. This write is called the
a) Pinned block strategy
b) Forced output block
c) Buffer replacement strategy
d) All of the mentioned
View Answer

Answer: b
Explanation: The main-memory contents and thus buffer contents are lost in a crash, whereas
data on disk usually survive a crash.

7. The frequently used buffer replacement strategy is


a) Most recently used
b) Least recently used
c) Longest block
d) All of the mentioned
View Answer

Answer: b
Explanation: If a block must be replaced, the least recently referenced block is replaced.
advertisement

8. In case the buffer manager do not write the blocks properly then the buffer manager uses
a) Replacement strategy
b) Forced strategy
c) Crash recovery system
d) Both Replacement and Forced strategy
View Answer

Answer: c
Explanation: The crash-recovery subsystem imposes stringent constraints on block replacement.

9. The technique where the blocks which have been used are replaced is called
a) Replacement strategy
b) Forced strategy
c) Crash recovery system
d) Most recently used
View Answer

Answer: d
Explanation: The optimal strategy for block replacement is the most recently used (MRU)
strategy.

10. ___________________ frees the space occupied by a block as soon as the final tuple of that
block has been processed.
a) Replacement strategy
b) Forced strategy
c) Toss immediate strategy
d) Most recently used
View Answer
Answer: c
Explanation: The optimal strategy for block replacement is the most recently used (MRU)
strategy.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Data-Dictionary Storage
» Next - Database Questions and Answers – Ordered Indices
Categories Database MCQsPost navigation
Database Questions and Answers – Data-Dictionary Storage
Database Questions and Answers – Ordered Indices
advertisement
advertisement

Recommended Posts:

1. About
2. Information Science Questions and Answers
3. Bioinformatics Questions and Answers
4. Programming Questions and Answers
5. JUnit Questions and Answers
6. Wireless & Mobile Communications Questions & Answers
7. Ruby Programming Questions and Answers
8. Cloud Computing Questions and Answers
9. Java Programming Examples on Classes
10. Artificial Intelligence Questions and Answers
11. Computer Organization & Architecture Questions and Answers
12. Master of Computer Applications Questions and Answers
13. SAN – Storage Area Networks Questions & Answers
14. RDBMS Questions and Answers
15. Recruitment Support Service – Employers
16. Java Programming Examples on Exception Handling
17. Operating System Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement
Database Questions and Answers – Ordered
Indices
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Ordered
Indices”.

1. In ordered indices the file containing the records is sequentially ordered, a ___________ is an
index whose search key also defines the sequential order of the file.
a) Clustered index
b) Structured index
c) Unstructured index
d) Nonclustered index
View Answer

Answer: a
Explanation: Clustering index are also called primary indices; the term primary index may
appear to denote an index on a primary key, but such indices can in fact be built on any search
key.
advertisement

2. Indices whose search key specifies an order different from the sequential order of the file are
called ___________ indices.
a) Nonclustered
b) Secondary
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: Nonclustering index is also called secondary indices.

3. An ____________ consists of a search-key value and pointers to one or more records with
that value as their search-key value.
a) Index entry
b) Index hash
c) Index cluster
d) Index map
View Answer

Answer: a
Explanation: The pointer to a record consists of the identifier of a disk block and an offset
within the disk block to identify the record within the block.

4. In a _______ clustering index, the index record contains the search-key value and a pointer to
the first data record with that search-key value and the rest of the records will be in the
sequential pointers.
a) Dense
b) Sparse
c) Straight
d) Continuous
View Answer

Answer: a
Explanation: In a dense nonclustering index, the index must store a list of pointers to all records
with the same search-key value.
advertisement

5. In a __________ index, an index entry appears for only some of the search-key values.
a) Dense
b) Sparse
c) Straight
d) Continuous
View Answer

Answer: a
Explanation: Sparse indices can be used only if the relation is stored in sorted order of the search
key, that is if the index is a clustering index.

6. Incase the indices values are larger, index is created for these values of the index. This is
called
a) Pointed index
b) Sequential index
c) Multilevel index
d) Multiple index
View Answer

Answer: c
Explanation: Indices with two or more levels are called multilevel indices.

7. A search key containing more than one attribute is referred to as a _________ search key.
a) Simple
b) Composite
c) Compound
d) Secondary
View Answer

Answer: b
Explanation: The structure of the index is the same as that of any other index, the only
difference being that the search key is not a single attribute, but rather is a list of attributes.
advertisement

8. In B+ tree the node which points to another node is called


a) Leaf node
b) External node
c) Final node
d) Internal node
View Answer

Answer: d
Explanation: Nonleaf nodes are also referred to as internal nodes.

9. Insertion of a large number of entries at a time into an index is referred to as __________ of


the index.
a) Loading
b) Bulk insertion
c) Bulk loading
d) Increase insertion
View Answer

Answer: c
Explanation: Bulk loading is used to improve efficiency and scalability.

10. While inserting the record into the index, if the search-key value does not appear in the
index.
a) The system adds a pointer to the new record in the index entry
b) The system places the record being inserted after the other records with the same search-key
values
c) The system inserts an index entry with the search-key value in the index at the appropriate
position
d) None of the mentioned
View Answer

Answer: c
Explanation: If the index entry stores pointers to all records with the same search key value, the
system adds a pointer to the new record in the index entry.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Database Buffer
» Next - Database Questions and Answers – Hashing techniques
Categories Database MCQsPost navigation
Database Questions and Answers – Database Buffer
Database Questions and Answers – Hashing techniques
advertisement
advertisement

Recommended Posts:
1. Python Programming Examples on Searching and Sorting
2. Python Programming Examples on Graphs
3. MongoDB Questions and Answers
4. C++ Programming Examples on Hard Graph Problems & Algorithms
5. C Tutorials
6. C++ Programming Examples on Combinatorial Problems & Algorithms
7. C Questions and Answers
8. C Programming Examples without using Recursion
9. C Programming Examples on Combinatorial Problems & Algorithms
10. RDBMS Questions and Answers
11. C Programming Examples on Trees
12. C Programming Examples on Linked List
13. C Programming Examples on Searching and Sorting
14. Python Programming Examples on Trees
15. Python Programming Examples on Linked Lists
16. MySQL Database Questions and Answers
17. C Programming Examples on Arrays
18. C# Programming Examples on Arrays
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Hashing


techniques
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Hashing
techniques”.

1. If h is any hashing function and is used to hash n keys in to a table of size m, where n<=m,
the expected number of collisions involving a particular key x is :
a) Less than 1
b) Less than n
c) Less than m
d) Less than n/2
View Answer

Answer: a
Explanation: Hashing is also a method of sorting key values in a database table in an efficient
manner.
advertisement

2. A technique for direct search is


a) Binary Search
b) Linear Search
c) Tree Search
d) Hashing
View Answer

Answer: d
Explanation: Hashing is one way to enable security during the process of message transmission
when the message is intended for a particular recipient only.

3. The searching technique that takes O (1) time to find a data is


a) Linear Search
b) Binary Search
c) Hashing
d) Tree Search
View Answer

Answer: c
Explanation: A formula generates the hash, which helps to protect the security of the
transmission from unauthorized users.

4. The goal of hashing is to produce a search that takes


a) O(1) time
b) O(n2 )time
c) O(log n ) time
d) O(n log n ) time
View Answer

Answer: a
Explanation: Time complexity is given by the big oh notation.
advertisement

5. Consider a hash table of size seven, with starting index zero, and a hash function (3x +
4)mod7. Assuming the hash table is initially empty, which of the following is the contents of the
table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Note that ‘_’
denotes an empty location in the table.
a) 8, _, _, _, _, _, 10
b) 1, 8, 10, _, _, _, 3
c) 1, _, _, _, _, _,3
d) 1, 10, 8, _, _, _, 3
View Answer

Answer: b
Explanation: A formula generates the hash, which helps to protect the security of the
transmission from unauthorized users.

6. A hash table can store a maximum of 10 records, currently there are records in location 1,
3,4,7,8,9,10. The probability of a new record going into location 2, with hash functions
resolving collisions by linear probing is
a) 0.1
b) 0.6
c) 0.2
d) 0.5
View Answer

Answer: b
Explanation: Hashing is used to index and retrieve items in a database because it is easier to find
the item using the shortened hashed key than using the original value.

7. Key value pairs is usually seen in


a) Hash tables
b) Heaps
c) Both Hash tables and Heaps
d) Skip list
View Answer

Answer: a
Explanation: Hashing is used to index and retrieve items in a database because it is easier to find
the item using the shortened hashed key than using the original value.
advertisement

8. What is the best definition of a collision in a hash table?


a) Two entries are identical except for their keys
b) Two entries with different data have the exact same key
c) Two entries with different keys have the same exact hash value
d) Two entries with the exact same key have different hash values
View Answer

Answer: a
Explanation: This level is the root of the tree.

9. Which of the following scenarios leads to linear running time for a random search hit in a
linear-probing hash table?
a) All keys hash to same index
b) All keys hash to different indices
c) All keys hash to an even-numbered index
d) All keys hash to different even-numbered indices
View Answer

Answer: a
Explanation: If all keys hash to the same location then the i-th inserted key would need i lookups
to be found. The probability of looking up i-th key is 1/n (since it’s random). If you know some
probability it’s trivial to show that such lookups have linear time.

10. Breadth First Search is used in


a) Binary trees
b) Stacks
c) Graphs
d) All of the mentioned
View Answer
Answer: c
Explanation: Hashing is used to index and retrieve items in a database because it is easier to find
the item using the shortened hashed key than using the original value.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Ordered Indices
» Next - Database Questions and Answers – Ordered Indexing and Hashing
Categories Database MCQsPost navigation
Database Questions and Answers – Ordered Indices
Database Questions and Answers – Ordered Indexing and Hashing
advertisement
advertisement

Recommended Posts:

1. C Algorithms, Problems & Programming Examples


2. C++ Algorithms, Problems & Programming Examples
3. C Programming Examples on Set & String Problems & Algorithms
4. C Programming Examples on Combinatorial Problems & Algorithms
5. Python Programming Examples on Trees
6. Java Programming Examples on Set & String Problems & Algorithms
7. Cryptography and Network Security Questions and Answers
8. Java Programming Examples on Utility Classes
9. Java Programming Examples on Collections
10. RDBMS Questions and Answers
11. MongoDB Questions and Answers
12. Python Programming Examples on Searching and Sorting
13. C Programming Examples on Searching and Sorting
14. Data Structure Questions and Answers
15. Java Programming Examples on Data-Structures
16. MySQL Database Questions and Answers
17. Oracle Database Questions and Answers
18. C++ Programming Examples on Data-Structures
19. C Programming Examples on Data-Structures
20. Database Management System Questions and Answers
advertisement
Database Questions and Answers – Ordered
Indexing and Hashing
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Ordered
Indexing and Hashing”.

1. A(n) _________ can be used to preserve the integrity of a document or a message.


a) Message digest
b) Message summary
c) Encrypted message
d) None of the mentioned
View Answer

Answer: c
Explanation: Encryption algorithms are used to keep the contents safe.
advertisement

2. A hash function must meet ________ criteria.


a) Two
b) Three
c) Four
d) None of the mentioned
View Answer

Answer: b
Explanation: Only if the criteria is fulfilled the values are hashed.

3. What is the main limitation of Hierarchical Databases?


a) Limited capacity (unable to hold much data)
b) Limited flexibility in accessing data
c) Overhead associated with maintaining indexes
d) The performance of the database is poor
View Answer

Answer: b
Explanation: In this, the data items are placed in a tree like hierarchical structure.

4. The property (or set of properties) that uniquely defines each row in a table is called the:
a) Identifier
b) Index
c) Primary key
d) Symmetric key
View Answer

Answer: c
Explanation: Primary is used to uniquely identify the tuples.
advertisement
5. The separation of the data definition from the program is known as:
a) Data dictionary
b) Data independence
c) Data integrity
d) Referential integrity
View Answer

Answer: b
Explanation: Data dictionary is the place where the meaning of the data are organized.

6. In the client / server model, the database:


a) Is downloaded to the client upon request
b) Is shared by both the client and server
c) Resides on the client side
d) Resides on the server side
View Answer

Answer: d
Explanation: The server has all the database information and the client access it.

7. The traditional storage of data that is organized by customer, stored in separate folders in
filing cabinets is an example of what type of ‘database’ system?
a) Hierarchical
b) Network
c) Object oriented
d) Relational
View Answer

Answer: a
Explanation: Hierarchy is based on Parent-Child Relationship. Parent-Child Relationship Type
is basically 1:N relationship.
advertisement

8. The database design that consists of multiple tables that are linked together through matching
data stored in each table is called
a) Hierarchical database
b) Network database
c) Object oriented database
d) Relational database
View Answer

Answer: d
Explanation: A relational database is a collection of data items organized as a set of formally
described tables from which data can be accessed or reassembled.

9. The association role defines:


a) How tables are related in the database
b) The relationship between the class diagram and the tables in the database
c) The tables that each attribute is contained
d) Which attribute is the table’s primary key
View Answer

Answer: a
Explanation: The tables are always related in the database to form consistency.

10. The purpose of an N-Ary association is:


a) To capture a parent-child relationship
b) To deal with one to many relationships
c) To deal with relationships that involve more than two tables
d) To represent an inheritance relationship
View Answer

Answer: c
Explanation: The is binary n-array association meaning more than two classes are involved in
the relationship.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Hashing techniques
» Next - Database Questions & Answers – Bitmap Indices
Categories Database MCQsPost navigation
Database Questions and Answers – Hashing techniques
Database Questions & Answers – Bitmap Indices
advertisement
advertisement

Recommended Posts:

1. Java Questions and Answers


2. JUnit Questions and Answers
3. C# Programming Examples
4. Programming Questions and Answers
5. C# Programming Examples on Data Structures
6. C# Programming Examples on Inheritance
7. SQL Server Questions and Answers
8. Data Structure Questions and Answers
9. Java Programming Examples on Utility Classes
10. Home
11. Python Programming Examples on Stacks & Queues
12. C Programming Examples on Stacks & Queues
13. C++ Programming Examples on Data-Structures
14. Java Programming Examples on Data-Structures
15. Java Programming Examples on Networking
16. C Programming Examples on Data-Structures
17. Database Management System Questions and Answers
18. Oracle Database Questions and Answers
19. C# Programming Examples on Networking
20. MySQL Database Questions and Answers
advertisement

Database Questions & Answers – Bitmap Indices


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Bitmap
Indices”.

1. Bitmap indices are a specialized type of index designed for easy querying on ___________
a) Bit values
b) Binary digits
c) Multiple keys
d) Single keys
View Answer

Answer: c
Explanation: Each bitmap index is built on a single key.
advertisement

2. A _______ on the attribute A of relation r consists of one bitmap for each value that A can
take.
a) Bitmap index
b) Bitmap
c) Index
d) Array
View Answer

Answer: a
Explanation: A bitmap is simply an array of bits.

3.
SELECT *
FROM r
WHERE gender = ’f’ AND income level = ’L2’;

In this selection, we fetch the bitmaps for gender value f and the bitmap for income level value
L2, and perform an ________ of the two bitmaps.
a) Union
b) Addition
c) Combination
d) Intersection
View Answer

Answer: d
Explanation: We compute a new bitmap where bit i has value 1 if the ith bit of the two bitmaps
are both 1, and has a value 0 otherwise.
advertisement

4. To identify the deleted records we use the ______________


a) Existence bitmap
b) Current bitmap
c) Final bitmap
d) Deleted bitmap
View Answer

Answer: a
Explanation: The bitmaps which are deleted are denoted by 0.

5. Bitmaps can be used as a compressed storage mechanism at the leaf nodes of ________ for
those values that occur very frequently.
a) B-trees
b) B+-trees
c) Bit trees
d) Both B-trees and B+-trees
View Answer

Answer: b
Explanation: Bitmaps are combined and stored in a B+ tree.

6. Bitmaps can be combined with regular B+-tree indices for relations where a few attribute
values are extremely common, and other values also occur, but much less frequently.
a) Bitmap, B-tree
b) Bitmap, B+tree
c) B-tree, Bitmap
d) B+tree, Bitmap
View Answer

Answer: b
Explanation: Bitmaps are combined and stored in a B+ tree.

7. In a B+-tree index ______ for each value, we would normally maintain a list of all records
with that value for the indexed attribute.
a) Leaf
b) Node
c) Root
d) Link
View Answer

Answer: a
Explanation: Bitmaps are combined and stored in a B+ tree.
advertisement

8. A tablespace is further broken down into ________


a) Tablespace
b) Segments
c) Extents
d) Blocks
View Answer

Answer: b
Explanation: Segment names are used in create table and create index commands to place tables
or indexes on specific database devices.

9. In ordered indices the file containing the records is sequentially ordered, a ___________ is an
index whose search key also defines the sequential order of the file.
a) Clustered index
b) Structured index
c) Unstructured index
d) Nonclustered index
View Answer

Answer: a
Explanation: Clustering index are also called primary indices; the term primary index may
appear to denote an index on a primary key, but such indices can in fact be built on any search
key.

10. Indices whose search key specifies an order different from the sequential order of the file are
called ___________ indices.
a) Nonclustered
b) Secondary
c) All of the mentioned
d) None of the mentioned
View Answer

Answer: c
Explanation: Nonclustering index are also called secondary indices.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
advertisement

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Ordered Indexing and Hashing
» Next - Database Questions and Answers – Index Definition in SQL
Categories Database MCQsPost navigation
Database Questions and Answers – Ordered Indexing and Hashing
Database Questions and Answers – Index Definition in SQL
advertisement
advertisement

Recommended Posts:

1. C++ Programming Examples on Hard Graph Problems & Algorithms


2. C Programming Examples on Stacks & Queues
3. Java Programming Examples on Utility Classes
4. C++ Algorithms, Problems & Programming Examples
5. C Programming Examples on Hard Graph Problems & Algorithms
6. C Programming Examples on Graph Problems & Algorithms
7. Java Programming Examples on Hard Graph Problems & Algorithms
8. C Programming Examples on Trees
9. Python Programming Examples on Trees
10. C# Programming Examples on Arrays
11. MongoDB Questions and Answers
12. C++ Programming Examples on Data-Structures
13. C Programming Examples
14. Java Programming Examples on Data-Structures
15. Data Structure Questions and Answers
16. MySQL Database Questions and Answers
17. Oracle Database Questions and Answers
18. C Programming Examples on Data-Structures
19. RDBMS Questions and Answers
20. Database Questions and Answers – Multiple Granularity
advertisement

Database Questions and Answers – Index


Definition in SQL
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Index
Definition in SQL”.

1. What is the purpose of the index in sql server?


a) To enhance the query performance
b) To provide an index to a record
c) To perform fast searches
d) All of the mentioned
View Answer

Answer: d
Explanation: A database index is a data structure that improves the speed of data retrieval
operations on a database table at the cost of additional writes.
advertisement
2. How many types of indexes are there in sql server?
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: They are clustered index and non clustered index.

3. How non clustered index point to the data?


a) It never points to anything
b) It points to a data row
c) It is used for pointing data rows containing key values
d) None of the mentioned
View Answer

Answer: c
Explanation: Nonclustered indexes have a structure separate from the data rows. A nonclustered
index contains the nonclustered index key values and each key value entry has a pointer to the
data row that contains the key value.

4. Which one is true about clustered index?


a) Clustered index is not associated with table
b) Clustered index is built by default on unique key columns
c) Clustered index is not built on unique key columns
d) None of the mentioned
View Answer

Answer: b
Explanation: Nonclustered indexes have a structure separate from the data rows. A nonclustered
index contains the nonclustered index key values and each key value entry has a pointer to the
data row that contains the key value.
advertisement

5. What is true about indexes?


a) Indexes enhance the performance even if the table is updated frequently
b) It makes harder for sql server engines to work to work on index which have large keys
c) It doesn’t make harder for sql server engines to work to work on index which have large keys
d) None of the mentioned
View Answer

Answer: b
Explanation: Indexes tend to improve the performance.

6. Does index take space in the disk?


a) It stores memory as and when required
b) Yes, Indexes are stored on disk
c) Indexes are never stored on disk
d) Indexes take no space
View Answer

Answer: b
Explanation: Indexes take memory slots which are located on the disk.

7. What are composite indexes?


a) Are those which are composed by database for its internal use
b) A composite index is a combination of index on 2 or more columns
c) Composite index can never be created
d) None of the mentioned
View Answer

Answer: b
Explanation: A composite index is an index on two or more columns of a table.
advertisement

8. If an index is _________________ the metadata and statistics continue to exists


a) Disabling
b) Dropping
c) Altering
d) Both Disabling and Dropping
View Answer

Answer: a
Explanation: A database index is a data structure that improves the speed of data retrieval
operations on a database table at the cost of additional writes.

9. In _______________ index instead of storing all the columns for a record together, each
column is stored separately with all other rows in an index.
a) Clustered
b) Column store
c) Non clustered
d) Row store
View Answer

Answer: b
Explanation: A database index is a data structure that improves the speed of data retrieval
operations on a database table at the cost of additional writes.

10. A _________________ index is the one which satisfies all the columns requested in the
query without performing further lookup into the clustered index.
a) Clustered
b) Non Clustered
c) Covering
d) B-Tree
View Answer
Answer: c
Explanation: A covered query is a query where all the columns in the query’s result set are
pulled from non-clustered indexes.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions & Answers – Bitmap Indices
» Next - Database Questions and Answers – Query Processing
Categories Database MCQsPost navigation
Database Questions & Answers – Bitmap Indices
Database Questions and Answers – Query Processing
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Stacks & Queues


2. JUnit Questions and Answers
3. Information Technology Questions and Answers
4. Programming Questions and Answers
5. C# Programming Examples on LINQ
6. Data Science Questions and Answers
7. Bachelor of Computer Applications Questions and Answers
8. Java Programming Examples on Collections
9. Master of Computer Applications Questions and Answers
10. C Programming Examples on Data-Structures
11. Data Structure Questions and Answers
12. Bioinformatics Questions and Answers
13. Strength of Materials Questions and Answers
14. C Programming Examples on Matrix
15. RDBMS Questions and Answers
16. SQL Server Questions and Answers
17. MongoDB Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement
Database Questions and Answers – Query
Processing
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Query
Processing”.

1. A collection of data designed to be used by different people is called a/an


a) Organization
b) Database
c) Relationship
d) Schema
View Answer

Answer: b
Explanation: Database is a collection of related tables.
advertisement

2. Which of the following is the oldest database model?


a) Relational
b) Deductive
c) Physical
d) Network
View Answer

Answer: d
Explanation: The network model is a database model conceived as a flexible way of
representing objects and their relationships.

3. Which of the following schemas does define a view or views of the database for particular
users?
a) Internal schema
b) Conceptual schema
c) Physical schema
d) External schema
View Answer

Answer: d
Explanation: An externally-defined schema can provide access to tables that are managed on
any PostgreSQL, Microsoft SQL Server, SAS, Oracle, or MySQL database.

4. Which of the following is an attribute that can uniquely identify a row in a table?
a) Secondary key
b) Candidate key
c) Foreign key
d) Alternate key
View Answer
Answer: b
Explanation: A Candidate Key can be any column or a combination of columns that can qualify
as unique key in database.
advertisement

5. Which of the following are the process of selecting the data storage and data access
characteristics of the database?
a) Logical database design
b) Physical database design
c) Testing and performance tuning
d) Evaluation and selecting
View Answer

Answer: b
Explanation: The physical design of the database optimizes performance while ensuring data
integrity by avoiding unnecessary data redundancies.

6. Which of the following terms does refer to the correctness and completeness of the data in a
database?
a) Data security
b) Data constraint
c) Data independence
d) Data integrity
View Answer

Answer: d
Explanation: ACID property is satisfied by transaction in database.

7. The relationship between DEPARTMENT and EMPLOYEE is a


a) One-to-one relationship
b) One-to-many relationship
c) Many-to-many relationship
d) Many-to-one relationship
View Answer

Answer: b
Explanation: One entity department is related to several employees.
advertisement

8. A table can be logically connected to another table by defining a


a) Super key
b) Candidate key
c) Primary key
d) Unique key
View Answer

Answer: c
Explanation: A superkey is a combination of attributes that can be uniquely used to identify a
database record.
9. If the state of the database no longer reflects a real state of the world that the database is
supposed to capture, then such a state is called
a) Consistent state
b) Parallel state
c) Durable state
d) Inconsistent state
View Answer

Answer: d
Explanation: SQL data consistency is that whenever a transaction is performed, it sees a
consistent database.

10. Ensuring isolation property is the responsibility of the


a) Recovery-management component of the DBMS
b) Concurrency-control component of the DBMS
c) Transaction-management component of the DBMS
d) Buffer management component in DBMS
View Answer

Answer: b
Explanation: Concurrency control ensures that correct results for concurrent operations are
generated while getting those results as quickly as possible.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Index Definition in SQL
» Next - Database Questions and Answers – Selection Operation
Categories Database MCQsPost navigation
Database Questions and Answers – Index Definition in SQL
Database Questions and Answers – Selection Operation
advertisement
advertisement

Recommended Posts:

1. SAN – Storage Area Networks Questions & Answers


2. Information Technology Questions and Answers
3. Computer Science Questions and Answers
4. Information Science Questions and Answers
5. Computer Fundamentals Questions and Answers
6. Software Engineering Questions & Answers
7. Master of Computer Applications Questions and Answers
8. MongoDB Questions and Answers
9. Control Systems Questions and Answers
10. Hazardous Waste Management Questions and Answers
11. C# Programming Examples on Data Structures
12. JUnit Questions and Answers
13. Digital Image Processing Questions and Answers
14. Software Architecture & Design Questions and Answers
15. Digital Signal Processing Questions and Answers
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Selection


Operation
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Selection
Operation”.

1. In query processing, the ___________ is the lowest-level operator to access data.


a) Index Search
b) Linear search
c) File scan
d) Access paths
View Answer

Answer: c
Explanation: File scans are search algorithms that locate and retrieve records that fulfill a
selection condition.
advertisement

2. In a ____________ the system scans each file block and tests all records to see whether they
satisfy the selection condition.
a) Index Search
b) Linear search
c) File scan
d) Access paths
View Answer

Answer: b
Explanation: An initial seek is required to access the first block of the file.
3. Index structures are referred to as __________ since they provide a path through which data
can be located and accessed.
a) Index Search
b) Linear search
c) File scan
d) Access paths
View Answer

Answer: d
Explanation: A primary index is an index that allows the records of a file to be read in an order
that corresponds to the physical order in the file.

4. Search algorithms that use an index are referred to as


a) Index Search
b) Linear search
c) File scan
d) Access paths
View Answer

Answer: a
Explanation: Selection predicates are used to guide in the choice of the index to use in
processing the query.
advertisement

5. Which algorithm uses equality comparison on a key attribute with a primary index to retrieve
a single record that satisfies the corresponding equality condition.
a) A2
b) A4
c) A5
d) A6
View Answer

Answer: a
Explanation: A2 – primary index, equality on key.

6. The strategy can retrieve a single record if the equality condition is on a key; multiple records
may be retrieved if the indexing field is not a key is
a) A2
b) A4
c) A5
d) A6
View Answer

Answer: b
Explanation: A4 – Secondary index, equality.

7. The algorithm that uses a secondary ordered index to guide retrieval for comparison
conditions involving <,≤,≥, or > is
a) A2
b) A4
c) A5
d) A6
View Answer

Answer: d
Explanation: A6 – Secondary index, comparison.
advertisement

8. The ___ algorithm scans each index for pointers to tuples that satisfy an individual condition.
a) A2
b) A4
c) A9
d) A6
View Answer

Answer: c
Explanation: A9 – Conjunctive selection by an intersection of identifiers.

9. If access paths are available on all the conditions of a disjunctive selection, each index is
scanned for pointers to tuples that satisfy the individual condition. This is satisfied by
a) A10
b) A7
c) A9
d) A6
View Answer

Answer: a
Explanation: A10 – Disjunctive selection by union of identifiers.

10. Conjunctive selection using one index. This is


a) A10
b) A7
c) A9
d) A6
View Answer

Answer: b
Explanation: To reduce the cost of A7 we choose a i and one of algorithms A1 through A6 for
which the combination results in the least cost for i (r ). The cost of algorithm A7 is given by the
cost of the chosen algorithm.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Query Processing
» Next - Database Questions and Answers – Sorting
Categories Database MCQsPost navigation
Database Questions and Answers – Query Processing
Database Questions and Answers – Sorting
advertisement
advertisement

Recommended Posts:

1. C# Programming Examples on LINQ


2. C++ Algorithms, Problems & Programming Examples
3. C++ Programming Examples on Hard Graph Problems & Algorithms
4. Java Programming Examples on String Handling
5. C Programming Examples using Recursion
6. C++ Programming Examples on Graph Problems & Algorithms
7. C++ Programming Examples on Combinatorial Problems & Algorithms
8. Python Programming Examples on Trees
9. Java Algorithms, Problems & Programming Examples
10. MongoDB Questions and Answers
11. C Programming Examples on Combinatorial Problems & Algorithms
12. Java Programming Examples on Combinatorial Problems & Algorithms
13. C# Programming Examples on Files
14. C Programming Examples on Graph Problems & Algorithms
15. C Programming Examples on Searching and Sorting
16. Python Programming Examples on Searching and Sorting
17. Python Programming Examples on Graphs
18. Oracle Database Questions and Answers
19. MySQL Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Sorting


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Sorting”.

1. Two main measures for the efficiency of an algorithm are


a) Processor and memory
b) Complexity and capacity
c) Time and space
d) Data and space
View Answer
Answer: c
Explanation: Depending on the time and space complexity only the algorithm for sorting will be
chosen.
advertisement

2. The time factor when determining the efficiency of an algorithm is measured by


a) Counting microseconds
b) Counting the number of key operations
c) Counting the number of statements
d) Counting the kilobytes of algorithm
View Answer

Answer: b
Explanation: The operations taking place with the time and space is counted.

3. The space factor when determining the efficiency of an algorithm is measured by


a) Counting the maximum memory needed by the algorithm
b) Counting the minimum memory needed by the algorithm
c) Counting the average memory needed by the algorithm
d) Counting the maximum disk space needed by the algorithm
View Answer

Answer: a
Explanation: Time complexity maintains the maximum time needed.

4. Which of the following case does not exist in complexity theory


a) Best case
b) Worst case
c) Average case
d) Null case
View Answer

Answer: d
Explanation: Null case cannot be counted as the factor for complexity.
advertisement

5. The Worst case occur in linear search algorithm when


a) Item is somewhere in the middle of the array
b) Item is not in the array at all
c) Item is the last element in the array
d) Item is the last element in the array or is not there at all
View Answer

Answer: d
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.

6. The Average case occur in linear search algorithm


a) When Item is somewhere in the middle of the array
b) When Item is not in the array at all
c) When Item is the last element in the array
d) When Item is the last element in the array or is not there at all
View Answer

Answer: a
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.

7. The complexity of the average case of an algorithm is


a) Much more complicated to analyze than that of worst case
b) Much more simpler to analyze than that of worst case
c) Sometimes more complicated and some other times simpler than that of worst case
d) None of the mentioned
View Answer

Answer: a
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.
advertisement

8. The complexity of a linear search algorithm is


a) O(n)
b) O(log n)
c) O(n2)
d) O(n log n)
View Answer

Answer: a
Explanation: It refers to n values complexity in the algorithm which can be reduced by choosing
the other algorithms.

9. The complexity of Binary search algorithm is


a) O(n)
b) O(log )
c) O(n2)
d) O(n log n)
View Answer

Answer: b
Explanation: This shows that it has a standard complexity in addressing.

10. The complexity of Bubble sort algorithm is


a) O(n)
b) O(log n)
c) O(n2)
d) O(n log n)
View Answer

Answer: c
Explanation: Bubble sort, is a simple sorting algorithm that works by repeatedly stepping
through the list to be sorted, comparing each pair of adjacent items and swapping them if they
are in the wrong order.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Selection Operation
» Next - Database Questions and Answers – Join Operations
Categories Database MCQsPost navigation
Database Questions and Answers – Selection Operation
Database Questions and Answers – Join Operations
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on String Handling


2. C Programming Examples on Graph Problems & Algorithms
3. Java Algorithms, Problems & Programming Examples
4. C++ Programming Examples on Graph Problems & Algorithms
5. C Programming Examples on Stacks & Queues
6. Python Programming Examples on Trees
7. Java Programming Examples on Arrays
8. Data Structures & Algorithms II – Questions and Answers
9. C Programming Examples using Recursion
10. C Programming Examples on Arrays
11. MySQL Database Questions and Answers
12. Database Management System Questions and Answers
13. Oracle Database Questions and Answers
14. C# Programming Examples on Arrays
15. C++ Programming Examples on Combinatorial Problems & Algorithms
16. C Programming Examples on Combinatorial Problems & Algorithms
17. Java Programming Examples on Combinatorial Problems & Algorithms
18. C# Programming Examples on Sorting
19. Cycle Sort Multiple Choice Questions and Answers (MCQs)
20. Counting Sort Multiple Choice Questions and Answers (MCQs)
advertisement

Database Questions and Answers – Join


Operations
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Join
Operations”.

1. A_____ is a query that retrieves rows from more than one table or view:
a) Start
b) End
c) Join
d) All of the mentioned
View Answer

Answer: c
Explanation: An SQL join clause combines records from two or more tables in a database. It
creates a set that can be saved as a table or used as it is. A JOIN is a means for combining fields
from two tables by using values common to each.
advertisement

2. A condition is referred to as __________


a) Join in SQL
b) Join condition
c) Join in SQL & Condition
d) None of the mentioned
View Answer

Answer: b
Explanation: An SQL join clause combines records from two or more tables in a database. It
creates a set that can be saved as a table or used as it is. A JOIN is a means for combining fields
from two tables by using values common to each.

3. Which oracle is the join condition is specified using the WHERE clause:
a) Oracle 9i
b) Oracle 8i
c) Pre-oracle 9i
d) Pre-oracle 8i
View Answer

Answer: c
Explanation: Oracle 9i is a version of the Oracle Database. The i stands for “Internet” to indicate
that 9i is “Internet ready”.

4. How many join types in join condition:


a) 2
b) 3
c) 4
d) 5
View Answer

Answer: d
Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN.
advertisement

5. Which are the join types in join condition:


a) Cross join
b) Natural join
c) Join with USING clause
d) All of the mentioned
View Answer

Answer: d
Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN are the types
of joins.

6. Which product is returned in a join query have no join condition:


a) Equijoins
b) Cartesian
c) Both Equijoins and Cartesian
d) None of the mentioned
View Answer

Answer: b
Explanation: A Cartesian coordinate system is a coordinate system that specifies each point
uniquely in a plane by a pair of numerical coordinates.

7. Which is a join condition contains an equality operator:


a) Equijoins
b) Cartesian
c) Both Equijoins and Cartesian
d) None of the mentioned
View Answer

Answer: a
Explanation: An equi-join is a specific type of comparator-based join, that uses only equality
comparisons in the join-predicate.
advertisement

8. Which join refers to join records from the write table that have no matching key in the left
table are include in the result set:
a) Left outer join
b) Right outer join
c) Full outer join
d) Half outer join
View Answer

Answer: b
Explanation: A right outer join will return all the rows that an inner join returns plus one row for
each of the other rows in the second table that did not have a match in the first table. It is the
same as a left outer join with the tables specified in the opposite order.
9. Which operation are allowed in a join view:
a) UPDATE
b) INSERT
c) DELETE
d) All of the mentioned
View Answer

Answer: d
Explanation: The DELETE statement is used to delete rows in a table. The UPDATE statement
is used to update existing records in a table. The INSERT INTO statement is used to insert new
records in a table.

10. Which view that contains more than one table in the top-level FROM clause of the SELECT
statement:
a) Join view
b) Datable join view
c) Updatable join view
d) All of the mentioned
View Answer

Answer: c
Explanation: The DELETE statement is used to delete rows in a table. The UPDATE statement
is used to update existing records in a table. The INSERT INTO statement is used to insert new
records in a table.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Sorting
» Next - Database Questions and Answers – Evaluation of Expressions
Categories Database MCQsPost navigation
Database Questions and Answers – Sorting
Database Questions and Answers – Evaluation of Expressions
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Arrays


2. Information Science Questions and Answers
3. C Programming Examples on Stacks & Queues
4. Information Technology Questions and Answers
5. Programming Questions and Answers
6. Mechanical Operations Questions and Answers
7. Heat Transfer Operations Questions and Answers
8. C Programming Examples on Bitwise Operations
9. C Programming Examples on Data-Structures
10. C Programming Examples on Matrix
11. Python Programming Examples on Stacks & Queues
12. Data Structure Questions and Answers
13. Java Programming Examples on Arrays
14. C Programming Examples on File Handling
15. Java Programming Examples on Utility Classes
16. RDBMS Questions and Answers
17. C# Programming Examples on LINQ
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Evaluation of


Expressions
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Evaluation of
Expressions”.

1. Pictorial representation of an expression is called


a) Expression tree
b) Operator tree
c) Expression flow
d) Expression chart
View Answer

Answer: b
Explanation: The operator tree has a tree like format where the evaluation starts from root of the
tree.
advertisement

2. The results of each intermediate operation are created and then are used for evaluation of the
next-level operations. This is called
a) Materialized evaluation
b) Expression evaluation
c) Tree evaluation
d) Tree materialization
View Answer
Answer: a
Explanation: The cost of a materialized evaluation is not simply the sum of the costs of the
operations involved.

3. ______________ allows the algorithm to execute more quickly by performing CPU activity
in parallel with I/O activity.
a) Buffering
b) Double buffering
c) Multiple buffering
d) Double reading
View Answer

Answer: a
Explanation: Double buffering using two buffers, with one continuing execution of the
algorithm while the other is being written out.

4. Pipelines can be executed in


a) 4
b) 3
c) 2
d) 5
View Answer

Answer: c
Explanation: Demand driven and producer driven pipelines are the two ways.
advertisement

5. In a _________ the system makes repeated requests for tuples from the operation at the top of
the pipeline.
a) Demand-driven pipeline
b) Producer-driven pipeline
c) Demand pipeline
d) All of the mentioned
View Answer

Answer: a
Explanation: Each time that an operation receives a request for tuples, it computes the next tuple
(or tuples) to be returned, and then returns that tuple.

6. In a _____________ operations do not wait for requests to produce tuples, but instead
generate the tuples eagerly.
a) Demand-driven pipeline
b) Producer-driven pipeline
c) Demand pipeline
d) All of the mentioned
View Answer

Answer: b
Explanation: Each operation in a producer-driven pipeline is modeled as a separate process or
thread within the system that takes a stream of tuples from its pipelined inputs and generates a
stream of tuples for its output.

7. Each operation in a demand-driven pipeline can be implemented as an ____ that provides the
following functions: open(), next(), and close().
a) Demand
b) Pipeline
c) Iterator
d) All of the mentioned
View Answer

Answer: c
Explanation: After a call to open(), each call to next() returns the next output tuple of the
operation.
advertisement

8. The iterator maintains the __________ of its execution in between calls so that successive
next() requests receive successive result tuples.
a) State
b) Transition
c) Rate
d) Block
View Answer

Answer: a
Explanation: The function close() tells an iterator that no more tuples are required.

9. Tuples are generated ___________ in producer-driven pipelining, they are generated


________ on demand, in demand-driven pipelining.
a) Lazily, Eagerly
b) Eagerly, Lazily
c) Slowly, Eagerly
d) Eagerly, Slowly
View Answer

Answer: b
Explanation: Producer-driven pipelining is very useful in parallel processing systems.

10. When two inputs that we desire to pipeline into the join are not already sorted it is the
_____________ technique.
a) Hash join
b) Buffer join
c) double-pipelined hash join
d) double-pipelined join
View Answer

Answer: d
Explanation: When hash indices are used on tuples, the resultant algorithm is called the double-
pipelined hash-join technique.
advertisement
Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Join Operations
» Next - Database Questions and Answers – Transformation of Relational Expressions
Categories Database MCQsPost navigation
Database Questions and Answers – Join Operations
Database Questions and Answers – Transformation of Relational Expressions
advertisement
advertisement

Recommended Posts:

1. Java Questions and Answers


2. Python Questions and Answers
3. C Programming Examples on Data-Structures
4. Genetic Engineering Questions and Answers
5. C++ Programming Examples on Graph Problems & Algorithms
6. Java Programming Examples on Multithreading
7. Java Programming Examples on Data-Structures
8. C Programming Examples on Trees
9. C Programming Examples on Graph Problems & Algorithms
10. Java Programming Examples on Graph Problems & Algorithms
11. C++ Programming Examples on Data-Structures
12. C# Programming Examples on Data Structures
13. Python Programming Examples on Trees
14. Bioinformatics Questions and Answers
15. MongoDB Questions and Answers
16. RDBMS Questions and Answers
17. Data Structure Questions and Answers
18. Oracle Database Questions and Answers
19. MySQL Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers –


Transformation of Relational Expressions
« Prev
Next »
This set of Database Questions and Answers for Entrance exams focuses on “Transformation of
Relational Expressions”.

1. Consider the following relational schemes for a library database:


advertisement
Book (Title, Author, Catalog_no, Publisher, YEAR, Price)
Collection (Title, Author, Catalog_no)
WITH the following functional dependencies:
I. Title Author -> Catalog_no
II. Catalog_no -> Title Author Publisher YEAR
III. Publisher Title YEAR -> Price

Assume {Author, Title} is the key for both schemes. Which of the following statements is true?
a) Both Book and Collection are in BCNF
b) Both Book and Collection are in 3NF only
c) Book is in 2NF and Collection is in 3NF
d) Both Book and Collection are in 2NF only
View Answer

Answer: c
Explanation: The relation Collection is in BCNF: Its given that {Author, Title} is the key and
there is only one functional dependency (FD) applicable to the relation Collection {i.e. Title
Author –> Catalog_no}.

2. Let R(A,B,C,D,E,P,G) be a relational schema in which the following FDs are known to hold:
AB->CD
DE->P
C->E
P->C
B->G

The relation schema R is


a) in BCNF
b) in 3NF, but not in BCNF
c) in 2NF, but not in 3NF
d) not in 2NF
View Answer

Answer: d
Explanation: From the closure set of attributes we can see that the key for the relation is AB.
The FD B->G is a partial dependency, hence it is not in 2NF.
advertisement

3. Which of the following is/are false for RAW mode of FOR XML?
a) XMLSCHEMA option does not returns an in-line XSD schema
b) BINARY BASE32 returns the binary data in base32-encoded format
c) Each row in the query result is transformed into an XML element
d) None of the mentioned
View Answer

Answer: b
Explanation: XML was designed to transport and store data.
4. ___________ refers to the ability of the system to recover committed transaction updates if
either the system or the storage media fails.
a) Isolation
b) Atomicity
c) Consistency
d) Durability
View Answer

Answer: d
Explanation: In database systems, durability is the ACID property which guarantees that
transactions that have committed will survive permanently.

5. Which utilities can we use to export data from sql server to a text file?
a) DTS export wizard
b) BCP
c) ISQL
d) DTS export wizard and BCP
View Answer

Answer: d
Explanation: The bcp utility bulk copies data between an instance of Microsoft SQL Server and
a data file in a user-specified format.
advertisement

6. You have a column that will only contain values from 0 to 256. What is the most economical
data type to use for the column?
a) TINYINT
b) SMALLINT
c) INT
d) DECIMAL(1)
View Answer

Answer: b
Explanation: The bcp utility bulk copies data between an instance of Microsoft SQL Server and
a data file in a user-specified format.

7. Problems occurs if we don’t implement a proper locking strategy


a) Dirty reads
b) Phantom reads
c) Lost updates
d) Unrepeatable reads
View Answer

Answer: b
Explanation: Phantom reads occur when an insert or delete action is performed against a row
that belongs to a range of rows being read by a transaction.

8. Which of the following fixed database roles can add or remove user IDs?
a) db_accessadmin
b) db_securityadmin
c) db_setupadmin
d) db_sysadmin
View Answer

Answer: a
Explanation: The db_accessadmin role manages security, but handles access to the database, as
the name implies.

9. By default sql server has ___________ isolation level


a) READ COMMITTED
b) READ UNCOMMITTED
c) SERIALIZABLE
d) REPEATABLE READ
View Answer

Answer: a
Explanation: READ UNCOMMITTED is the most optimistic concurrency isolation option
available in SQL Server.
advertisement

10. Which of the following pair of regular expression are not equivalent?
a) 1(01)* and (10)*1
b) x(xx)* and (xx)*x
c) (ab)* and a*b*
d) x+ and x*x+
View Answer

Answer: c
Explanation: (ab)*=(a*b*)*.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Entrance exams, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Evaluation of Expressions
» Next - Database Questions and Answers – Estimating Statistics of Expression Results
Categories Database MCQsPost navigation
Database Questions and Answers – Evaluation of Expressions
Database Questions and Answers – Estimating Statistics of Expression Results
advertisement
advertisement

Recommended Posts:

1. Java Questions and Answers


2. 100+ Java Android Programming Examples
3. Java Programming Examples on Collections
4. C Programming Examples on Linked List
5. C# Programming Examples on Networking
6. Java Programming Examples on Networking
7. RDBMS Questions and Answers
8. JUnit Questions and Answers
9. Programming Questions and Answers
10. MongoDB Questions and Answers
11. Java Programming Examples on Utility Classes
12. C# Programming Examples on Files
13. SQL Server Questions and Answers
14. Oracle Database Questions and Answers
15. MySQL Database Questions and Answers
16. Database Management System Questions and Answers
17. Database Questions and Answers – Querying database part 5
18. SQL Server Questions and Answers – Database Snapshots
19. Database Questions and Answers – Evaluation of Expressions
20. Database Questions and Answers – Querying database part-1 DDL
advertisement

Database Questions and Answers – Estimating


Statistics of Expression Results
« Prev
Next »

This set of Database Questions and Answers for Campus interviews focuses on “Estimating
Statistics of Expression Results”.

1. Which feature converts row data to a column for better analytical view?
a) Views
b) Join
c) Pivot
d) Trigger
View Answer

Answer: c
Explanation: Pivot table is very powerful and very easy to use.
advertisement

2. Which of the following statements is/are not true for SQL profiler?
a) Enables you to monitor events
b) Check if rows are being inserted properly
c) Check the performance of a stored procedure
d) None of the mentioned
View Answer
Answer: c
Explanation: Stored procedures are like functions which do not return values.

3. Which global variables can be used to determine if a transaction is still open?


a) @@NESTLEVEL
b) @@FETCH_STATUS
c) @@TRANCOUNT
d) @@CONNECTIONS
View Answer

Answer: c
Explanation: PRINT @@TRANCOUNT — The BEGIN TRAN statement will increment the —
transaction count by 1.

4. Which statement is used to define a cursor?


a) OPEN
b) FETCH
c) DECLARE CURSOR
d) @@FETCH_STATUS
View Answer

Answer: c
Explanation: A database cursor is a control structure that enables traversal over the records in a
database.
advertisement

5. What is the default “SORT” order for a SQL?


a) Ascending
b) Descending
c) As specified by the user
d) None of the mentioned
View Answer

Answer: a
Explanation: Default is ascending order.

6. Capabilities of RAISERROR
a) It can be logged in the error log
b) It can print a message to the application
c) It can assign an error number, state and severity
d) All of the mentioned
View Answer

Answer: d
Explanation: A relational database table is often described as “normalized” if it is in the Third
Normal Form because most of the 3NF tables are free of insertion, update, and deletion
anomalies.

7. How inserting data through stored procedure do reduces network traffic and increase database
performance?
a) Stored procedure can accept parameter
b) Permission check is not required
c) The execution plan is stored in the cache after it was executed the first time
d) None of the mentioned
View Answer

Answer: c
Explanation: A relational database table is often described as “normalized” if it is in the Third
Normal Form because most of the 3NF tables are free of insertion, update, and deletion
anomalies.
advertisement

8. Stored procedures are safe from SQL injection attacks


a) True
b) False
c) Depends on the result
d) Always safe
View Answer

Answer: a
Explanation: Injection attack is not possible in SP.

9. Which of the following connection type supports application role permissions and password
encryption?
a) OLE DB
b) DBLib
c) ODBC
d) OLE DB and ODBC
View Answer

Answer: d
Explanation: Open Database Connectivity (ODBC) is Microsoft’s strategic interface for
accessing data in a heterogeneous environment of relational.

10. Cursor that reflects the changes made to the database table even after the result set is
returned
a) Static
b) Dynamic
c) FORWARD_ONLY
d) Keyset
View Answer

Answer: b
Explanation: A database cursor is a control structure that enables traversal over the records in a
database.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database for Campus Interviews, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Transformation of Relational Expressions
» Next - Database Questions and Answers – Materialized Views
Categories Database MCQsPost navigation
Database Questions and Answers – Transformation of Relational Expressions
Database Questions and Answers – Materialized Views
advertisement
advertisement

Recommended Posts:

1. LISP Questions and Answers


2. Python Programming Examples on Trees
3. C# Programming Examples on Mathematics
4. Java Programming Examples on Hard Graph Problems & Algorithms
5. C Programming Examples on Linked List
6. Python Programming Examples on Linked Lists
7. C# Basic Programming Examples
8. C Programming Examples on Stacks & Queues
9. Java Programming Examples on Utility Classes
10. Java Programming Examples on Collections
11. C Programming Examples on Matrix
12. Simple C Programs
13. Simple Java Programs
14. Java Programming Examples on Event Handling
15. RDBMS Questions and Answers
16. Probability and Statistics Questions and Answers
17. SQL Server Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Materialized


Views
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Materialized
Views”.
1. Which normal form is considered adequate for normal relational database design?
a) 2NF
b) 5NF
c) 4NF
d) 3NF
View Answer

Answer: d
Explanation: A relational database table is often described as “normalized” if it is in the Third
Normal Form because most of the 3NF tables are free of insertion, update, and deletion
anomalies.
advertisement

2. Consider a schema R(A, B, C, D) and functional dependencies A -> B and C -> D. Then the
decomposition of R into R1 (A, B) and R2(C, D) is
a) dependency preserving and lossless join
b) lossless join but not dependency preserving
c) dependency preserving but not lossless join
d) not dependency preserving and not lossless join
View Answer

Answer: d
Explanation: While decomposing a relational table we must verify the following properties:
i) Dependency Preserving Property
ii) Lossless-Join Property.

3. Relation R with an associated set of functional dependencies, F, is decomposed into BCNF.


The redundancy (arising out of functional dependencies) in the resulting set of relations is
a) Zero
b) More than zero but less than that of an equivalent 3NF decomposition
c) Proportional to the size of F+
d) Indeterminate
View Answer

Answer: b
Explanation: Redundancy in BCNF is low when compared to 3NF.

4. Which one of the following statements about normal forms is FALSE?


a) BCNF is stricter than 3NF
b) Lossless, dependency-preserving decomposition into 3NF is always possible
c) Lossless, dependency-preserving decomposition into BCNF is always possible
d) Any relation with two attributes is in BCNF
View Answer

Answer: c
Explanation: Achieving Lossless and dependency-preserving decomposition property into
BCNF is difficult.

5. A table has fields F1, F2, F3, F4, and F5, with the following functional dependencies:
advertisement
F1->F3
F2->F4
(F1,F2)->F5

in terms of normalization, this table is in


a) 1NF
b) 2NF
c) 3NF
d) None of the mentioned
View Answer

Answer: a
Explanation: Since the primary key is not given we have to derive the primary key of the table.
Using the closure set of attributes we get the primary key as (F1,F2). From functional
dependencies, “F1->F3, F2->F4”, we can see that there is partial functional dependency
therefore it is not in 1NF. Hence the table is in 1NF.

6. Which of the following is TRUE?


a) Every relation in 2NF is also in BCNF
b) A relation R is in 3NF if every non-prime attribute of R is fully functionally dependent on
every key of R
c) Every relation in BCNF is also in 3NF
d) No relation can be in both BCNF and 3NF
View Answer

Answer: c
Explanation: A relational database table is often described as “normalized” if it is in the Third
Normal Form because most of the 3NF tables are free of insertion, update, and deletion
anomalies.

7. Consider the following functional dependencies in a database.


advertisement
Date_of_Birth->Age Age->Eligibility
Name->Roll_number Roll_number->Name
Course_number->Course_name Course_number->Instructor
(Roll_number, Course_number)->Grade

The relation (Roll_number, Name, Date_of_birth, Age) is


a) In second normal form but not in third normal form
b) In third normal form but not in BCNF
c) In BCNF
d) None of the mentioned
View Answer

Answer: d
Explanation: For the given relation only some of the above FDs are applicable. The applicable
FDs are given below:
Date_of_Birth->Age
Name->Roll_number
Roll_number->Name
Finding the closure set of attributes we get the candidate keys:(Roll_number,Date_of_Birth),
and (Name,Date_of_Birth) .
On selecting any one of the candidate key we can see that the FD Date_of_Birth->Age is a
partial dependency. Hence the relation is in 1NF.

8. The relation schema Student_Performance (name, courseNo, rollNo, grade) has the following
FDs:
name,courseNo->grade
rollNo,courseNo->grade
name->rollNo
rollNo->name

The highest normal form of this relation scheme is


a) 2NF
b) 3NF
c) BCNF
d) 4NF
View Answer

Answer: b
Explanation: A super key is a combination of prime attributes and one or more non-prime key
attribute(s). It also uniquely identifies a record in a table. Primary key can be defined as super
key with minimal attributes.
advertisement

9. The relation EMPDT1 is defined with attributes empcode(unique), name, street, city, state,
and pincode. For any pincode, there is only one city and state. Also, for any given street, city
and state, there is just one pincode. In normalization terms EMPDT1 is a relation in
a) 1NF only
b) 2NF and hence also in 1NF
c) 3NF and hence also in 2NF and 1NF
d) BCNF and hence also in 3NF, 2NF and 1NF
View Answer

Answer: b
Explanation: Empcode is unique, therefore it is the primary key. Since the primary key consists
of a single attribute there will be no partial dependency, hence the relation is in 2NF.
From the question we get the FDs as below:
pincode -> city, state
street,city,state -> pincode
From the FDs we can see that there are transitive dependencies, hence the table is not in 3NF.

10. Which one of the following statements is FALSE?


a) Any relation with two attributes is in BCNF
b) A relation in which every key has only one attribute is in 2NF
c) A prime attribute can be transitively dependent on a key in a 3 NF relation
d) A prime attribute can be transitively dependent on a key in a BCNF relation
View Answer
Answer: d
Explanation: A table is in 3NF if and only if, for each of its functional dependencies X -> A, at
least one of the following conditions holds:
* X contains A (that is, X -> A is trivial functional dependency), or
* X is a superkey, or
* A should be prime attribute.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Estimating Statistics of Expression Results
» Next - Database Questions and Answers – Advanced Query Optimization
Categories Database MCQsPost navigation
Database Questions and Answers – Estimating Statistics of Expression Results
Database Questions and Answers – Advanced Query Optimization
advertisement
advertisement

Recommended Posts:

1. SQL Server Questions and Answers


2. MongoDB Questions and Answers
3. Recruitment Support Service – Employers
4. C Programming Examples on Matrix
5. C# Programming Examples on Functions
6. Java Programming Examples on Collection API
7. Microwave Engineering Questions and Answers
8. Bioinformatics Questions and Answers
9. Electromagnetic Theory Questions and Answers
10. JUnit Questions and Answers
11. MySQL Database Questions and Answers
12. RDBMS Questions and Answers
13. Oracle Database Questions and Answers
14. Database Management System Questions and Answers
15. Database Questions and Answers – The Entity-Relationship Model
16. RDBMS Questions and Answers – Materialized Views and Advanced Topics in Query
Optimization
17. Database Questions and Answers – Querying database part-1 DDL
18. RDBMS Questions and Answers – Normal Forms
19. Database Questions and Answers – Views
20. Database Questions and Answers – Querying Database – 4
advertisement
Database Questions and Answers – Advanced
Query Optimization
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Advanced
Query Optimization”.

1. _______________ is a procedural extension of Oracle – SQL that offers language constructs


similar to those in imperative programming languages.
a) SQL
b) PL/SQL
c) Advanced SQL
d) PQL
View Answer

Answer: b
Explanation: PL/SQL is an imperative 3GL that was designed specifically for the seamless
processing of SQL commands.
advertisement

2. ___________ combines the data manipulating power of SQL with the data processing power
of Procedural languages.
a) PL/SQL
b) SQL
c) Advanced SQL
d) PQL
View Answer

Answer: a
Explanation: PL/SQL is an imperative 3GL that was designed specifically for the seamless
processing of SQL commands.

3. _______________ has made PL/SQL code run faster without requiring any additional work
on the part of the programmer.
a) SQL Server
b) My SQL
c) Oracle
d) SQL Lite
View Answer

Answer: c
Explanation: An Oracle database is a collection of data treated as a unit. The purpose of a
database is to store and retrieve related information.

4. A line of PL/SQL text contains groups of characters known as


a) Lexical Units
b) Literals
c) Textual Units
d) Identifiers
View Answer

Answer: a
Explanation: Lexical items can be generally understood to convey a single meaning, much as a
lexeme, but are not limited to single words.
advertisement

5. We use ______________ name PL/SQL program objects and units.


a) Lexical Units
b) Literals
c) Delimiters
d) Identifiers
View Answer

Answer: d
Explanation: The database object name is referred to as its identifier.

6. A ___________________ is an explicit numeric, character, string or Boolean value not


represented by an identifier.
a) Comments
b) Literals
c) Delimiters
d) Identifiers
View Answer

Answer: b
Explanation: The terms literal and constant value are synonymous and refer to a fixed data
value.

7. If no header is specified, the block is said to be an _______________ PL/SQL block.


a) Strong
b) Weak
c) Empty
d) Anonymous
View Answer

Answer: d
Explanation: The terms literal and constant value are synonymous and refer to a fixed data
value.
advertisement

8. _________________ is a sequence of zero or more characters enclosed by single quotes.


a) Integers literal
b) String literal
c) String units
d) String label
View Answer
Answer: b
Explanation: The terms literal and constant value are synonymous and refer to a fixed data
value.

9. In _______________ the management of the password for the account can be handled outside
of oracle such as operating system.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication
View Answer

Answer: b
Explanation: Database management involves the monitoring, administration, and maintenance
of the databases and database groups in your enterprise.

10. In ________________ of Oracle, the database administrator creates a user account in the
database for each user who needs access.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication
View Answer

Answer: a
Explanation: Database management involves the monitoring, administration, and maintenance
of the databases and database groups in your enterprise.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Materialized Views
» Next - Database Questions and Answers – Transaction Concept
Categories Database MCQsPost navigation
Database Questions and Answers – Materialized Views
Database Questions and Answers – Transaction Concept
advertisement
advertisement

Recommended Posts:

1. Electrical Engineering Questions and Answers


2. SAN – Storage Area Networks Questions & Answers
3. Embedded System Questions and Answers
4. Computer Fundamentals Questions and Answers
5. C# Programming Examples on Networking
6. RDBMS Questions and Answers
7. Home
8. Advanced Machining Processes Questions and Answers
9. Programming Questions and Answers
10. Computer Science Questions and Answers
11. Operating System Questions and Answers
12. SQL Server Questions and Answers
13. MongoDB Questions and Answers
14. Master of Computer Applications Questions and Answers
15. Bachelor of Computer Applications Questions and Answers
16. Information Science Questions and Answers
17. Information Technology Questions and Answers
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Transaction


Concept
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transaction
Concept”.

1. Consider money is transferred from (1)account-A to account-B and (2) account-B to account-
A. Which of the following form a transaction?
a) Only 1
b) Only 2
c) Both 1 and 2 individually
d) Either 1 or 2
View Answer

Answer: c
Explanation: The term transaction refers to a collection of operations that form a single logical
unit of work.
advertisement

2. A transaction is delimited by statements (or function calls) of the form __________


a) Begin transaction and end transaction
b) Start transaction and stop transaction
c) Get transaction and post transaction
d) Read transaction and write transaction
View Answer
Answer: a
Explanation: The transaction consists of all operations executed between the begin transaction
and end transaction.

3. Identify the characteristics of transactions


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: d
Explanation: Because of the above three properties, transactions are an ideal way of structuring
interaction with a database.

4. Which of the following has “all-or-none” property?


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: a
Explanation: Either all operations of the transaction are reflected properly in the database, or
none are.
advertisement

5. The database system must take special actions to ensure that transactions operate properly
without interference from concurrently executing database statements. This property is referred
to as
a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer

Answer: c
Explanation: Even though multiple transactions may execute concurrently, the system
guarantees that, for every pair of transactions Ti and Tj, it appears to Ti that either Tj finished
execution before Ti started or Tj started execution after Ti finished.

6. The property of a transaction that persists all the crashes is


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned
View Answer
Answer: b
Explanation: After a transaction completes successfully, the changes it has made to the database
persist, even if there are system failures.

7. __________ states that only valid data will be written to the database.
a) Consistency
b) Atomicity
c) Durability
d) Isolation
View Answer

Answer: a
Explanation: If for some reason, a transaction is executed that violates the database’s
consistency rules, the entire transaction will be rolled back and the database will be restored to a
state consistent with those rules.
advertisement

8. Transaction processing is associated with everything below except


a) Producing detail summary or exception reports
b) Recording a business activity
c) Confirming an action or triggering a response
d) Maintaining a data
View Answer

Answer: c
Explanation: Collections of operations that form a single logical unit of work are called
transactions.

9. The Oracle RDBMS uses the ____ statement to declare a new transaction start and its
properties.
a) BEGIN
b) SET TRANSACTION
c) BEGIN TRANSACTION
d) COMMIT
View Answer

Answer: b
Explanation: Commit is used to store all the transactions.

10. ____ means that the data used during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
a) Consistency
b) Atomicity
c) Durability
d) Isolation
View Answer

Answer: d
Explanation: Even though multiple transactions may execute concurrently, the system
guarantees that, for every pair of transactions Ti and Tj, it appears to Ti that either Tj finished
execution before Ti started or Tj started execution after Ti finished.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Advanced Query Optimization
» Next - Database Questions & Answers – A Simple Transaction Model
Categories Database MCQsPost navigation
Database Questions and Answers – Advanced Query Optimization
Database Questions & Answers – A Simple Transaction Model
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Bitwise Operations


2. Master of Computer Applications Questions and Answers
3. Recruitment Support Service – Employers
4. Javascript Questions and Answers
5. C Programming Examples
6. Bachelor of Computer Applications Questions and Answers
7. C# Programming Examples on Functions
8. Simple C Programs
9. C# Programming Examples on Interfaces
10. C# Basic Programming Examples
11. C# Programming Examples
12. MongoDB Questions and Answers
13. Spring Questions and Answers
14. SQL Server Questions and Answers
15. MySQL Database Questions and Answers
16. Oracle Database Questions and Answers
17. RDBMS Questions and Answers
18. Database Questions and Answers – Failure Classification
19. Database Questions and Answers – Deadlocks
20. Database Questions and Answers – Snapshot Isolation
advertisement

Database Questions & Answers – A Simple


Transaction Model
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “A Simple
Transaction Model”.

1. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and
GRANT statements in a single transaction?
a) CREATE PACKAGE
b) CREATE SCHEMA
c) CREATE CLUSTER
d) All of the mentioned
View Answer

Answer: b
Explanation: A database schema of a database system is its structure described in a formal
language supported by the database management system and refers to the organization of data as
a blueprint of how a database is constructed.
advertisement

2. In SQL, the CREATE TABLESPACE is used


a) To create a place in the database for storage of scheme objects, rollback segments, and
naming the data files to comprise the tablespace
b) To create a database trigger
c) To add/rename data files, to change storage
d) All of the mentioned
View Answer

Answer: a
Explanation: Triggers are used to initialize the actions for an activity.

3. Which character function can be used to return a specified portion of a character string?
a) INSTR
b) SUBSTRING
c) SUBSTR
d) POS
View Answer

Answer: c
Explanation: SUBSTR are used to match the particular characters in a string.

4. Which of the following is TRUE for the System Variable $date$?


a) Can be assigned to a global variable
b) Can be assigned to any field only during design time
c) Can be assigned to any variable or field during run time
d) Can be assigned to a local variable
View Answer

Answer: b
Explanation: A database schema of a database system is its structure described in a formal
language supported by the database management system and refers to the organization of data as
a blueprint of how a database is constructed.
advertisement

5. What are the different events in Triggers?


a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) Select, Commit
View Answer

Answer: c
Explanation: A database trigger is a procedural code that is automatically executed in response
to certain events on a particular table or view in a database.

6. Which is the subset of SQL commands used to manipulate Oracle Database Structures,
including tables?
a) Data Definition Language
b) Data Manipulation Language
c) Data Described Language
d) Data Retrieval Language
View Answer

Answer: a
Explanation: DDL are used to define schema and table characters.

7. The SQL statement SELECT SUBSTR(‘123456789’, INSTR(‘abcabcabc’,’b’), 4) FROM


EMP; prints
a) 6789
b) 2345
c) 1234
d) 456789
View Answer

Answer: b
Explanation: SUBSTR are used to match the particular characters in a string.
advertisement

8. Which of the following SQL command can be used to modify existing data in a database
table?
a) MODIFY
b) UPDATE
c) CHANGE
d) NEW
View Answer

Answer: b
Explanation: Syntax : UPDATE table_name
SET column1=value1,column2=value2,…
WHERE some_column=some_value; .
9. When SQL statements are embedded inside 3GL, we call such a program as
a) Nested query
b) Nested programming
c) Distinct query
d) Embedded SQL
View Answer

Answer: d
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.

10. _______________ provides option for entering SQL queries as execution time, rather than at
the development stage.
a) PL/SQL
b) SQL*Plus
c) SQL
d) Dynamic SQL
View Answer

Answer: d
Explanation: Dynamic SQL enables you to write programs that reference SQL statements whose
full text is not known until runtime.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Transaction Concept
» Next - Database Questions and Answers – Storage Structure
Categories Database MCQsPost navigation
Database Questions and Answers – Transaction Concept
Database Questions and Answers – Storage Structure
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Linked List


2. C Programming Examples on Data-Structures
3. Java Programming Examples on Collections
4. Java Programming Examples on Classes
5. Aircraft Maintenance Questions and Answers
6. Compilers Questions and Answers
7. C# Programming Examples on Functions
8. Master of Computer Applications Questions and Answers
9. C# Programming Examples on Delegates
10. MongoDB Questions and Answers
11. C Questions and Answers
12. C Programming Examples on File Handling
13. RDBMS Questions and Answers
14. SAN – Storage Area Networks Questions & Answers
15. SQL Server Questions and Answers
16. Simple Java Programs
17. MySQL Database Questions and Answers
18. Simple C Programs
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Storage


Structure
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Storage
Structure”.

1. The storage structure which do not survive system crashes are ______
a) Volatile storage
b) Non-volatile storage
c) Stable storage
d) Dynamic storage
View Answer

Answer: a
Explanation: Volatile storage, is a computer memory that requires power to maintain the stored
information, in other words it needs power to reach the computer memory.
advertisement

2. Storage devices like tertiary storage, magnetic disk comes under


a) Volatile storage
b) Non-volatile storage
c) Stable storage
d) Dynamic storage
View Answer

Answer: b
Explanation: Information residing in nonvolatile storage survives system crashes.

3. For a transaction to be durable, its changes need to be written to ________ storage.


a) Volatile storage
b) Non-volatile storage
c) Stable storage
d) Dynamic storage
View Answer

Answer: c
Explanation: Similarly, for a transaction to be atomic, log records need to be written to stable
storage before any changes are made to the database on disk.

4. The unit of storage that can store one are more records in a hash file organization are
a) Buckets
b) Disk pages
c) Blocks
d) Nodes
View Answer

Answer: a
Explanation: Buckets are used to store one or more records in a hash file organization.
advertisement

5. A ______ file system is software that enables multiple computers to share file storage while
maintaining consistent space allocation and file content.
a) Storage
b) Tertiary
c) Secondary
d) Cluster
View Answer

Answer: d
Explanation: With a cluster file system, the failure of a computer in the cluster does not make
the file system unavailable.

6. A file produced by a spreadsheet


a) is generally stored on disk in an ASCII text format
b) can be used as is by the DBMS
c) all of the mentioned
d) none of the mentioned
View Answer

Answer: a
Explanation: ASCII text format uses the standard text file for the changing the value.

7. SDL means _____________


a) Storage Discrete Language
b) Storage Definition Language
c) Storage Definition Localisation
d) Storage Discrete Localisation
View Answer

Answer: b
Explanation: It specifies internal schema and also mapping between two schemas.
advertisement

8. Which of the following are the process of selecting the data storage and data access
characteristics of the database?
a) Logical database design
b) Physical database design
c) Testing and performance tuning
d) Evaluation and selecting
View Answer

Answer: b
Explanation: Physical database design is the process of selecting the data storage and data
access characteristics of the database.

9. Which of the following is the oldest database model?


a) Relational
b) Hierarchical
c) Physical
d) Network
View Answer

Answer: d
Explanation: Network model has data stored in a hierarchical network flow.

10. The process of saving information onto secondary storage devices is referred to as
a) Backing up
b) Restoring
c) Writing
d) Reading
View Answer

Answer: c
Explanation: The information is written into the secondary storage device.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions & Answers – A Simple Transaction Model
» Next - Database Questions and Answers – Transaction Atomicity and Durability
Categories Database MCQsPost navigation
Database Questions & Answers – A Simple Transaction Model
Database Questions and Answers – Transaction Atomicity and Durability
advertisement
advertisement

Recommended Posts:

1. Home
2. C Programming Examples on File Handling
3. Computer Networks Questions and Answers
4. Computer Fundamentals Questions and Answers
5. SQL Server Questions and Answers
6. MongoDB Questions and Answers
7. Information Technology Questions and Answers
8. Data Structure Questions and Answers
9. About
10. Cyber Security Questions and Answers
11. Neural Networks Questions and Answers
12. Master of Computer Applications Questions and Answers
13. Information Science Questions and Answers
14. Operating System Questions and Answers
15. C# Programming Examples on Files
16. MySQL Database Questions and Answers
17. Oracle Database Questions and Answers
18. RDBMS Questions and Answers
19. SAN – Storage Area Networks Questions & Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Transaction


Atomicity and Durability
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transaction
Atomicity and Durability”.

1. A transaction may not always complete its execution successfully. Such a transaction is
termed
a) Aborted
b) Terminated
c) Closed
d) All of the mentioned
View Answer

Answer: a
Explanation: If we are to ensure the atomicity property, an aborted transaction must have no
effect on the state of the database.
advertisement
2. If an transaction is performed in a database and committed, the changes are taken to the
previous state of transaction by
a) Flashback
b) Rollback
c) Both Flashback and Rollback
d) Cannot be done
View Answer

Answer: d
Explanation: Once committed the changes cannot be rolled back.

3. Each modification done in database transaction are first recorded into the
a) Harddrive
b) Log
c) Disk
d) Datamart
View Answer

Answer: b
Explanation: After commit is issued the data are stored in a database and stored in drive.

4. When the transaction finishes the final statement the transaction enters into
a) Active state
b) Committed state
c) Partially committed state
d) Abort state
View Answer

Answer: c
Explanation: The commit statement has to be issued to enter into committed state.
advertisement

5. The name of the transaction file shall be provided by the operator and the file that contains the
edited transactions ready for execution shall be called
a) Batch. Exe
b) Trans. Exe
c) Opt. Exe
d) Edit.Exe
View Answer

Answer: c
Explanation: Transactions has to be managed by the executable files.

6. Which of the following is an atomic sequence of database actions?


a) Transaction
b) Concurrency
c) Relations
d) All of the mentioned
View Answer
Answer: a
Explanation: Transaction is a collection of operations that provides single logical function in
database.

7. If the state of the database no longer reflects a real state of the world that the database is
supposed to capture, then such a state is called
a) Consistent state
b) Parallel state
c) Atomic state
d) Inconsistent state
View Answer

Answer: d
Explanation: If the state of the database no longer reflects a real state of the world that the
database is supposed to capture, then such a state is called in a consistent state.
advertisement

8. _______ means that data used during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
a) Serializability
b) Atomicity
c) Isolation
d) Time stamping
View Answer

Answer: c
Explanation: Isolation means that data used during the execution of a transaction can’t be used
by a second transaction until the first one is completed.

9. DBMS periodically suspends all processing and synchronizes its files and journals through
the use of
a) Checkpoint facility
b) Backup facility
c) Recovery manager
d) Database change log
View Answer

Answer: a
Explanation: DBMS periodically suspends all processing and synchronizes its files and journals
though the use of Check point facility.

10. Which of the following is not a state in transaction?


a) Active
b) Terminated
c) Aborted
d) Partially committed
View Answer

Answer: b
Explanation: The transaction states are abort, active, committed, partially committed, Failed.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Storage Structure
» Next - Database Questions and Answers – Querying database part 3
Categories Database MCQsPost navigation
Database Questions and Answers – Storage Structure
Database Questions and Answers – Querying database part 3
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Event Handling


2. C# Basic Programming Examples
3. Simple C Programs
4. Java Programming Examples on Data-Structures
5. Java Programming Examples on Utility Classes
6. Spring Questions and Answers
7. Java Programming Examples on Collections
8. RDBMS Questions and Answers
9. C# Programming Examples on Data Structures
10. Python Programming Examples on Linked Lists
11. C Programming Examples on Linked List
12. C# Programming Examples on Threads
13. C Programming Examples on Data-Structures
14. SQL Server Questions and Answers
15. C Programming Examples on Stacks & Queues
16. Python Programming Examples on Stacks & Queues
17. Home
18. MySQL Database Questions and Answers
19. Database Management System Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Querying


database part 3
« Prev
Next »
This set of Database Interview Questions and Answers for freshers focuses on ” Querying
database part – 3″.

1. _______________ joins are SQL server default


a) Outer
b) Inner
c) Equi
d) None of the Mentioned
View Answer

Answer: b
Explanation: Inner query joins only the rows that are matching.
advertisement

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


a) Like Predicate
b) Null Predicate
c) In Predicate
d) Out Predicate
View Answer

Answer: a
Explanation: Like matches the pattern with the query.

3. Which of the following is/are the Database server functions?


i) Data management
ii) Transaction management
iii) Compile queries
iv) Query optimization
a) i, ii, and iv only
b) i, ii and iii only
c) ii, iii and iv only
d) All i, ii, iii, and iv
View Answer

Answer: a
Explanation: All these are functions of the database.

4. To delete a database ___________ command is used


a) Delete database database_name
b) Delete database_name
c) drop database database_name
d) drop database_name
View Answer

Answer: c
Explanation: This will delete the database with its structure.
advertisement
5. ____________ is a combination of two of more attributes used as a primary key
a) Composite Key
b) Alternate Key
c) Candidate Key
d) Foreign Key
View Answer

Answer: a
Explanation: Primary keys together form the composite key.

6. Which of the following is not the function of client?


a) Compile queries
b) Query optimization
c) Receive queries
d) Result formatting and presentation
View Answer

Answer: b
Explanation: Query optimization is used to improve quality.

7. ____________ is a special type of stored procedure that is automatically invoked whenever


the data in the table is modified.
a) Procedure
b) Trigger
c) Curser
d) None of the Mentioned
View Answer

Answer: b
Explanation: Triggers are used to initiate an action to take place.
advertisement

8. ______________ requires that data should be made available to only authorized users.
a) Data integrity
b) Privacy
c) Security
d) None of the Mentioned
View Answer

Answer: c
Explanation: Some algorithms may be used for the security.

9. Some of the utilities of DBMS are _____________


i) Loading ii) Backup iii) File organization iv) Process Organization
a) i, ii, and iv only
b) i, ii and iii only
c) ii, iii and iv only
d) All i, ii, iii, and iv
View Answer
Answer: b
Explanation: Processing is not the a utility in dbms.

10. ____________ allows individual row operation to be performed on a given result set or on
the generated by a selected by a selected statement.
a) Procedure
b) Trigger
c) Curser
d) None of the Mentioned
View Answer

Answer: c
Explanation: Triggers are used to initiate an action to take place.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Interviews, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Transaction Atomicity and Durability
» Next - Database Questions and Answers – Querying Database – 4
Categories Database MCQsPost navigation
Database Questions and Answers – Transaction Atomicity and Durability
Database Questions and Answers – Querying Database – 4
advertisement
advertisement

Recommended Posts:

1. Energy & Environment Management Questions and Answers


2. Python Programming Examples on Stacks & Queues
3. Programming Questions and Answers
4. JUnit Questions and Answers
5. C# Programming Examples on Events
6. Privacy Policy
7. Object Oriented Programming Questions and Answers
8. Computer Science Questions and Answers
9. Information Science Questions and Answers
10. SAN – Storage Area Networks Questions & Answers
11. Information Technology Questions and Answers
12. Master of Computer Applications Questions and Answers
13. Home
14. Bachelor of Computer Applications Questions and Answers
15. MongoDB Questions and Answers
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Querying


Database – 4
« Prev
Next »

This set of Database Questions and Answers for Experienced people focuses on ” Querying
database part – 4″.

1. Which s essential a business problem not a data problem:


a) Data
b) Database
c) Database design
d) All of the mentioned
View Answer

Answer: c
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
advertisement

2. Which is primarily the result of a thorough understanding of information about an enterprise:


a) Data
b) Database
c) Database design
d) Data modeling
View Answer

Answer: d
Explanation: Data modelling designs the data in a secured manner.

3. McFadden has defined normalization in his which book___________


a) Database modern management
b) Management database of modern
c) Modern database management
d) Database management
View Answer

Answer: c
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.

4. The database design prevents some data from being represented due to _______
a) Deletion anomalies
b) Insertion anomalies
c) Update anomaly
d) None of the mentioned
View Answer

Answer: b
Explanation: Insertion anomaly is due to confusion in data deletion or insertion.
advertisement

5. How many types of insertion anomalies:


a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: Insertion anomaly is due to confusion in data deletion or insertion.

6. Who developed the normalization process:


a) E.F. codd
b) F.F. codd
c) E.E. codd
d) None of the mentioned
View Answer

Answer: a
Explanation: Normalization helps in improving the quality of the data.

7. E.F.Codd developed the normalization process in the which early:


a) 1969
b) 1970
c) 1971
d) 1972
View Answer

Answer: b
Explanation: Normalization helps in improving the quality of the data.
advertisement

8. Which is a bottom-up approach to database design that design by examining the relationship
between attributes:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
View Answer

Answer: c
Explanation: Normalization helps in improving the quality of the data.
9. Which is the process of breaking a relation into multiple relations:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
View Answer

Answer: d
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.

10. Which formal method that locates and analyses relation schemas on the basis of their
primary, candidate keys, and the FD’s that are present among the attributes of these schemas:
a) Functional dependency
b) Database modeling
c) Normalization
d) Decomposition
View Answer

Answer: c
Explanation: Normalization helps in improving the quality of the data.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Experienced people, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Querying database part 3
» Next - Database Questions and Answers – Querying database part 5
Categories Database MCQsPost navigation
Database Questions and Answers – Querying database part 3
Database Questions and Answers – Querying database part 5
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Linked List


2. Java Programming Examples on Collections
3. Concrete Technology Questions and Answers
4. Bachelor of Computer Applications Questions and Answers
5. SQL Server Questions and Answers
6. Information Technology Questions and Answers
7. Computer Science Questions and Answers
8. Information Science Questions and Answers
9. Hazardous Waste Management Questions and Answers
10. Software Architecture & Design Questions and Answers
11. Master of Computer Applications Questions and Answers
12. Software Engineering Questions & Answers
13. MongoDB Questions and Answers
14. Python Programming Examples on Linked Lists
15. C Programming Examples on Trees
16. Python Programming Examples on Trees
17. MySQL Database Questions and Answers
18. Statistical Quality Control Questions and Answers
19. Oracle Database Questions and Answers
20. Database Questions and Answers – Ordered Indexing and Hashing
advertisement

Database Questions and Answers – Querying


database part 5
« Prev
Next »

This set of Database Interview Questions and Answers for Experienced people focuses on ”
Querying database part – 5″.

1. Which is refers to a stalemate situation due to which no further progress is possible as


computer await response of each other:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer

Answer: b
Explanation: Deadlock will stop further processing.
advertisement

2. Which is a duplicate copy of a file program that is stored on a different storage media than the
original location:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer

Answer: c
Explanation: Backup is required to take all the data.

3. Which is the duplication of computer operations and routine backups to combat any
unforeseen problems:
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer

Answer: d
Explanation: Recovery means to take the backup data while there is a crash.

4. Optimization that is basically related to the rewriter module is termed as__________


a) Semantic query optimization
b) Global query optimization
c) All of the Mentioned
d) None of the Mentioned
View Answer

Answer: a
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
advertisement

5. Optimization basically related to the Rewrite module is termed as_______


a) Semantic query optimization
b) Global query optimization
c) All of the Mentioned
d) None of the Mentioned
View Answer

Answer: a
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.

6. Database security helps organizations to protect data from _____


a) Internal users
b) External users
c) Non-external users
d) Non internal users
View Answer

Answer: b
Explanation: External users are the people who do not involve in the processing of the database.

7. Copying files to secondary or specific devices is known as ______


a) Retrieve
b) Backup
c) Recovery
d) Deadlock
View Answer

Answer: b
Explanation: Backup is required to take all the data.
advertisement
8. How many types of recovery control techniques:
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: a
Explanation: Recovery means to take the backup data while there is a crash.

9. Which are types of recovery control techniques:


a) Deferred update
b) Immediate update
c) All of the Mentioned
d) None of the Mentioned
View Answer

Answer: c
Explanation: Recovery means to take the backup data while there is a crash.

10. Which server can join the indexes when only multiple indexes combined can cover the
query:
a) SQL
b) DBMS
c) RDBMS
d) All of the mentioned
View Answer

Answer: a
Explanation: Indexing reduces the difficulty in searching the data.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database for Interviews, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Querying Database – 4
» Next - Database Questions and Answers – Implementation of Isolation Levels
Categories Database MCQsPost navigation
Database Questions and Answers – Querying Database – 4
Database Questions and Answers – Implementation of Isolation Levels
advertisement
advertisement

Recommended Posts:
1. Terms of Service
2. C Programming Examples
3. Java Programming Examples on Multithreading
4. Java Programming Examples
5. Java Programming Examples on Utility Classes
6. C Programming Examples on Linked List
7. Python Programming Examples on Linked Lists
8. SAN – Storage Area Networks Questions & Answers
9. Home
10. Operating System Questions and Answers
11. Python Programming Examples on Stacks & Queues
12. C# Programming Examples on LINQ
13. Compilers Questions and Answers
14. C Programming Examples on Stacks & Queues
15. MongoDB Questions and Answers
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Questions and Answers – Implementation of Isolation Levels
advertisement

Database Questions and Answers –


Implementation of Isolation Levels
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on
“Implementation of Isolation Levels”.

1. In concurrency control policy the lock is obtained on


a) Entire database
b) A particular transaction alone
c) All the new elements
d) All of the mentioned
View Answer

Answer: a
Explanation: It is to avoid deadlock.
advertisement

2. A concurrency-control policy such as this one leads to ______ performance since it forces
transactions to wait for preceding transactions to finish before they can start.
a) Good
b) Average
c) Poor
d) Unstable
View Answer

Answer: c
Explanation: It provides a poor degree of concurrency.

3. __________ are used to ensure that transactions access each data item in order of the
transactions’ ____ if their accesses conflict.
a) Zone
b) Relay
c) Line
d) Timestamps
View Answer

Answer: d
Explanation: When this is not possible, offending transactions are aborted and restarted with a
new timestamp.

4. EMPDET is an external table containing the columns EMPNO and ENAME. Which
command would work in relation to the EMPDET table?
a)
UPDATE empdet
SET ename = 'Amit'
WHERE empno = 1234;

b)
advertisement
DELETE FROM empdet
WHERE ename LIKE 'J%';

c)
CREATE VIEW empvu
AS
SELECT * FROM empdept;

d)
advertisement
CREATE INDEX
empdet_idx
ON empdet(empno);
View Answer
Answer: c
Explanation: View is the temporary space created for the database.

5. In which scenario would you use the ROLLUP operator for expression or columns within a
GROUP BY clause?
a) To find the groups forming the subtotal in a row
b) To create group-wise grand totals for the groups specified within a GROUP BY clause
c) To create a grouping for expressions or columns specified within a GROUP BY clause in one
direction, from right to left for calculating the subtotals
d) To create a grouping for expressions or columns specified within a GROUP BY clause in all
possible directions, which is cross-tabular report for calculating the subtotals
View Answer

Answer: c
Explanation: View is the temporary space created for the database.

6.

Name Null? Type


Cust_id Not null Number(2)
Cust_Name Varchar2(15)

Evaluate the following SQL statements executed in the given order:


ALTER TABLE cust
ADD CONSTRAINT cust_id_pk PRIMARY KEY(cust_id) DEFERRABLE INITIALLY DEFERRED; INSERT
INTO cust VALUES (1,'RAJ'); --row 1
INSERT INTO cust VALUES (1,'SAM'); --row 2
COMMIT;
SET CONSTRAINT cust_id_pk IMMEDIATE;
INSERT INTO cust VALUES (1,'LATA'); --row 3
INSERT INTO cust VALUES (2,'KING'); --row 4
COMMIT;

Which rows would be made permanent in the CUST table?


a) row 4 only
b) rows 2 and 4
c) rows 3 and 4
d) rows 1 and 4
View Answer

Answer: c
Explanation: View is the temporary space created for the database.
advertisement

7. Which statement is true regarding external tables?


a) The default REJECT LIMIT for external tables is UNLIMITED
b) The data and metadata for an external table are stored outside the database
c) ORACLE_LOADER and ORACLE_DATAPUMP have exactly the same functionality when
used with an external table
d) The CREATE TABLE AS SELECT statement can be used to unload data into regular table in
the database from an external table
View Answer

Answer: d
Explanation: This will replicate the table as in the select statement.

8. A non-correlated subquery can be defined as ______


a) A set of sequential queries, all of which must always return a single value
b) A set of sequential queries, all of which must return values from the same table
c) A SELECT statement that can be embedded in a clause of another SELECT statement only
d) A set of one or more sequential queries in which generally the result of the inner query is
used as the search value in the outer query
View Answer

Answer: d
Explanation: This will replicate the table as in the select statement.

9. Evaluate the following SQL statements in the given order:


DROP TABLE dept;
CREATE TABLE dept
(deptno NUMBER(3) PRIMARY KEY,
deptname VARCHAR2(10));
DROP TABLE dept;
FLASHBACK TABLE dept TO BEFORE DROP;

Which statement is true regarding the above FLASHBACK operation?


a) It recovers only the first DEPT table
b) It recovers only the second DEPT table
c) It does not recover any of the tables because FLASHBACK is not possible in this case
d) It recovers both the tables but the names would be changed to the ones assigned in the
RECYCLEBIN
View Answer

Answer: b
Explanation: This will replicate the table as in the select statement.

10.
CREATE TABLE digits
(id NUMBER(2),
description VARCHAR2(15));
INSERT INTO digits VALUES (1,'ONE');
UPDATE digits SET description ='TWO' WHERE id=1;
INSERT INTO digits VALUES (2,'TWO');
COMMIT;
DELETE FROM digits;
SELECT description FROM digits
VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE;

What would be the outcome of the above query?


a) It would not display any values
b) It would display the value TWO once
c) It would display the value TWO twice
d) It would display the values ONE, TWO, and TWO
View Answer

Answer: c
Explanation: This will replicate the table as in the select statement.

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Querying database part 5
» Next - Database Questions and Answers – Transactions as SQL Statements
Categories Database MCQsPost navigation
Database Questions and Answers – Querying database part 5
Database Questions and Answers – Transactions as SQL Statements
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Linked List


2. Java Programming Examples on Arrays
3. C# Programming Examples on Strings
4. C# Programming Examples on Events
5. C Programming Examples on Strings
6. Java Programming Examples on Event Handling
7. Java Programming Examples on Classes
8. C# Programming Examples on Threads
9. RDBMS Questions and Answers
10. C# Programming Examples on Conversions
11. Java Programming Examples on Collections
12. Java Programming Examples on Utility Classes
13. C# Programming Examples on Functions
14. Simple C Programs
15. Simple Java Programs
16. C# Basic Programming Examples
17. C# Programming Examples on LINQ
18. Database Management System Questions and Answers
19. Oracle Database Questions and Answers
20. MySQL Database Questions and Answers
advertisement

Database Questions and Answers – Transactions as


SQL Statements
« Prev
Next »

This set of Basic Database Questions and Answers focuses on “Transactions as SQL
Statements”.
1. Which of the following is not a property of transactions?
a) Atomicity
b) Concurrency
c) Isolation
d) Durability
View Answer

Answer: d
Explanation: ACID properties are the properties of transactions.
advertisement

2. SNAPSHOT is used for (DBA)


a) Synonym
b) Tablespace
c) System server
d) Dynamic data replication
View Answer

Answer: d
Explanation: Snapshot gets the instance of the database at that time.

3. Isolation of the transactions is ensured by


a) Transaction management
b) Application programmer
c) Concurrency control
d) Recovery management
View Answer

Answer: c
Explanation: ACID properties are the properties of transactions.

4. Constraint checking can be disabled in existing _______________ and _____________


constraints so that any data you modify or add to the table is not checked against the constraint.
a) CHECK, FOREIGN KEY
b) DELETE, FOREIGN KEY
c) CHECK, PRIMARY KEY
d) PRIMARY KEY, FOREIGN KEY
View Answer

Answer: a
Explanation: Check and foreign constraints are used to constraint the table data.
advertisement

5. Problems occurs if we don’t implement a proper locking strategy


a) Dirty reads
b) Phantom reads
c) Lost updates
d) Unrepeatable reads
View Answer
Answer: d
Explanation: In a concurrent execution of these transactions, it is intuitively clear that they
conflict, but this is a conflict not captured by our simple model. This situation is referred to as
the phantom phenomenon, because a conflict may exist on “phantom” data.

6. Which of the following fixed database roles can add or remove user IDs?
a) db_accessadmin
b) db_securityadmin
c) db_setupadmin
d) db_sysadmin
View Answer

Answer: a
Explanation: The database can be accessed by assigning the roles.

7. By default sql server has ___________ isolation level


a) READ COMMITTED
b) READ UNCOMMITTED
c) SERIALIZABLE
d) REPEATABLE READ
View Answer

Answer: a
Explanation: Read committed is used to commit the default read operation.
advertisement

8. Which of the following statements is/are not true for SQL profiler?
a) Enables you to monitor events
b) Check if rows are being inserted properly
c) Check the performance of a stored procedure
d) ALL of the mentioned
View Answer

Answer: c
Explanation: Read committed is used to commit the default read operation.

9. Which of the following is the original purpose of SQL?


a) To specify the syntax and semantics of SQL data definition language
b) To specify the syntax and semantics of SQL manipulation language
c) To define the data structures
d) All of the mentioned
View Answer

Answer: d
Explanation: Read committed is used to commit the default read operation.

10. SQL can be used to:


a) Create database structures only
b) Query database data only
c) Modify database data only
d) All of the mentioned
View Answer

Answer: d
Explanation: In a concurrent execution of these transactions, it is intuitively clear that they
conflict, but this is a conflict not captured by our simple model. This situation is referred to as
the phantom phenomenon, because a conflict may exist on “phantom” data.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice basic questions and answers on all areas of Database, here is complete set on 1000+
Multiple Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Implementation of Isolation Levels
» Next - Database Questions and Answers – Lock-Based Protocols
Categories Database MCQsPost navigation
Database Questions and Answers – Implementation of Isolation Levels
Database Questions and Answers – Lock-Based Protocols
advertisement
advertisement

Recommended Posts:

1. Operating System Questions and Answers


2. Computer Science Questions and Answers
3. SAN – Storage Area Networks Questions & Answers
4. Java Programming Examples on Inheritance
5. Information Science Questions and Answers
6. Information Technology Questions and Answers
7. C# Basic Programming Examples
8. Java Programming Examples on Java.Lang
9. Master of Computer Applications Questions and Answers
10. Spring Questions and Answers
11. Java Programming Examples on Utility Classes
12. Bachelor of Computer Applications Questions and Answers
13. RDBMS Questions and Answers
14. JUnit Questions and Answers
15. SQL Server Questions and Answers
16. C# Programming Examples on Interfaces
17. MongoDB Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement
Database Questions and Answers – Lock-Based
Protocols
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Lock-Based
Protocols”.

1. In order to maintain transactional integrity and database consistency, what technology does a
DBMS deploy?
a) Triggers
b) Pointers
c) Locks
d) Cursors
View Answer

Answer: c
Explanation: Locks are used to maintain database consistency.
advertisement

2. A lock that allows concurrent transactions to access different rows of the same table is known
as a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock
View Answer

Answer: d
Explanation: Locks are used to maintain database consistency.

3. Which of the following are introduced to reduce the overheads caused by the log-based
recovery?
a) Checkpoints
b) Indices
c) Deadlocks
d) Locks
View Answer

Answer: a
Explanation: Checkpoints are introduced to reduce overheads caused by the log-based recovery.

4. Which of the following protocols ensures conflict serializability and safety from deadlocks?
a) Two-phase locking protocol
b) Time-stamp ordering protocol
c) Graph based protocol
d) None of the mentioned
View Answer
Answer: b
Explanation: Time-stamp ordering protocol ensures conflict serializability and safety from
deadlocks.
advertisement

5. Which of the following is the block that is not permitted to be written back to the disk?
a) Dead code
b) Read only
c) Pinned
d) Zapped
View Answer

Answer: c
Explanation: A block that is not permitted to be written back to the disk is called pinned.

6. If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has an -
__________ on all the records belonging to that file.
a) Explicit lock in exclusive mode
b) Implicit lock in shared mode
c) Explicit lock in shared mode
d) Implicit lock in exclusive mode
View Answer

Answer: d
Explanation: If transaction Ti gets an explicit lock on the file Fc in exclusive mode, then it has
an implicit lock in exclusive mode on all the records belonging to that file.

7. Which refers to a property of computer to run several operation simultaneously and possible
as computers await response of each other
a) Concurrency
b) Deadlock
c) Backup
d) Recovery
View Answer

Answer: a
Explanation: Concurrency is a property of systems in which several computations are executing
simultaneously, and potentially interacting with each other.
advertisement

8. All lock information is managed by a __________ which is responsible for assigning and
policing the locks used by the transactions.
a) Scheduler
b) DBMS
c) Lock manager
d) Locking agent
View Answer
Answer: c
Explanation: A distributed lock manager (DLM) provides distributed software applications with
a means to synchronize their accesses to shared resources.

9. The ____ lock allows concurrent transactions to access the same row as long as they require
the use of different fields within that row.
a) Table-level
b) Page-level
c) Row-level
d) Field-level
View Answer

Answer: d
Explanation: Lock is limited to the attributes of the relation.

10. Which of the following is a procedure for acquiring the necessary locks for a transaction
where all necessary locks are acquired before any are released?
a) Record controller
b) Exclusive lock
c) Authorization rule
d) Two phase lock
View Answer

Answer: d
Explanation: Two-phase lock is a procedure for acquiring the necessary locks for a transaction
where all necessary locks are acquired before any are released.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Transactions as SQL Statements
» Next - Database Questions and Answers – Deadlocks
Categories Database MCQsPost navigation
Database Questions and Answers – Transactions as SQL Statements
Database Questions and Answers – Deadlocks
advertisement
advertisement

Recommended Posts:

1. Simple C Programs
2. Java Programming Examples on Utility Classes
3. C# Programming Examples
4. Unix Questions and Answers
5. C# Programming Examples on LINQ
6. Spring Questions and Answers
7. C# Programming Examples on Files
8. Java Programming Examples on File Handling
9. C Programming Examples on File Handling
10. C# Programming Examples on Threads
11. 100+ Java Android Programming Examples
12. Java Programming Examples on Multithreading
13. C# Programming Examples on Interfaces
14. C# Basic Programming Examples
15. Operating System Questions and Answers
16. SQL Server Questions and Answers
17. Oracle Database Questions and Answers
18. MySQL Database Questions and Answers
19. RDBMS Questions and Answers
20. Database Questions and Answers – Recovery
advertisement

Database Questions and Answers – Deadlocks


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Deadlocks”.

1. A system is in a ______ state if there exists a set of transactions such that every transaction in
the set is waiting for another transaction in the set.
a) Idle
b) Waiting
c) Deadlock
d) Ready
View Answer

Answer: c
Explanation: When one data item is waiting for another data item in a transaction then system is
in deadlock.
advertisement

2. The deadlock state can be changed back to stable state by using _____________ statement.
a) Commit
b) Rollback
c) Savepoint
d) Deadlock
View Answer

Answer: b
Explanation: Rollback is used to rollback to the point before lock is obtained.
3. What are the ways of dealing with deadlock?
a) Deadlock prevention
b) Deadlock recovery
c) Deadlock detection
d) All of the mentioned
View Answer

Answer: d
Explanation: Deadlock prevention is also called as deadlock recovery. Prevention is commonly
used if the probability that the system would enter a deadlock state is relatively high; otherwise,
detection and recovery are more efficient.

4. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it
has a timestamp smaller than that of Tj (that is, Ti is older than Tj). Otherwise, Ti is rolled back
(dies). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
d) Wait
View Answer

Answer: a
Explanation: The wait–die scheme is a non-preemptive technique.
advertisement

5. When transaction Ti requests a data item currently held by Tj, Ti is allowed to wait only if it
has a timestamp larger than that of Tj (that is, Ti is younger than Tj ). Otherwise, Tj is rolled
back (Tj is wounded by Ti). This is
a) Wait-die
b) Wait-wound
c) Wound-wait
d) Wait
View Answer

Answer: c
Explanation: The wound–wait scheme is a preemptive technique. It is a counterpart to the wait–
die scheme.

6. The situation where the lock waits only for a specified amount of time for another lock to be
released is
a) Lock timeout
b) Wait-wound
c) Timeout
d) Wait
View Answer

Answer: a
Explanation: The timeout scheme is particularly easy to implement, and works well if
transactions are short and if longwaits are likely to be due to deadlocks.
7. The deadlock in a set of a transaction can be determined by
a) Read-only graph
b) Wait graph
c) Wait-for graph
d) All of the mentioned
View Answer

Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.
advertisement

8. A deadlock exists in the system if and only if the wait-for graph contains a ___________
a) Cycle
b) Direction
c) Bi-direction
d) Rotation
View Answer

Answer: a
Explanation: Each transaction involved in the cycle is said to be deadlocked.

9. Selecting the victim to be rollbacked to the previous state is determined by the minimum cost.
The factors determining cost of rollback is
a) How long the transaction has computed, and how much longer the transaction will compute
before it completes its designated task
b) How many data items the transaction has used
c) How many more data items the transaction needs for it to complete
d) All of the mentioned
View Answer

Answer: d
Explanation: We should roll back those transactions that will incur the minimum cost.

10. __________ rollback requires the system to maintain additional information about the state
of all the running transactions.
a) Total
b) Partial
c) Time
d) Commit
View Answer

Answer: b
Explanation: In total rollback abort the transaction and then restart it.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Lock-Based Protocols
» Next - Database Questions and Answers – Multiple Granularity
Categories Database MCQsPost navigation
Database Questions and Answers – Lock-Based Protocols
Database Questions and Answers – Multiple Granularity
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Utility Classes


2. Data Structure Questions and Answers
3. C++ Programming Examples on Graph Problems & Algorithms
4. C++ Algorithms, Problems & Programming Examples
5. C++ Programming Examples on Hard Graph Problems & Algorithms
6. Java Programming Examples on Hard Graph Problems & Algorithms
7. C Programming Examples on Hard Graph Problems & Algorithms
8. VHDL Questions and Answers
9. C# Programming Examples on Interfaces
10. C# Programming Examples on Threads
11. C Algorithms, Problems & Programming Examples
12. Python Programming Examples on Graphs
13. Operating System Questions and Answers
14. Spring Questions and Answers
15. SQL Server Questions and Answers
16. Java Programming Examples on Multithreading
17. MySQL Database Questions and Answers
18. RDBMS Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Multiple


Granularity
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Multiple
Granularity”.

1. In a granularity hierarchy the highest level represents the


a) Entire database
b) Area
c) File
d) Record
View Answer

Answer: a
Explanation: This level is the root of the tree.
advertisement

2. In a database the file is contained in ________


a) Entire database
b) Two area
c) One area
d) more than one area
View Answer

Answer: c
Explanation: This level is below the root of the tree.

3. If a node is locked in an intention mode, explicit locking is done at a lower level of the tree.
This is called
a) Intention lock modes
b) Explicit lock
c) Implicit lock
d) Exclusive lock
View Answer

Answer: a
Explanation: There is an intention mode associated with shared mode, and there is one with an
exclusive mode.

4. If a node is locked in __________ explicit locking is being done at a lower level of the tree,
but with only shared-mode locks.
a) Intention lock modes
b) Intention-shared-exclusive mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer

Answer: a
Explanation: There is an intention mode associated with shared mode, and there is one with an
exclusive mode.
advertisement

5. If a node is locked in ____________ then explicit locking is being done at a lower level, with
exclusive-mode or shared-mode locks.
a) Intention lock modes
b) Intention-shared-exclusive mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer
Answer: c
Explanation: There is an intention mode associated with shared mode, and there is one with an
exclusive mode.

6. If a node is locked in ______________ the subtree rooted by that node is locked explicitly in
shared mode, and that explicit locking is being done at a lower level with exclusive-mode locks.
a) Intention lock modes
b) shared and intention-exclusive (SIX) mode
c) Intention-exclusive (IX) mode
d) Intention-shared (IS) mode
View Answer

Answer: b
Explanation: There is an intention mode associated with shared mode, and there is one with an
exclusive mode.

7. ____________ denotes the largest timestamp of any transaction that executed write(Q)
successfully.
a) W-timestamp(Q)
b) R-timestamp(Q)
c) RW-timestamp(Q)
d) WR-timestamp(Q)
View Answer

Answer: a
Explanation: The most common method for doing ordering transaction is to use a timestamp-
ordering scheme.
advertisement

8. The _____________ ensures that any conflicting read and write operations are executed in
timestamp order.
a) Timestamp-ordering protocol
b) Timestamp protocol
c) W-timestamp
d) R-timestamp
View Answer

Answer: a
Explanation: The most common method for doing ordering transaction is to use a timestamp-
ordering scheme.

9. The __________ requires that each transaction Ti executes in two or three different phases in
its lifetime, depending on whether it is a read-only or an update transaction.
a) Validation protocol
b) Validation-based protocol
c) Timestamp protocol
d) Timestamp-ordering protocol
View Answer
Answer: a
Explanation: A concurrency-control scheme imposes the overhead of code execution and
possible delay of transactions. It may be better to use an alternative scheme that imposes less
overhead.

10. This validation scheme is called the _________ scheme since transactions execute
optimistically, assuming they will be able to finish execution and validate at the end.
a) Validation protocol
b) Validation-based protocol
c) Timestamp protocol
d) Optimistic concurrency-control
View Answer

Answer: a
Explanation: A concurrency-control scheme imposes the overhead of code execution and
possible delay of transactions. It may be better to use an alternative scheme that imposes less
overhead.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Deadlocks
» Next - Database Questions and Answers – Multiversion Schemes
Categories Database MCQsPost navigation
Database Questions and Answers – Deadlocks
Database Questions and Answers – Multiversion Schemes
advertisement
advertisement

Recommended Posts:

1. MongoDB Questions and Answers


2. C Programming Examples using Recursion
3. SQL Server Questions and Answers
4. C# Programming Examples on Threads
5. Java Programming Examples on Multithreading
6. C++ Programming Examples on Hard Graph Problems & Algorithms
7. C++ Programming Examples on Graph Problems & Algorithms
8. C Programming Examples on Combinatorial Problems & Algorithms
9. C Programming Examples on Graph Problems & Algorithms
10. C++ Programming Examples on Data-Structures
11. C Programming Examples on Linked List
12. Python Programming Examples on Graphs
13. C Programming Examples without using Recursion
14. Python Programming Examples on Linked Lists
15. C Programming Examples on Trees
16. Oracle Database Questions and Answers
17. Python Programming Examples on Trees
18. MySQL Database Questions and Answers
19. RDBMS Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Multiversion


Schemes
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Multiversion
Schemes”.

1. The most recent version of standard SQL prescribed by the American National Standards
Institute is
a) SQL 2016
b) SQL 2002
c) SQL – 4
d) SQL2
View Answer

Answer: a
Explanation: SQL-2016 is the most recent version of standard SQL prescribed by the ANSI.
advertisement

2. ANSI-standard SQL allows the use of special operators in conjunction with the WHERE
clause. A special operator used to check whether an attribute value is null is
a) BETWEEN
b) IS NULL
c) LIKE
d) IN
View Answer

Answer: b
Explanation: Exists is used to check whether an attribute value is null or not in conjunction with
the where clause.

3. A lock that prevents the use of any tables in the database from one transaction while another
transaction is being processed is called a
a) Database-level lock
b) Table-level lock
c) Page-level lock
d) Row-level lock
View Answer

Answer: a
Explanation: Data base-level lock prevents the use of any tables in the data base from one
transaction while another transaction is being processed.

4. A condition that occurs when two transactions wait for each other to unlock data is known as
a(n)
a) Shared lock
b) Exclusive lock
c) Binary lock
d) Deadlock
View Answer

Answer: d
Explanation: Deadlock occurs when two transactions wait for each other to unlock data.
advertisement

5. _______ means that data used during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
a) Serializability
b) Atomicity
c) Isolation
d) Time stamping
View Answer

Answer: c
Explanation: Isolation means that data used during the execution of a transaction can’t be used
by a second transaction until the first one is completed.

6. A unit of storage that can store one or more records in a hash file organization is denoted as
a) Buckets
b) Disk pages
c) Blocks
d) Nodes
View Answer

Answer: a
Explanation: Buckets are used to store one or more records in a hash file organization.

7. The file organization which allows us to read records that would satisfy the join condition by
using one block read is
a) Heap file organization
b) Sequential file organization
c) Clustering file organization
d) Hash files organization
View Answer
Answer: c
Explanation: Clustering file organization allows us to read records that would satisfy the join
condition by using one block read.
advertisement

8. Which of the following is not true about B+ trees?


a) B+ tree index takes the form of balanced tree
b) Performance of B+ tree degrades as the file grows
c) Look-up in B+ tree is straightforward and efficient
d) Insertion and deletion in B+ tree is complicated but efficient
View Answer

Answer: b
Explanation: The answer is evident.

9. The extent of the database resource that is included with each lock is called the level of
a) Impact
b) Granularity
c) Management
d) DBMS control
View Answer

Answer: b
Explanation: The extent of the data base resource that is included with each lock is called the
level of Granularity.

10. DBMS periodically suspends all processing and synchronizes its files and journals through
the use of
a) Checkpoint facility
b) Backup facility
c) Recovery manager
d) Database change log
View Answer

Answer: a
Explanation: DBMS periodically suspends all processing and synchronizes its files and journals
through the use of Check point facility.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Multiple Granularity
» Next - Database Questions and Answers – Snapshot Isolation
Categories Database MCQsPost navigation
Database Questions and Answers – Multiple Granularity
Database Questions and Answers – Snapshot Isolation
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Graph Problems & Algorithms


2. C Programming Examples
3. Java Programming Examples on Hard Graph Problems & Algorithms
4. Computer Science Questions and Answers
5. Java Programming Examples on Utility Classes
6. Information Technology Questions and Answers
7. Java Programming Examples on File Handling
8. Python Programming Examples on Linked Lists
9. Master of Computer Applications Questions and Answers
10. C Programming Examples on Linked List
11. Bachelor of Computer Applications Questions and Answers
12. MongoDB Questions and Answers
13. C Programming Examples on Trees
14. SQL Server Questions and Answers
15. Python Programming Examples on Trees
16. C# Programming Examples on Files
17. MySQL Database Questions and Answers
18. RDBMS Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Snapshot


Isolation
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Snapshot
Isolation”.

1. Snapshot isolation is a particular type of ______________ scheme.


a) Concurrency-control
b) Concurrency-allowance
c) Redirection
d) Repetition-allowance
View Answer

Answer: a
Explanation: It has gained wide acceptance in commercial and open-source systems, including
Oracle, PostgreSQL, and SQL Server.
advertisement

2. Snapshot isolation is used to give


a) Transaction a snapshot of the database
b) Database a snapshot of the transaction
c) Database a snapshot of committed values in the transaction
d) Transaction a snapshot of the database and Database a snapshot of committed values in the
transaction
View Answer

Answer: d
Explanation: The data values in the snapshot consist only of values written by committed
transactions.

3. Lost update problem is


a) Second update overwrites the first
b) First update overwrites the second
c) The updates are lost due to conflicting problem
d) None of the mentioned
View Answer

Answer: a
Explanation: Lost update problem has to be resolved.

4. Under first updater wins the system uses a __________ mechanism that applies only to
updates.
a) Close
b) Read
c) Locking
d) Beat
View Answer

Answer: c
Explanation: Reads are unaffected by this, since they do not obtain locks.

5. When a transaction Ti attempts to update a data item, it requests a _________ on that data
item.
a) Read lock
b) Update lock
c) Write lock
d) Chain lock
View Answer

Answer: c
Explanation: Reads are unaffected by this, since they do not obtain locks.
advertisement

6. Each of a pair of transactions has read data that is written by the other, but there is no data
written by both transactions, is referred to as
a) Read skew
b) Update skew
c) Write lock
d) None of the mentioned
View Answer

Answer: d
Explanation: Write skew is the issue addressed here.

7. An application developer can guard against certain snapshot anomalies by appending a


______ clause to the SQL select query.
a) For update
b) For read
c) For write
d) None of the mentioned
View Answer

Answer: a
Explanation: Adding the for update clause causes the system to treat data that are read as if they
had been updated for purposes of concurrency control.

8. Evaluate the CREATE TABLE statement:


CREATE TABLE products
(product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2(15));

Which statement is true regarding the PROD_ID_PK constraint?


a) It would be created only if a unique index is manually created first
b) It would be created and would use an automatically created unique index
c) It would be created and would use an automatically created no unique index
d) It would be created and remains in a disabled state because no index is specified in the
command
View Answer

Answer: b
Explanation: Syntax: create table table_name(name constraint).
advertisement

9. Evaluate the following CREATE SEQUENCE statement:


CREATE SEQUENCE seq1
START WITH 100
INCREMENT BY 10
MAXVALUE 200
CYCLE
NOCACHE;

The sequence SEQ1 has generated numbers up to the maximum limit of 200. You issue the
following SQL statement:
SELECT seq1.nextval FROM dual;
What is displayed by the SELECT statement?
a) 1
b) 10
c) 100
d) an error
View Answer

Answer: a
Explanation: Sequence is used to generate a series of values.
advertisement

10. In which scenario would you use the ROLLUP operator for expression or columns within a
GROUP BY clause?
a) To find the groups forming the subtotal in a row
b) To create group-wise grand totals for the groups specified within a GROUP BY clause
c) To create a grouping for expressions or columns specified within a GROUP BY clause in one
direction, from
right to left for calculating the subtotals
d) To create a grouping for expressions or columns specified within a GROUP BY clause in all
possible
directions, which is cross-tabular report for calculating the subtotals
View Answer

Answer: c
Explanation: Sequence is used to generate a series of values.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Multiversion Schemes
» Next - Database Questions and Answers – Insertion Deletion Predicate Reads
Categories Database MCQsPost navigation
Database Questions and Answers – Multiversion Schemes
Database Questions and Answers – Insertion Deletion Predicate Reads
advertisement
advertisement

Recommended Posts:

1. Terms of Service
2. C# Programming Examples on Files
3. C# Programming Examples on Data Structures
4. 100+ Java Android Programming Examples
5. Java Programming Examples on Classes
6. C# Basic Programming Examples
7. SQL Server Questions and Answers
8. C# Programming Examples on Functions
9. Java Programming Examples on Multithreading
10. Simple Java Programs
11. Java Programming Examples on File Handling
12. MongoDB Questions and Answers
13. C# Programming Examples on Threads
14. Java Programming Examples on Utility Classes
15. Java Programming Examples on Collections
16. C# Programming Examples on LINQ
17. RDBMS Questions and Answers
18. Oracle Database Questions and Answers
19. MySQL Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Insertion


Deletion Predicate Reads
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Insertion
Deletion Predicate Reads”.

1. Which statements are correct regarding indexes?


a) When a table is dropped, the corresponding indexes are automatically dropped
b) For each DML operation performed, the corresponding indexes are automatically updated
c) A non-deferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically
creates a unique index
d) All of the mentioned
View Answer

Answer: d
Explanation: Indexes are used to access the data efficiently.
advertisement

2. You executed the following SQL statements in the given order:


CREATE TABLE orders
(order_id NUMBER(3) PRIMARY KEY,
order_date DATE,
customer_idnumber(3));

INSERT INTO orders VALUES (100,'10-mar-2007,,222);

ALTER TABLE orders MODIFY order_date NOT NULL;

UPDATE orders SET customer_id=333;

DELETE FROM order;

The DELETE statement results in the following error:


ERROR at line 1: table or view does not exist
What would be the outcome?
a) All the statements before the DELETE statement would be rolled back
b) All the statements before the DELETE statement would be implicitly committed within the
session
c) All the statements up to the ALTER TABLE statement would be committed and the outcome
of UPDATE statement would be rolled back
d) All the statements up to the ALTER TABLE statement would be committed and the outcome
of the UPDATE statement is retained uncommitted within the session
View Answer

Answer: d
Explanation: Committing a transaction refers to making the changes to record in the database.

3. Evaluate the following statements:


CREATE TABLE digits
(id NUMBER(2),
description VARCHAR2(15));
INSERT INTO digits VALUES (1,'ONE);
UPDATE digits SET description ='TWO'WHERE id=1;
INSERT INTO digits VALUES (2 ,'TWO');
COMMIT;
DELETE FROM digits;
SELECT description FROM digits
VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE;

What would be the outcome of the above query?


a) It would not display any values
b) It would display the value TWO once
c) It would display the value TWO twice
d) It would display the values ONE, TWO, and TWO
View Answer

Answer: c
Explanation: The VERSIONS BETWEEN clause of the SELECT statement is used to create a
Flashback Version Query.
advertisement

4. A non-correlated subquery can be defined as________


a) A set of sequential queries, all of which must always return a single value
b) A set of sequential queries, all of which must return values from the same table
c) A SELECT statement that can be embedded in a clause of another SELECT statement only
d) A set of one or more sequential queries in which generally the result of the inner query is
used as the search value in the outer query
View Answer

Answer: d
Explanation: A noncorrelated subquery is subquery that is independent of the outer query and it
can executed on its own without relying on main outer query.

5. Which statement is true regarding synonyms?


a) Synonyms can be created for tables but not views
b) Synonyms are used to reference only those tables that are owned by another user
c) A public synonym and a private synonym can exist with the same name for the same table
d) The DROP SYNONYM statement removes the synonym, and the status of the table on which
the synonym has been created becomes invalid
View Answer

Answer: c
Explanation: A synonym is an alias or alternate name for a table, view, sequence, or other
schema object. They are used mainly to make it easy for users to access database objects owned
by other users.

6. SCOTT is a user in the database.


Evaluate the commands issued BY the DBA:
1 - CREATE ROLE mgr;
2 - GRANT CREATE TABLE, SELECT
ON oe. orders TO mgr;
3 - GRANT mgr, CREATE TABLE TO SCOTT;

Which statement is true regarding the execution of the above commands?


a) Statement 1 would not execute because the WITH GRANT option is missing
b) Statement 1 would not execute because the IDENTIFIED BY clause is missing
c) Statement 3 would not execute because role and system privileges cannot be granted together
in a single GRANT statement
d) Statement 2 would not execute because system privileges and object privileges cannot be
granted together in a single GRANT command
View Answer

Answer: d
Explanation: The GRANT statement is used to give privileges to a specific user or role, or to all
users, to perform actions on database objects.

7. OE and SCOTT are the users in the database. The ORDERS table is owned by OE. Evaluate
the statements issued by the DBA in the following sequence:
CREATE ROLE r1;
GRANT SELECT, INSERT ON oe. orders TO r1;
GRANT r1 TO scott;
GRANT SELECT ON oe. orders TO scott;
REVOKE SELECT ON oe.orders FROM scott;

What would be the outcome after executing the statements?


a) SCOTT would be able to query the OE.ORDERS table
b) SCOTT would not be able to query the OE.ORDERS table
c) The REVOKE statement would remove the SELECT privilege from SCOTT as well as from
the role R1
d) The REVOKE statement would give an error because the SELECT privilege has been granted
to the role R1
View Answer

Answer: a
Explanation: The REVOKE statement is used to remove privileges from a specific user or role,
or from all users, to perform actions on database objects.
advertisement
8. Given below are the SQL statements executed in a user session:
CREATE TABLE product
(pcode NUMBER(2),
pnameVARCHAR2(10));
INSERT INTO product VALUES(1, 'pen');
INSERT INTO product VALUES (2,'penci');
SAVEPOINT a;
UPDATE product SET pcode = 10 WHERE pcode = 1;
SAVEPOINT b;
DELETE FROM product WHERE pcode = 2;
COMMIT;
DELETE FROM product WHERE pcode=10;
ROLLBACK TO SAVEPOINT a;

Which statement describes the consequences?


a) No SQL statement would be rolled back
b) Both the DELETE statements would be rolled back
c) Only the second DELETE statement would be rolled back
d) Both the DELETE statements and the UPDATE statement would be rolled back
View Answer

Answer: d
Explanation: The SAVEPOINT statement names and marks the current point in the processing
of a transaction. With the ROLLBACK TO statement, savepoints undo parts of a transaction
instead of the whole transaction.

9. Evaluate the following command:


CREATE TABLE employees (employee_id NUMBER(2) PRIMARY KEY, last_name VARCHAR2(25) NOT
NULL, department_id NUMBER(2), job_id VARCHAR2(8), salary NUMBER(10,2));
You issue the following command TO CREATE a VIEW that displays the IDs AND LAST names
OF the sales staff IN the organization:
CREATE OR REPLACE VIEW sales_staff_vu AS SELECT employee_id, last_name job_id FROM
employees
WHERE job_id LIKE 'SA_%' WITH CHECK OPTION;

Which statements are true regarding the above view?


a) It allows you to insert details of all new staff into the EMPLOYEES table
b) It allows you to delete the details of the existing sales staff from the EMPLOYEES table
c) It allows you to update the job ids of the existing sales staff to any other job id in the
EMPLOYEES table
d) It allows you to insert the IDs, last
View Answer

Answer: d
Explanation: SQL Create view syntax :
CREATE VIEW view_name AS
SELECT column_name(s)
FROM TABLE_NAME
WHERE condition.

10. EMPDET is an external table containing the columns EMPNO and ENAME. Which
command would work in relation to the EMPDET table?
a)
advertisement
UPDATE empdet
SET ename = 'Amit'
WHERE empno = 1234;

b)
DELETE FROM empdet
WHERE ename LIKE 'J%';

c)
CREATE VIEW empvu
AS
SELECT* FROM empdept;

d)
CREATE INDEX empdet_idx
ON empdet(empno);
View Answer
Answer: c
Explanation: External tables are created using the SQL CREATE TABLE…ORGANIZATION
EXTERNAL statement. When an external table is created, you specify type ,default directory,
access parameters and location.

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Snapshot Isolation
» Next - Database Questions and Answers – Concurrency in Index Structures
Categories Database MCQsPost navigation
Database Questions and Answers – Snapshot Isolation
Database Questions and Answers – Concurrency in Index Structures
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Strings


2. Python Programming Examples on Stacks & Queues
3. C# Basic Programming Examples
4. Java Programming Examples on Event Handling
5. MongoDB Questions and Answers
6. 100+ Java Android Programming Examples
7. SQL Server Questions and Answers
8. C# Programming Examples on Events
9. Simple Java Programs
10. Java Programming Examples on Collections
11. Java Programming Examples on File Handling
12. Java Programming Examples on Exception Handling
13. Java Programming Examples on Arrays
14. C Programming Examples on File Handling
15. RDBMS Questions and Answers
16. Java Programming Examples on Utility Classes
17. C# Programming Examples on LINQ
18. Database Management System Questions and Answers
19. MySQL Database Questions and Answers
20. Oracle Database Questions and Answers
advertisement

Database Questions and Answers – Concurrency


in Index Structures
« Prev
Next »

This set of Database Question Bank focuses on “Concurrency in Index Structures”.

1. The method of access that uses key transformation is called as


a) Direct
b) Hash
c) Random
d) Sequential
View Answer

Answer: b
Explanation: Hash technique uses particular hash key value.
advertisement

2. Why do we need concurrency control on B+ trees ?


a) To remove the unwanted data
b) To easily add the index elements
c) To maintain accuracy of index
d) All of the mentioned
View Answer

Answer: c
Explanation: Indices do not have to be treated like other database structures.

3. How many techniques are available to control concurrency on B+ trees?


a) One
b) Three
c) Four
d) None of the mentioned
View Answer

Answer: d
Explanation: Two techniques are present.

4. In crabbing protocol locking


a) Goes down the tree and back up
b) Goes up the tree and back down
c) Goes down the tree and releases
d) Goes up the tree and releases
View Answer

Answer: a
Explanation: It moves in a crab like manner.
advertisement

5. The deadlock can be handled by


a) Removing the nodes that are deadlocked
b) Restarting the search after releasing the lock
c) Restarting the search without releasing the lock
d) Resuming the search
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner.

6. In crabbing protocol, the lock obtained on the root node is in _________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: a
Explanation: Crabbing protocol moves in a crab like manner down the index tree.

7. If needed to split a node or coalesce it with its siblings, or redistribute key values between
siblings, the crabbing protocol locks the parent of the node in ____________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.
advertisement
8. In crabbing protocol to inset or delete a key value the leaf node has to be locked in
___________ mode.
a) Shared
b) Exclusive
c) Read only
d) None of the mentioned
View Answer

Answer: b
Explanation: Crabbing protocol moves in a crab like manner down the index tree.

9. B-link tree requires a pointer to its __________ sibling.


a) Upper
b) Lower
c) Right
d) Left
View Answer

Answer: c
Explanation: This pointer is required because a lookup that occurs while a node is being split
may have to search not only that node but also that node’s right sibling.

10. Instead of locking index leaf nodes in a two-phase manner, some index concurrency-control
schemes use ___________ on individual key values, allowing other key values to be inserted or
deleted from the same leaf.
a) B+ tree locking
b) Link level locking
c) Key-value locking
d) Next value locking
View Answer

Answer: c
Explanation: Key-value locking thus provides increased concurrency.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice Database Question Bank, here is complete set on 1000+ Multiple Choice Questions
and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Insertion Deletion Predicate Reads
» Next - Database Questions and Answers – Failure Classification
Categories Database MCQsPost navigation
Database Questions and Answers – Insertion Deletion Predicate Reads
Database Questions and Answers – Failure Classification
advertisement
advertisement

Recommended Posts:

1. SQL Server Questions and Answers


2. C++ Programming Examples on Graph Problems & Algorithms
3. C Programming Examples on Graph Problems & Algorithms
4. C Programming Examples using Recursion
5. MongoDB Questions and Answers
6. C++ Programming Examples on Hard Graph Problems & Algorithms
7. Python Programming Examples on Linked Lists
8. C Programming Examples on Linked List
9. C Programming Examples without using Recursion
10. Python Programming Examples on Graphs
11. Data Structures & Algorithms II – Questions and Answers
12. Java Programming Examples on Data-Structures
13. C Programming Examples on Data-Structures
14. Oracle Database Questions and Answers
15. C Programming Examples on Trees
16. MySQL Database Questions and Answers
17. Python Programming Examples on Trees
18. C++ Programming Examples on Data-Structures
19. C# Programming Examples on Data Structures
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Failure


Classification
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Failure
Classification”.

1. The recovery scheme must also provide


a) High availability
b) Low availability
c) High reliability
d) High durability
View Answer

Answer: a
Explanation: It must minimize the time for which the database is not usable after a failure.
advertisement

2. Which one of the following is a failure to a system


a) Boot crash
b) Read failure
c) Transaction failure
d) All of the mentioned
View Answer

Answer: c
Explanation: Types of system failure are transaction failure, system crash and disk failure.

3. Which of the following belongs to transaction failure


a) Read error
b) Boot error
c) Logical error
d) All of the mentioned
View Answer

Answer: c
Explanation: Types of system transaction failure are logical and system error.

4. The system has entered an undesirable state (for example, deadlock), as a result of which a
transaction cannot continue with its normal execution. This is
a) Read error
b) Boot error
c) Logical error
d) System error
View Answer

Answer: c
Explanation: The transaction, can be re-executed at a later time.
advertisement

5. The transaction can no longer continue with its normal execution because of some internal
condition, such as bad input, data not found, overflow, or resource limit exceeded. This is
a) Read error
b) Boot error
c) Logical error
d) System error
View Answer

Answer: c
Explanation: The transaction, can be re-executed at a later time.

6. The assumption that hardware errors and bugs in the software bring the system to a halt, but
do not corrupt the nonvolatile storage contents, is known as the
a) Stop assumption
b) Fail assumption
c) Halt assumption
d) Fail-stop assumption
View Answer
Answer: d
Explanation: Well-designed systems have numerous internal checks, at the hardware and the
software level, that bring the system to a halt when there is an error. Hence, the fail-stop
assumption is a reasonable one.

7. Which kind of failure loses its data in head crash or failure during a transfer operation.
a) Transaction failure
b) System crash
c) Disk failure
d) All of the mentioned
View Answer

Answer: c
Explanation: Copies of the data on other disks, or archival backups on tertiary media, such as
DVD or tapes, are used to recover from the failure.
advertisement

8. The failure occurred sufficiently early during the transfer that the destination block remains
intact.
a) Partial Failure
b) Total failure
c) Successful completion
d) Data transfer failure
View Answer

Answer: a
Explanation: Copies of the data on other disks, or archival backups on tertiary media, such as
DVD or tapes, are used to recover from the failure.

9. The database is partitioned into fixed-length storage units called


a) Parts
b) Blocks
c) Reads
d) Build
View Answer

Answer: b
Explanation: Blocks are the units of data transfer to and from disk, and may contain several data
items.

10. Which of the following causes system to crash


a) Bug in software
b) Loss of volatile data
c) Hardware malfunction
d) All of the mentioned
View Answer

Answer: d
Explanation: The content of non-volatile storage remains intact, and is not corrupted.
advertisement
Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Concurrency in Index Structures
» Next - Database Questions and Answers – Recovery
Categories Database MCQsPost navigation
Database Questions and Answers – Concurrency in Index Structures
Database Questions and Answers – Recovery
advertisement
advertisement

Recommended Posts:

1. C Questions and Answers


2. Unix Questions and Answers
3. Mechanical Engineering Questions and Answers
4. MATLAB Questions and Answers
5. Operating System Questions and Answers
6. Computer Science Questions and Answers
7. Information Science Questions and Answers
8. Terms of Service
9. Information Technology Questions and Answers
10. C# Programming Examples on Files
11. Master of Computer Applications Questions and Answers
12. Bachelor of Computer Applications Questions and Answers
13. Spring Questions and Answers
14. SAN – Storage Area Networks Questions & Answers
15. MongoDB Questions and Answers
16. SQL Server Questions and Answers
17. RDBMS Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Recovery


« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Recovery”.
1. The log is a sequence of _________ recording all the update activities in the database.
a) Log records
b) Records
c) Entries
d) Redo
View Answer

Answer: a
Explanation: The most widely used structure for recording database modifications is the log.
advertisement

2. In the ___________ scheme, a transaction that wants to update the database first creates a
complete copy of the database.
a) Shadow copy
b) Shadow Paging
c) Update log records
d) All of the mentioned
View Answer

Answer: a
Explanation: If at any point the transaction has to be aborted, the system merely deletes the new
copy. The old copy of the database has not been affected.

3. The ____________ scheme uses a page table containing pointers to all pages; the page table
itself and all updated pages are copied to a new location.
a) Shadow copy
b) Shadow Paging
c) Update log records
d) All of the mentioned
View Answer

Answer: b
Explanation: Any page which is not updated by a transaction is not copied, but instead the new
page table just stores a pointer to the original page.

4. The current copy of the database is identified by a pointer, called ____________ which is
stored on disk.
a) Db-pointer
b) Update log
c) Update log records
d) All of the mentioned
View Answer

Answer: a
Explanation: Any page which is not updated by a transaction is not copied, but instead the new
page table just stores a pointer to the original page.
advertisement

5. If a transaction does not modify the database until it has committed, it is said to use the
___________ technique.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo
View Answer

Answer: a
Explanation: Deferred modification has the overhead that transactions need to make local copies
of all updated data items; further, if a transaction reads a data item that it has updated, it must
read the value from its local copy.

6. If database modifications occur while the transaction is still active, the transaction is said to
use the ___________technique.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo
View Answer

Answer: c
Explanation: We say a transaction modifies the database if it performs an update on a disk
buffer, or on the disk itself; updates to the private part of main memory do not count as database
modifications.

7. ____________ using a log record sets the data item specified in the log record to the old
value.
a) Deferred-modification
b) Late-modification
c) Immediate-modification
d) Undo
View Answer

Answer: d
Explanation: Undo brings the previous contents.
advertisement

8. In the __________ phase, the system replays updates of all transactions by scanning the log
forward from the last checkpoint.
a) Repeating
b) Redo
c) Replay
d) Undo
View Answer

Answer: b
Explanation: Undo brings the previous contents.

9. The actions which are played in the order while recording it is called ______________
history.
a) Repeating
b) Redo
c) Replay
d) Undo
View Answer

Answer: a
Explanation: Undo brings the previous contents.

10. A special redo-only log record < Ti, Xj, V1> is written to the log, where V1 is the value
being restored to data item Xj during the rollback. These log records are sometimes called
a) Log records
b) Records
c) Compensation log records
d) Compensation redo records
View Answer

Answer: c
Explanation: Such records do not need undo information since we never need to undo such an
undo operation.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Failure Classification
» Next - Database Questions and Answers – Buffer Management
Categories Database MCQsPost navigation
Database Questions and Answers – Failure Classification
Database Questions and Answers – Buffer Management
advertisement
advertisement

Recommended Posts:

1. Hazardous Waste Management Questions and Answers


2. Bioinformatics Questions and Answers
3. JUnit Questions and Answers
4. Privacy Policy
5. Computer Science Questions and Answers
6. Information Science Questions and Answers
7. Information Technology Questions and Answers
8. Spring Questions and Answers
9. Operating System Questions and Answers
10. Object Oriented Programming Questions and Answers
11. Master of Computer Applications Questions and Answers
12. Bachelor of Computer Applications Questions and Answers
13. MongoDB Questions and Answers
14. Java Programming Examples on File Handling
15. C Programming Examples on File Handling
16. RDBMS Questions and Answers
17. SQL Server Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Buffer


Management
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Buffer
Management”.

1. In order to reduce the overhead in retrieving the records from the storage space we use
a) Logs
b) Log buffer
c) Medieval space
d) Lower records
View Answer

Answer: b
Explanation: The output to stable storage is in units of blocks.
advertisement

2. The order of log records in the stable storage ____________ as the order in which they were
written to the log buffer.
a) Must be exactly the same
b) Can be different
c) Is opposite
d) Can be partially same
View Answer

Answer: a
Explanation: As a result of log buffering, a log record may reside in only main memory (volatile
storage) for a considerable time before it is output to stable storage.

3. Before a block of data in main memory can be output to the database, all log records
pertaining to data in that block must have been output to stable storage. This is
a) Read-write logging
b) Read-ahead logging
c) Write-ahead logging
d) None of the mentioned
View Answer

Answer: c
Explanation: The WAL rule requires only that the undo information in the log has been output
to stable storage, and it permits the redo information to be written later.

4. Writing the buffered log to __________ is sometimes referred to as a log force.


a) Memory
b) Backup
c) Redo memory
d) Disk
View Answer

Answer: d
Explanation: If there are insufficient log records to fill the block, all log records in main memory
are combined into a partially full block and are output to stable storage.
advertisement

5. The _______________ policy, allows a transaction to commit even if it has modified some
blocks that have not yet been written back to disk.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer

Answer: b
Explanation: No-force policy allows faster commit of transactions.

6. ______________ policy allows multiple updates to accumulate on a block before it is output


to stable storage, which can reduce the number of output operations greatly for frequently
updated blocks.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer

Answer: b
Explanation: No-force policy allows faster commit of transactions.

7. The ___________ policy, allows the system to write modified blocks to disk even if the
transactions that made those modifications have not all committed.
a) Force
b) No-force
c) Steal
d) No-steal
View Answer
Answer: c
Explanation: The no-steal policy does not work with transactions that perform a large number of
updates.
advertisement

8. Locks on buffer blocks are unrelated to locks used for concurrency-control of transactions,
and releasing them in a non-two-phase manner does not have any implications on transaction
serializability. This is
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: a
Explanation: These locks, and other similar locks that are held for a short duration.

9. The __________________ contains a list of blocks that have been updated in the database
buffer.
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: c
Explanation: Dirty blocks are those that have been updated in memory, and the disk version is
not up-to-date.

10. The operating system reserves space on disk for storing virtual-memory pages that are not
currently in main memory; this space is called
a) Latches
b) Swap Space
c) Dirty Block
d) None of the mentioned
View Answer

Answer: b
Explanation: Almost all current-generation operating systems retain complete control of virtual
memory.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Recovery
» Next - Database Questions and Answers – Failure with Nonvolatile Storage
Categories Database MCQsPost navigation
Database Questions and Answers – Recovery
Database Questions and Answers – Failure with Nonvolatile Storage
advertisement
advertisement

Recommended Posts:

1. C Programming Examples on Stacks & Queues


2. Computer Fundamentals Questions and Answers
3. Microprocessor Questions & Answers
4. Embedded System Questions and Answers
5. Computer Organization & Architecture Questions and Answers
6. SAN – Storage Area Networks Questions & Answers
7. Terms of Service
8. SQL Server Questions and Answers
9. C# Programming Examples on Files
10. Java Programming Examples on Classes
11. C# Programming Examples on Interfaces
12. Copyright
13. Java Programming Examples on Exception Handling
14. Energy & Environment Management Questions and Answers
15. Hazardous Waste Management Questions and Answers
16. RDBMS Questions and Answers
17. Operating System Questions and Answers
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Operating System Questions & Answers – Swap Space Management
advertisement

Database Questions and Answers – Failure with


Nonvolatile Storage
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Failure with
Nonvolatile Storage”.

1. The silicon chips used for data processing are called


a) RAM chips
b) ROM chips
c) Micro processors
d) PROM chips
View Answer
Answer: d
Explanation: PROM is Programmable Read Only Memory.
advertisement

2. Which of the following is used for manufacturing chips?


a) Control bus
b) Control unit
c) Parity unit
d) Semiconductor
View Answer

Answer: d
Explanation: A semiconductor is a material which has electrical conductivity between that of a
conductor such as copper and that of an insulator such as glass.

3. What was the name of the first commercially available microprocessor chip?
a) Intel 308
b) Intel 33
c) Intel 4004
d) Motorola 639
View Answer

Answer: c
Explanation: The Intel 4004 is a 4-bit central processing unit (CPU) released by Intel
Corporation in 1971

4. The magnetic storage chip used to provide non-volatile direct access storage of data and that
have no moving parts are known as
a) Magnetic core memory
b) Magnetic tape memory
c) Magnetic disk memory
d) Magnetic bubble memory
View Answer

Answer: d
Explanation: Bubble domain visualization by using CMOS-MagView.
advertisement

5. The ALU of a computer normally contains a number of high speed storage element called
a) Semiconductor memory
b) Registers
c) Hard disks
d) Magnetic disk
View Answer

Answer: b
Explanation: External control unit tells the ALU what operation to perform on that data, and
then the ALU stores its result into an output register.
6. Which of the following is used only for data entry and storage, and never for processing?
a) Mouse
b) Dumb terminal
c) Micro computer
d) Dedicated data entry system
View Answer

Answer: b
Explanation: Dumb terminals are those that can interpret a limited number of control codes.

7. Non-volatile storage needs to have a _________ where the loses in future can be recovered.
a) Dump
b) Recover place
c) Disk
d) Redo plan
View Answer

Answer: a
Explanation: The basic scheme is to dump the entire contents of the database to stable storage
periodically—say, once per day.
advertisement

8. A dump of the database contents is also referred to as an _____________ dump.


a) Archival
b) Fuzzy
c) SQL
d) All of the mentioned
View Answer

Answer: a
Explanation: We can archive the dumps and use them later to examine old states of the database.

9. ________ dump, writes out SQL DDL statements and SQL insert statements to a file, which
can then be reexecuted to re-create the database.
a) Archival
b) Fuzzy
c) SQL
d) All of the mentioned
View Answer

Answer: c
Explanation: Such dumps are useful when migrating data to a different instance of the database,
or to a different version of the database software, since the physical locations and layout may be
different in the other database instance or database software version.

10. _________ dump schemes have been developed that allow transactions to be active while
the dump is in progress.
a) Archival
b) Fuzzy
c) SQL
d) All of the mentioned
View Answer

Answer: b
Explanation: The simple dump procedure described here is costly and so fuzzy dump is used.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Buffer Management
» Next - Database Questions and Answers – ARIES
Categories Database MCQsPost navigation
Database Questions and Answers – Buffer Management
Database Questions and Answers – ARIES
advertisement
advertisement

Recommended Posts:

1. Food Engineering Questions and Answers


2. Information Technology Questions and Answers
3. Bachelor of Computer Applications Questions and Answers
4. Information Science Questions and Answers
5. SQL Server Questions and Answers
6. VLSI Questions and Answers
7. MongoDB Questions and Answers
8. JUnit Questions and Answers
9. Operating System Questions and Answers
10. RDBMS Questions and Answers
11. Home
12. Master of Computer Applications Questions and Answers
13. Embedded System Questions and Answers
14. Microprocessor Questions & Answers
15. Computer Organization & Architecture Questions and Answers
16. Computer Fundamentals Questions and Answers
17. MySQL Database Questions and Answers
18. Oracle Database Questions and Answers
19. Database Management System Questions and Answers
20. SAN – Storage Area Networks Questions & Answers
advertisement
Database Questions and Answers – ARIES
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “ARIES”.

1. ARIES uses a ___________ to identify log records, and stores it in database pages.
a) Log sequence number
b) Log number
c) Lock number
d) Sequence
View Answer

Answer: b
Explanation: LSN is used to identify which operations have been applied to a database page.
advertisement

2. ARIES supports ___________ operations, which are physical in that the affected page is
physically identified, but can be logical within the page.
a) Physiological redo
b) Physiological undo
c) Logical redo
d) Logical undo
View Answer

Answer: a
Explanation: The deletion of a record from a page may result in many other records in the page
being shifted, if a slotted page structure is used.

3. ______________ is used to minimize unnecessary redos during recovery.


a) Dirty page table
b) Page table
c) Dirty redo
d) All of the mentioned
View Answer

Answer: a
Explanation: Dirty pages are those that have been updated in memory, and the disk version is
not up-to-date.

4. __________ scheme that records only information about dirty pages and associated
information and does not even require of writing dirty pages to disk.
a) Fuzzy logic
b) Checkpoints
c) Fuzzy-checkpoint
d) Logical checkpoint
View Answer
Answer: c
Explanation: It flushes dirty pages in the background, continuously, instead of writing them
during checkpoints.
advertisement

5. Whenever an update operation occurs on a page, the operation stores the LSN of its log record
in the _______ field of the page.
a) LSN
b) ReadLSN
c) PageLSN
d) RedoLSN
View Answer

Answer: c
Explanation: Each page maintains an identifier called the PageLSN.

6. There are special redo-only log records generated during transaction rollback, called
_________ in ARIES.
a) Compensation log records
b) Read log records
c) Page log records
d) Redo log records
View Answer

Answer: a
Explanation: These serve the same purpose as the redo-only log records in our earlier recovery
scheme.

7. The __________________ contains a list of pages that have been updated in the database
buffer.
a) Dirty page table
b) Page table
c) Dirty redo
d) All of the mentioned
View Answer

Answer: a
Explanation: Dirty pages are those that have been updated in memory, and the disk version is
not up-to-date.
advertisement

8. ___________ determines which transactions to undo, which pages were dirty at the time of
the crash, and the LSN from which the redo pass should start.
a) Analysis pass
b) Redo pass
c) Undo pass
d) None of the mentioned
View Answer
Answer: a
Explanation: The analysis pass finds the last complete checkpoint log record, and reads in the
DirtyPageTable from this record.

9. __________ starts from a position determined during analysis, and performs a redo, repeating
history, to bring the database to a state it was in before the crash.
a) Analysis pass
b) Redo pass
c) Undo pass
d) None of the mentioned
View Answer

Answer: b
Explanation: The redo pass repeats history by replaying every action that is not already reflected
in the page on disk.

10. ______________ rolls back all transactions that were incomplete at the time of crash.
a) Analysis pass
b) Redo pass
c) Undo pass
d) None of the mentioned
View Answer

Answer: c
Explanation: It performs a single backward scan of the log, undoing all transactions in undo-list.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Failure with Nonvolatile Storage
» Next - Database Questions and Answers – Lock Release and Undo Operations
Categories Database MCQsPost navigation
Database Questions and Answers – Failure with Nonvolatile Storage
Database Questions and Answers – Lock Release and Undo Operations
advertisement
advertisement

Recommended Posts:

1. Structural Analysis Questions and Answers


2. Neural Networks Questions and Answers
3. Network Theory Questions and Answers
4. Bioinformatics Questions and Answers
5. Control Systems Questions and Answers
6. MongoDB Questions and Answers
7. Hazardous Waste Management Questions and Answers
8. C Programming Examples on File Handling
9. Compilers Questions and Answers
10. MATLAB Questions and Answers
11. Electric Circuits Questions and Answers
12. Digital Signal Processing Questions and Answers
13. SQL Server Questions and Answers
14. Privacy Policy
15. Operating System Questions and Answers
16. RDBMS Questions and Answers
17. C# Programming Examples on Functions
18. MySQL Database Questions and Answers
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Lock Release


and Undo Operations
« Prev
Next »

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Lock Release
and Undo Operations”.

1. Which lock should be obtained to prevent a concurrent transaction from executing a


conflicting read, insert or delete operation on the same key value.
a) Higher-level lock
b) Lower-level lock
c) Read only lock
d) Read write
View Answer

Answer: a
Explanation: Operations acquire lower-level locks while they execute, but release them when
they complete; the corresponding transaction must however retain a higher-level lock in a two-
phase manner to prevent concurrent transactions from executing conflicting actions.

2. Once the lower-level lock is released, the operation cannot be undone by using the old values
of updated data items, and must instead be undone by executing a compensating operation; such
an operation is called
a) Logical operation
b) Redo operation
c) Logical undo operation
d) Undo operation
View Answer
Answer: a
Explanation: It is important that the lower-level locks acquired during an operation are sufficient
to perform a subsequent logical undo of the operation.
advertisement

3. Which of the following is used for undo operations alone?


a) Logical logging
b) Physical logging
c) Physical log records
d) Physical logging and Physical log records
View Answer

Answer: a
Explanation: If the operation inserted an entry in a B+-tree, the undo information U would
indicate that a deletion operation is to be performed, and would identify the B+-tree and what
entry to delete from the tree. Such logging of information about operations is called logical
logging.

4. Redo operations are performed exclusively using


a) Logical logging
b) Physical logging
c) Physical log records
d) Both Physical logging and Physical log records
View Answer

Answer: d
Explanation: Logging of old-value and new-value information is called physical logging.

5. To perform logical redo or undo, the database state on disk must be operation ___________
that is, it should not have partial effects of any operation.
a) Persistent
b) Resistant
c) Consistent
d) None of the mentioned
View Answer

Answer: c
Explanation: Data structures such as B+-trees would not be in a consistent state, and neither
logical redo nor logical undo operations can be performed on an inconsistent data structure.
advertisement

6. An operation is said to be __________ if executing it several times in a row gives the same
result as executing it once.
a) Idempotent
b) Changed
c) Repetitive
d) All of the above
View Answer
Answer: a
Explanation: Operations such as inserting an entry into a B+-tree may not be idempotent, and
the recovery algorithm must therefore make sure that an operation that has already been
performed is not performed again.

7. Immediate database modification technique uses


a) Both undo and redo
b) Undo but no redo
c) Redo but no undo
d) Neither undo nor redo
View Answer

Answer: a
Explanation: Undo erases all the changes and redo makes the deleted changes.

8. Shadow paging has


a) no redo
b) no undo
c) redo but no undo
d) neither redo nor undo
View Answer

Answer: a
Explanation: Undo erases all the changes and redo makes the deleted changes.
advertisement

9. For correct behaviour during recovery, undo and redo operation must be
a) Commutative
b) Associative
c) Idempotent
d) Distributive
View Answer

Answer: c
Explanation: Undo erases all the changes and redo makes the deleted changes.

10. If ___________ are not obtained in undo operation it will cause problem in undo-phase.
a) Higher-level lock
b) Lower-level lock
c) Read only lock
d) Read write
View Answer

Answer: b
Explanation: Operations acquire lower-level locks while they execute, but release them when
they complete; the corresponding transaction must however retain a higher-level lock in a two-
phase manner to prevent concurrent transactions from executing conflicting actions.

Sanfoundry Global Education & Learning Series – Database Management System.


advertisement
To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!
Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – ARIES
» Next - Database Questions and Answers – Remote Backup Systems
Categories Database MCQsPost navigation
Database Questions and Answers – ARIES
Database Questions and Answers – Remote Backup Systems
advertisement
advertisement

Recommended Posts:

1. C# Programming Examples on Functions


2. SQL Server Questions and Answers
3. C# Programming Examples on Matrix
4. Java Programming Examples on Utility Classes
5. C Programming Examples on Arrays
6. C Programming Examples on Matrix
7. C Programming Examples on Linked List
8. C# Programming Examples on Data Structures
9. Java Programming Examples on Multithreading
10. MongoDB Questions and Answers
11. RDBMS Questions and Answers
12. C Programming Examples on Stacks & Queues
13. C# Programming Examples on Strings
14. Mechanical Operations Questions and Answers
15. C# Programming Examples on Threads
16. Heat Transfer Operations Questions and Answers
17. MySQL Database Questions and Answers
18. C Programming Examples on Bitwise Operations
19. Oracle Database Questions and Answers
20. Database Management System Questions and Answers
advertisement

Database Questions and Answers – Remote


Backup Systems
« Prev

This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Remote
Backup Systems”.

1. The remote backup site is sometimes also called the


a) Primary Site
b) Secondary Site
c) Tertiary Site
d) None of the mentioned
View Answer

Answer: b
Explanation: We can achieve high availability by performing transaction processing at one site,
called the primary site, and having a remote backup site where all the data from the primary site
are replicated.
advertisement

2. Remote backup system must be _________ with the primary site.


a) Synchronised
b) Separated
c) Connected
d) Detached but related
View Answer

Answer: a
Explanation: We can achieve high availability by performing transaction processing at one site,
called the primary site, and having a remote backup site where all the data from the primary site
are replicated.

3. The backup is taken by


a) Erasing all previous records
b) Entering the new records
c) Sending all log records from primary site to the remote backup site
d) Sending selected records from primary site to the remote backup site
View Answer

Answer: c
Explanation: We can achieve high availability by performing transaction processing at one site,
called the primary site, and having a remote backup site where all the data from the primary site
are replicated.

4. When the __________ the backup site takes over processing and becomes the primary.
a) Secondary fails
b) Backup recovers
c) Primary fails
d) None of the mentioned
View Answer

Answer: c
Explanation: When the original primary site recovers, it can either play the role of remote
backup, or take over the role of primary site again.
advertisement

5. The simplest way of transferring control is for the old primary to receive __________ from
the old backup site.
a) Undo logs
b) Redo Logs
c) Primary Logs
d) All of the mentioned
View Answer

Answer: c
Explanation: If control must be transferred back, the old backup site can pretend to have failed,
resulting in the old primary taking over.

6. The time to process the remote backup can be reduced by


a) Flags
b) Breakpoints
c) Redo points
d) Checkpoints
View Answer

Answer: d
Explanation: If the log at the remote backup grows large, recovery will take a long time. The
remote backup site can periodically process the redo log records that it has received and can
perform a checkpoint, so that earlier parts of the log can be deleted.

7. A _______________ configuration can make takeover by the backup site almost


instantaneous.
a) Hot-spare
b) Remote
c) Direct
d) Spare
View Answer

Answer: d
Explanation: In this configuration, the remote backup site continually processes redo log records
as they arrive, applying the updates locally.
advertisement

8. A transaction commits as soon as its commit log record is written to stable storage at the
primary site. This is
a) One Safe
b) Two Safe
c) Two-very Safe
d) Very Safe
View Answer

Answer: a
Explanation: The problem with this scheme is that the updates of a committed transaction may
not have made it to the backup site, when the backup site takes over processing.

9. A transaction commits as soon as its commit log record is written to stable storage at the
primary and the backup site. This is
a) One Safe
b) Two Safe
c) Two-very Safe
d) Very Safe
View Answer

Answer: c
Explanation: The problem with this scheme is that transaction processing cannot proceed if
either the primary or the backup site is down.

10. If only the primary is active, the transaction is allowed to commit as soon as its commit log
record is written to stable storage at the primary site. This is
a) One Safe
b) Two Safe
c) Two-very Safe
d) Very Safe
View Answer

Answer: b
Explanation: This scheme provides better availability than does two-very-safe, while avoiding
the problem of lost transactions faced by the one-safe scheme.
advertisement

Sanfoundry Global Education & Learning Series – Database Management System.

To practice all areas of Database Management System, here is complete set on 1000+ Multiple
Choice Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest


Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - Database Questions and Answers – Lock Release and Undo Operations
Categories Database MCQsPost navigation
Database Questions and Answers – Lock Release and Undo Operations
C# Program to Convert Infix to Postfix
advertisement
advertisement

Recommended Posts:

1. Spring Questions and Answers


2. Master of Computer Applications Questions and Answers
3. Information Technology Questions and Answers
4. Bachelor of Computer Applications Questions and Answers
5. Privacy Policy
6. Power Systems Questions and Answers
7. Control Systems Questions and Answers
8. Signals & Systems Questions and Answers
9. Home
10. SAN – Storage Area Networks Questions & Answers
11. MongoDB Questions and Answers
12. Terms of Service
13. SQL Server Questions and Answers
14. RDBMS Questions and Answers
15. MySQL Database Questions and Answers
16. Oracle Database Questions and Answers
17. Database Management System Questions and Answers
18. Database Questions and Answers – Estimating Statistics of Expression Results
19. Oracle Database Questions and Answers – Storing and Guarding the Data
20. Database Questions and Answers – Relational Database and Database Schema
advertisement

C# Program to Convert Infix to Postfix


« Prev
Next »
This C# Program Converts Infix to Postfix. Here the infix expression is obtained from the user
and is converted to postfix expression which consists of primary expressions or expressions in
which postfix operators follow a primary expression.

Here is source code of the C# Program to Convert Infix to Postfix. The C# program is successfully
compiled and executed with Microsoft Visual Studio. The program output is also shown below.
1. /*
2. * C# Program to Convert Infix to Postfix
3. */
4. using System;
5. using System.Collections.Generic;
6. using System.Linq;
7. using System.Text;
8. namespace Infix
9. {
10. class Program
11. {
12. static bool convert(ref string infix, out string postfix)
13. {
14.
15. int prio = 0;
16. postfix = "";
17. Stack<Char> s1 = new Stack<char>();
18. for (int i = 0; i < infix.Length; i++)
19. {
20. char ch = infix[i];
21. if (ch == '+' || ch == '-' || ch == '*' || ch == '/')
22. {
23. if (s1.Count <= 0)
24. s1.Push(ch);
25. else
26. {
27. if (s1.Peek() == '*' || s1.Peek() == '/')
28. prio = 1;
29. else
30. prio = 0;
31. if (prio == 1)
32. {
33. if (ch == '+' || ch == '-')
34. {
35. postfix += s1.Pop();
36. i--;
37. }
38. else
39. {
40. postfix += s1.Pop();
41. i--;
42. }
43. }
44. else
45. {
46. if (ch == '+' || ch == '-')
47. {
48. postfix += s1.Pop();
49. s1.Push(ch);
50.
51. }
52. else
53. s1.Push(ch);
54. }
55. }
56. }
57. else
58. {
59. postfix += ch;
60. }
61. }
62. int len = s1.Count;
63. for (int j = 0; j < len; j++)
64. postfix += s1.Pop();
65. return true;
66. }
67. static void Main(string[] args)
68. {
69. string infix = "";
70. string postfix = "";
71. if (args.Length == 1)
72. {
73. infix = args[0];
74. convert(ref infix, out postfix);
75. System.Console.WriteLine("InFix :\t" + infix);
76. System.Console.WriteLine("PostFix:\t" + postfix);
77. }
78. else
79. {
80. infix = "a+b*c-d";
81. convert(ref infix, out postfix);
82. System.Console.WriteLine("InFix :\t" + infix);
83. System.Console.WriteLine("PostFix :\t" + postfix);
84. System.Console.WriteLine();
85. infix = "a+b*c-d/e*f";
86. convert(ref infix, out postfix);
87. System.Console.WriteLine("InFix :\t" + infix);
88. System.Console.WriteLine("PostFix :\t" + postfix);
89. System.Console.WriteLine();
90. infix = "a-b/c*d-e--f/h*i++j-/k";
91. convert(ref infix, out postfix);
92. System.Console.WriteLine("InFix :\t" + infix);
93. System.Console.WriteLine("PostFix :\t" + postfix);
94. System.Console.WriteLine();
95. Console.ReadLine();
96. }
97. }
98. }
99. }

Here is the output of the C# Program:


advertisement
Infix : a+b*c-d
Postfix : abc*+d-

Infix : a+b*c-d/e*f
Postfix : abc*+de/f*-

Infix : a-b/c*d-e--f/h*I++j-/k
Postfix : abc/d*-e--fh/I*-=j=k/-

Sanfoundry Global Education & Learning Series – 1000 C# Programs.


advertisement
If you wish to look at all C# Programming examples, go to 1000 C# Programs.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!
Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - C# Program to Calculate the Distance Travelled by Reading Speed and Time
» Next - C# Program to Implement Binary Search Tree using Linked List
Categories C# ProgramsPost navigation
Database Questions and Answers – Remote Backup Systems
C# Program to Implement Binary Search Tree using Linked List
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on File Handling


2. C# Programming Examples on Exceptions
3. Java Programming Examples on Data-Structures
4. Java Programming Examples on String Handling
5. C# Programming Examples
6. C Programming Examples using Recursion
7. C++ Programming Examples on Graph Problems & Algorithms
8. C# Programming Examples on Data Structures
9. C# Programming Examples on Strings
10. C++ Programming Examples on STL
11. Java Programming Examples on Graph Problems & Algorithms
12. C++ Programming Examples on Data-Structures
13. C Programming Examples without using Recursion
14. C# Programming Examples on Functions
15. C Programming Examples on Graph Problems & Algorithms
16. Data Structure Questions and Answers
17. C Programming Examples on Stacks & Queues
18. Python Programming Examples on Stacks & Queues
19. C# Programming Examples on LINQ
20. C# Programming Examples on Conversions
advertisement

C# Program to Implement Binary Search Tree


using Linked List
« Prev
Next »
This C# Program Implements Binary Search Tree using Linked List.A Binary tree is a tree data
structure in which each node has at most two child nodes, usually distinguished as “left” and
“right”.

Here is source code of the C# Program to Implement Binary Search Tree using Linked List. The
C# program is successfully compiled and executed with Microsoft Visual Studio. The program
output is also shown below.
1. /*
2. * C# Program to Implement Binary Search Tree using Linked List
3. */
4. using System;
5. using System.Collections.Generic;
6. using System.Text;
7. namespace TreeSort
8. {
9. class Node
10. {
11. public int item;
12. public Node leftc;
13. public Node rightc;
14. public void display()
15. {
16. Console.Write("[");
17. Console.Write(item);
18. Console.Write("]");
19. }
20. }
21. class Tree
22. {
23. public Node root;
24. public Tree()
25. {
26. root = null;
27. }
28. public Node ReturnRoot()
29. {
30. return root;
31. }
32. public void Insert(int id)
33. {
34. Node newNode = new Node();
35. newNode.item = id;
36. if (root == null)
37. root = newNode;
38. else
39. {
40. Node current = root;
41. Node parent;
42. while (true)
43. {
44. parent = current;
45. if (id < current.item)
46. {
47. current = current.leftc;
48. if (current == null)
49. {
50. parent.leftc = newNode;
51. return;
52. }
53. }
54. else
55. {
56. current = current.rightc;
57. if (current == null)
58. {
59. parent.rightc = newNode;
60. return;
61. }
62. }
63. }
64. }
65. }
66. public void Preorder(Node Root)
67. {
68. if (Root != null)
69. {
70. Console.Write(Root.item + " ");
71. Preorder(Root.leftc);
72. Preorder(Root.rightc);
73. }
74. }
75. public void Inorder(Node Root)
76. {
77. if (Root != null)
78. {
79. Inorder(Root.leftc);
80. Console.Write(Root.item + " ");
81. Inorder(Root.rightc);
82. }
83. }
84. public void Postorder(Node Root)
85. {
86. if (Root != null)
87. {
88. Postorder(Root.leftc);
89. Postorder(Root.rightc);
90. Console.Write(Root.item + " ");
91. }
92. }
93. }
94. class Program
95. {
96. static void Main(string[] args)
97. {
98. Tree theTree = new Tree();
99. theTree.Insert(20);
100. theTree.Insert(25);
101. theTree.Insert(45);
102. theTree.Insert(15);
103. theTree.Insert(67);
104. theTree.Insert(43);
105. theTree.Insert(80);
106. theTree.Insert(33);
107. theTree.Insert(67);
108. theTree.Insert(99);
109. theTree.Insert(91);
110. Console.WriteLine("Inorder Traversal : ");
111. theTree.Inorder(theTree.ReturnRoot());
112. Console.WriteLine(" ");
113. Console.WriteLine();
114. Console.WriteLine("Preorder Traversal : ");
115. theTree.Preorder(theTree.ReturnRoot());
116. Console.WriteLine(" ");
117. Console.WriteLine();
118. Console.WriteLine("Postorder Traversal : ");
119. theTree.Postorder(theTree.ReturnRoot());
120. Console.WriteLine(" ");
121. Console.ReadLine();
122. }
123. }
124. }

Here is the output of the C# Program:


advertisement
Inorder Traversal :
15 20 25 33 43 45 67 67 80 91 99
Preorder Traversal :
20 15 25 45 43 33 67 80 67 99 91
Postorder Traversal :
15 33 43 67 91 99 80 67 45 25 20

Sanfoundry Global Education & Learning Series – 1000 C# Programs.


advertisement
If you wish to look at all C# Programming examples, go to 1000 C# Programs.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!
Telegram | Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest
« Prev - C# Program to Convert Infix to Postfix
» Next - C# Program to Illustrate LeftShift Operations
Categories C# ProgramsPost navigation
C# Program to Convert Infix to Postfix
C# Program to Illustrate LeftShift Operations
advertisement
advertisement

Recommended Posts:

1. Java Programming Examples on Hard Graph Problems & Algorithms


2. C Programming Examples on Combinatorial Problems & Algorithms
3. C Programming Examples on Searching and Sorting
4. C Programming Examples on Data-Structures
5. C++ Programming Examples on Data-Structures
6. C++ Programming Examples on Hard Graph Problems & Algorithms
7. C Programming Examples
8. Python Programming Examples on Graphs
9. Python Programming Examples on Searching and Sorting
10. C# Programming Examples on Data Structures
11. Data Structure Questions and Answers
12. Java Programming Examples on Graph Problems & Algorithms
13. C Programming Examples using Recursion
14. C++ Programming Examples on Graph Problems & Algorithms
15. Python Programming Examples on Linked Lists
16. C Programming Examples on Graph Problems & Algorithms
17. C Programming Examples without using Recursion
18. C Programming Examples on Linked List
19. Python Programming Examples on Trees
20. C Programming Examples on Trees
advertisement
1. Given the evolution of DBMSs, business data is now:

a. Stored in main memory and stays resident there even after the application that uses it terminates.

b. Stored only if it is relevant to business decisions.

c. Stored indefinitely in case it's needed since storing it is much cheaper now.

d. None of the above.

Answer: (b).Stored only if it is relevant to business decisions.

2. Which of the following is not true of a DBMS?

a. It provides efficient storage and retrieval of data.

b. It has evolved over the years into a fairly simple set of tools that are relatively easy to master.

c. Marketplace demands and product innovation have led to the development of a broad range of features.

d. None of the above.

Answer: (b).It has evolved over the years into a fairly simple set of tools that are relatively easy to master.

3. Nonprocedural access to a database:

a. Can provide a dramatic improvement in software productivity.

b. Allows a user to submit queries to a database without having to know how the data will be retrieved.

c. Is supported by more than one tool in most DBMSs.

d. All of the above.

Answer: (d).All of the above.

4. Which of the following statements is not true of a desktop DBMS?

a. They usually run on personal computers or small servers.


b. They have a much lower cost than other DBMSs.

c. Although useful for processing ad hoc queries, they cannot perform transaction processing.

d. They usually support databases used by work teams and small businesses.

Answer: (c).Although useful for processing ad hoc queries, they cannot perform transaction processing.

5. In the evolution of database technology, second-generation products are considered to be the first true DB

a. They were "navigational", i.e. the programmer had to write code to navigate through a network of linked re

b. Of their foundation on mathematical relations and associated operators.

c. They supported sequential and random searching.

d. They could manage multiple entities and relationships.

Answer: (d).They could manage multiple entities and relationships.

6. In the evolution of database technology, third-generation products supplanted second-generation systems

a. Nonprocedural database access was an improvement over navigational access.

b. IBM supported the CODASYL standard of database definition and manipulation.

c. Nonprocedural languages were still not very efficient.

d. All of the above.

Answer: (a).Nonprocedural database access was an improvement over navigational access.

7. Which statement is not true of the Three Schema Architecture?

a. It is an official standard of the American Standards Institute (ANSI).

b. It is an architecture for compartmentalizing database descriptions.

c. Its details have been widely adopted in third- and fourth-generation DBMSs.
d. None of the above.

Answer: (c).Its details have been widely adopted in third- and fourth-generation DBMSs.

8. Which of the following statements is not true of information resource management?

a. It is very different and much more challenging than managing the other physical resources of an organizat

b. Its goal is to use information technology as a tool for processing, distributing, and integrating information th

c. Its emergence has created new management responsibilities.

d. None of the above.

Answer: (a).It is very different and much more challenging than managing the other physical resources of an org

9. 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

Answer: (d).All of the above

10. Data Manipulation Language enables users to

a. Retrieval of information stored in database

b. Insertion of new information into the database

c. Deletion of information from the database

d. All of the above


Answer: (d).All of the above

11. Which of the following is Database Language?

a. Data Definition Language

b. Data Manipulation Language

c. Query Language

d. All of the above

Answer: (d).All of the above

12. Which of the following in not a function of DBA?

a. Network Maintenance

b. Routine Maintenance

c. Schema Definition

d. Authorization for data access

Answer: (a).Network Maintenance

13. Which of the following represents a relationship among a set of values.

a. A Row

b. A Table

c. A Field

d. A Column

Answer: (a).A Row


14. Column header is refer as

a. Table

b. Relation

c. Attributes

d. Domain

Answer: (c).Attributes

15. Which of the following is not Modification of the Database?

a. Deletion

b. Insertion

c. Sorting

d. Updating

Answer: (c).Sorting

16. Which of the following in true regarding Null Value?

a. Null = 0

b. Null < 0

c. Null > 0

d. Null <> 0

Answer: (d).Null <> 0

17. ODBC stands for ______

a. Offline database connection


b. Oriented database connection

c. Open database connection

d. None of the above

Answer: (c).Open database connection

18. _____________ refers to the correctness and completeness of the data in a database?

a. Data security

b. Data integrity

c. Data constraint

d. Data independence

19. Data integrity constraints are used to:

a. Control who is allowed access to the data

b. Ensure that duplicate records are not entered into the table

c. Improve the quality of data entered for a specific property (i.e., table column)

d. Prevent users from changing the values stored in the table

Answer: (c).Improve the quality of data entered for a specific property (i.e., table column)

20. The DBMS acts as an interface between what two components of an enterprise-class database system?

a. Database application and the database

b. Data and the database

c. The user and the database application


Answer: (a).Database application and the database

1. Which of the following is not a level of data abstraction?

a. Physical Level

b. Critical Level

c. Logical Level

d. View Level

Answer: (b).Critical Level

2. Which of the following is not an Schema?

a. Database Schema

b. Physical Schema

c. Critical Schema

d. Logical Schema

Answer: (c).Critical Schema

3. 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

Answer: (d).All of the above


4. Logical design of database is called

a. Database Instance

b. Database Snapshot

c. Database Schema

d. All of the above

Answer: (c).Database Schema

5. Snapshot of the dta in the database at a given instant of time is called

a. Database Schema

b. Database Instance

c. Database Snapshot

d. All of the above

Answer: (b).Database Instance

6. Which of the following is the structure of the Database?

a. Table

b. Schema

c. Relation

d. None of these

Answer: (b).Schema
7. A logical description of some portion of database that is required by a user to perform task is called as

a. System View

b. User View

c. Logical View

d. Data View

Answer: (b).User View

8. _____________ is a classical approach to database design?

a. Left – Right approach

b. Right – Left approach

c. Top – Down approach

d. Bottom – Up approach

Answer: (c).Top – Down approach

9. Which of the following is the oldest database model?

a. Relational

b. Hierarchical

c. Physical

d. Network

Answer: (d).Network

10. Which of the following indicates the maximum number of entities that can be involved in a relationship?

a. Minimum cardinality
b. Maximum cardinality

c. ERD

d. Greater Entity Count (GEC)

Answer: (b).Maximum cardinality

11. Which of the following data constraints would be used to specify that the value of cells in a column must be

a. A domain constraint

b. A range constraint

c. An intrarelation constraint

d. An interrelation constraint

Answer: (a).A domain constraint

12. In a 1:N relationship, the foreign key is placed in:

a. either table without specifying parent and child tables.

b. the parent table.

c. the child table.

d. either the parent table or the child table.

Answer: (c).the child table.

13. Which of the following column properties specifies whether or not cells in a column must contain a data va

a. Null status

b. Data type

c. Default value
d. Data constraints

Answer: (a).Null status

14. A primary key should be defined as:

a. NULL

b. NOT NULL

c. Either of the above can be used

d. None of the above are correct

Answer: (b).NOT NULL

15. Which of the following column properties would be used to specify that cells in a column must contain a m

a. Null status

b. Data type

c. Default value

d. Data constraints

Answer: (b).Data type

16. If a denormalization situation exists with a one-to-one binary relationship, which of the following is true?

a. All fields are stored in one relation.

b. All fields are stored in two relations.

c. All fields are stored in three relations.

d. All fields are stored in four relations.


Answer: (a).All fields are stored in one relation.

17. Selecting a data type involves which of the following?

a. Maximize storage space

b. Represent most values

c. Improve data integrity

d. All of the above

Answer: (c).Improve data integrity

18. What is the best data type definition for Oracle when a field is alphanumeric and has a length that can vary

a. VARCHAR2

b. CHAR

c. LONG

d. NUMBER

Answer: (a).VARCHAR2

19. A multidimensional database model is used most often in which of the following models?

a. Data warehouse

b. Relational

c. Hierarchical

d. Network

Answer: (a).Data warehouse


20. Which of the following is not a factor to consider when switching from small to large block size?

a. The length of all of the fields in a table row.

b. The number of columns

c. Block contention

d. Random row access speed

Answer: (b).The number of columns

1. A Relation is a

a. Subset of a Cartesian product of a list of attributes

b. Subset of a Cartesian product of a list of domains

c. Subset of a Cartesian product of a list of tuple

d. Subset of a Cartesian product of a list of relations

Answer: (b).Subset of a Cartesian product of a list of domains

2. In mathematical term Table is referred as

a. Relation

b. Attribute

c. Tuple

d. Domain

Answer: (a).Relation
3. In mathematical term Row is referred as

a. Relation

b. Attribute

c. Tuple

d. Domain

Answer: (c).Tuple

4. _______ allow us to identify uniquely a tuple in the relation.

a. Superkey

b. Domain

c. Attribute

d. Schema

Answer: (a).Superkey

5. Minimal Superkeys are called

a. Schema keys

b. Candidate keys

c. Domain keys

d. Attribute keys

Answer: (b).Candidate keys

1. Which of the following is correct regarding Aggregate functions?

a. it takes a list of values and return a single values as result


b. it takes a list of values and return a list of values as result

c. it takes a single value and returns a list of values as result

d. it takes a single value and returns a single value as result

Answer: (a).it takes a list of values and return a single values as result

2. Which of the following option is use to retrieval of data?

a. Stack

b. Data Structure

c. Linked list

d. Query

Answer: (d).Query

3. Establishing limits on allowable property values, and specifying a set of acceptable, predefined options tha
of:

a. Attributes

b. Data integrity constraints

c. Method constraints

d. Referential integrity constraints

Answer: (b).Data integrity constraints

4. ______ is a special type of integrity constraint that relates two relations & maintains consistency across th

a. Entity Integrity Constraints

b. Referential Integrity Constraint


c. Domain Integrity Constraints

d. Domain Constraints

Answer: (b).Referential Integrity Constraint

5. Which of the following is a physical storage media ?

a. Tape Storage

b. Optical Storage

c. Flash memory

d. All of the mentioned

Answer: (d).All of the mentioned

6. Which of the following creates a virtual relation for storing the query ?

a. Function

b. View

c. Procedure

d. None of the mentioned

7. Which of the following is the syntax for views where v is view name ?

a. Create view v as “query name”;

b. Create “query expression” as view;

c. Create view v as “query expression”;

d. Create view “query expression”;


Answer: (c).Create view v as “query expression”;

1. Disadvantages of File systems to store data is:

a. Data redundancy and inconsistency

b. Difficulty in accessing data

c. Data isolation

d. All of the above

Answer: (d).All of the above

2. Which level of RAID refers to disk mirroring with block striping?

a. RAID level 1

b. RAID level 2

c. RAID level 0

d. RAID level 3

Answer: (a).RAID level 1

3. Optical disk technology uses

a. Helical scanning

b. DAT

c. a laser beam

d. RAID

Answer: (d).RAID
1. State true or false: SQL specifies a way of mentioning functional dependencies

a. True

b. False

c. May be

d. Can't say

Answer: (b).False

2. State true or false: Most current database systems do not support constraints on materialized view

a. True

b. False

c. May be

d. Can't say

Answer: (a).True

3. Multi valued dependencies are also called as __________

a. Equality generating dependencies

b. Tuple generating dependencies

c. Multi-purpose dependencies

d. None of the mentioned

Answer: (b).Tuple generating dependencies

4. Functional dependencies are sometimes referred to as ________

a. Equality generating dependencies


b. Tuple generating dependencies

c. Multi-purpose dependencies

d. None of the mentioned

Answer: (a).Equality generating dependencies

5. The _______ is a set of all functional and multi values dependencies implied by a set of functional depend

a. Star

b. Closure

c. Derivation

d. Evolution

Answer: (b).Closure

6. State true or false: If a relational schema is in _______ NF and A is a subset of R and B is also a subset o
values dependency.

a. 1

b. 2

c. 3

d. 4

Answer: (d).4

7. Which of the following normal forms does not exist?

a. BCNF

b. PJNF
c. 5NF

d. None of the mentioned

Answer: (d).None of the mentioned

1. The SQL database language includes statements for:

a. Database definition.

b. Database manipulation.

c. Database control.

d. All of the above.

Answer: (d).All of the above.

2. A command to remove a relation from an SQL database

a. Delete table table name

b. Drop table table name

c. Erase table table name

d. Alter table table name

Answer: (b).Drop table table name

3. Which SQL Query is use to remove a table and all its data from the database?

a. Create Table

b. Alter Table

c. Drop Table

d. None of these
Answer: (c).Drop Table

4. A type of query that is placed within a WHERE or HAVING clause of another query is called

a. Super query

b. Sub query

c. Master query

d. Multi-query

Answer: (b).Sub query

5. Aggregate functions are functions that take a ___________ as input and return a single value.

a. Collection of values

b. Single value

c. Aggregate value

d. Both a & b

6. Select __________ from instructor where dept name= ’Comp. Sci.’;


Which of the following should be used to find the mean of the salary ?

a. Mean(salary)

b. Avg(salary)

c. Sum(salary)

d. Count(salary)
Answer: (b).Avg(salary
Oral Questions and Answers (DBMS LAB)

Questions & Answers- DBMS


https://career.guru99.com/top-50-database-interview-questions/

1) Define Database.
A prearranged collection of figures known as data is called database.

2) What is DBMS?

Database Management Systems (DBMS) are applications designed especially which enable user
interaction with other applications.

3) What are the various kinds of interactions catered by DBMS?

The various kind of interactions catered by DBMS are:

• Data definition
• Update
• Retrieval
• Administration

4) Segregate database technology’s development.

The development of database technology is divided into:

• Structure or data model


• Navigational model
• SQL/ relational model

5) Who proposed the relational model?

Edgar F. Codd proposed the relational model in 1970.

6) What are the features of Database language?

A database language may also incorporate features like:


DBMS-specific Configuration and management of storage engine
Computations to modification of query results by computations, like summing, counting,
averaging, grouping, sorting and cross-referencing Constraint enforcement Application
Programming Interface

7) What do database languages do?

As special-purpose languages, they have:

• Data definition language


• Data manipulation language
• Query language

8) Define database model.

A data model determining fundamentally how data can be stored, manipulated and organised and
the structure of the database logically is called database model.
Oral Questions and Answers (DBMS LAB)

9) What is SQL?

Structured Query Language (SQL) being ANSI standard language updates database and commands
for accessing.

10) Enlist the various relationships of database.

The various relationships of database are:

• One-to-one: Single table having drawn relationship with another table having similar kind
of columns.
• One-to-many: Two tables having primary and foreign key relation.
• Many-to-many: Junction table having many tables related to many tables.

11) Define Normalization.

Organized data void of inconsistent dependency and redundancy within a database is called
normalization.

12) Enlist the advantages of normalizing database.

Advantages of normalizing database are:

• No duplicate entries
• Saves storage space
• Boasts the query performances.

13) Define Denormalization.

Boosting up database performance, adding of redundant data which in turn helps rid of complex
data is called denormalization.

14) Define DDL and DML.

Managing properties and attributes of database is called Data Definition Language(DDL).

Manipulating data in a database such as inserting, updating, deleting is defined as Data


Manipulation Language. (DML)

15) Enlist some commands of DDL.

They are:

CREATE:

Create is used in the CREATE TABLE statement. Syntax is:

CREATE TABLE [column name] ( [column definitions] ) [ table parameters]

ALTER:

It helps in modification of an existing object of database. Its syntax is:


Oral Questions and Answers (DBMS LAB)

ALTER objecttype objectname parameters.

DROP:

It destroys an existing database, index, table or view. Its syntax is:

DROP objecttype objectname.

16) Define Union All operator and Union.

Full recordings of two tables is Union All operator.


A distinct recording of two tables is Union.

17) Define cursor.

A database object which helps in manipulating data row by row representing a result set is called
cursor.

18) Enlist the cursor types.

They are:

• Dynamic: it reflects changes while scrolling.


• Static: doesn’t reflect changes while scrolling and works on recording of snapshot.
• Keyset: data modification without reflection of new data is seen.

19) Enlist the types of cursor.

They types of cursor are:

• Implicit cursor: Declared automatically as soon as the execution of SQL takes place without
the awareness of the user.
• Explicit cursor: Defined by PL/ SQL which handles query in more than one row.

20) Define sub-query.

A query contained by a query is called Sub-query.

21) Why is group-clause used?

Group-clause uses aggregate values to be derived by collecting similar data.

22) Compare Non-clustered and clustered index

Both having B-tree structure, non-clustered index has data pointers enabling one table many non-
clustered indexes while clustered index is distinct for every table.

23) Define Aggregate functions.

Functions which operate against a collection of values and returning single value is called
aggregate functions
Oral Questions and Answers (DBMS LAB)

24) Define Scalar functions.

Scalar function is depended on the argument given and returns sole value.

25) What restrictions can you apply when you are creating views?

Restrictions that are applied are:

• Only the current database can have views.


• You are not liable to change any computed value in any particular view.
• Integrity constants decide the functionality of INSERT and DELETE.
• Full-text index definitions cannot be applied.
• Temporary views cannot be created.
• Temporary tables cannot contain views.
• No association with DEFAULT definitions.
• Triggers such as INSTEAD OF is associated with views.

26) Define “correlated subqueries”.

A ‘correlated subquery’ is a sort of sub query but correlated subquery is reliant on another query
for a value that is returned. In case of execution, the sub query is executed first and then the
correlated query.

27) Define Data Warehousing.

Storage and access of data from the central location in order to take some strategic decision is
called Data Warehousing. Enterprise management is used for managing the information whose
framework is known as Data Warehousing.

28) Define Join and enlist its types.

Joins help in explaining the relation between different tables. They also enable you to select data
with relation to data in another table.

The various types are:

• INNER JOINs: Blank rows are left in the middle while more than equal to two tables are
joined.
• OUTER JOINs: Divided into Left Outer Join and Right Outer Join. Blank rows are left at the
specified side by joining tables in other side.

Other joins are CROSS JOINs, NATURAL JOINs, EQUI JOIN and NON-EQUI JOIN.

29) What do you mean by Index hunting?

Indexes help in improving the speed as well as the query performance of database. The procedure
of boosting the collection of indexes is named as Index hunting.
Oral Questions and Answers (DBMS LAB)

Questions & Answers- MySQL


https://career.guru99.com/top-50-mysql-interview-questions-answers/

https://www.javatpoint.com/mysql-interview-questions

1. What is MySQL?

MySQL is an open source DBMS which is built, supported and distributed by MySQL AB (now
acquired by Oracle)

2. What are the technical features of MySQL?

MySQL database software is a client or server system which includes

• Multithreaded SQL server supporting various client programs and libraries


• Different backend
• Wide range of application programming interfaces and
• Administrative tools.

3. Why MySQL is used?

MySQL database server is reliable, fast and very easy to use. This software can be downloaded as
freeware and can be downloaded from the internet.

4. What are Heap tables?

HEAP tables are present in memory and they are used for high speed storage on temporary

basis.

• BLOB or TEXT fields are not allowed

• Only comparison operators can be used =, <,>, = >,=<

• AUTO_INCREMENT is not supported by HEAP tables

• Indexes should be NOT NULL

5. What is the default port for MySQL Server?

The default port for MySQL server is 3306.

6. What are the advantages of MySQL when compared with Oracle?

• MySQL is open source software which is available at any time and has no cost involved.
• MySQL is portable
• GUI with command prompt.
• Administration is supported using MySQL Query Browser
Oral Questions and Answers (DBMS LAB)

7. Difference between CHAR and VARCHAR?

Following are the differences between CHAR and VARCHAR:

• CHAR and VARCHAR types differ in storage and retrieval


• CHAR column length is fixed to the length that is declared while creating table. The length
value ranges from 1 and 255
• When CHAR values are stored then they are right padded using spaces to specific length.
Trailing spaces are removed when CHAR values are retrieved.

8. Give string types available for column?

The string types are:

• SET
• BLOB
• ENUM
• CHAR
• TEXT
• VARCHAR

9. How to get current MySQL version

SELECT VERSION ();

10. What are the drivers in MySQL?

• PHP Driver
• JDBC Driver
• ODBC Driver
• C WRAPPER
• PYTHON Driver
• PERL Driver
• RUBY Driver
• CAP11PHP Driver
• Ado.net5.mxj

11. What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?

TIMESTAMP column is updated with Zero when the table is created. UPDATE
CURRENT_TIMESTAMP modifier updates the timestamp field to current time whenever there is a
change in other fields of the table.

12. What is the difference between primary key and candidate key?
Every row of a table is identified uniquely by primary key. There is only one primary key for a
table.

Primary Key is also a candidate key. By common convention, candidate key can be designated as
primary and which can be used for any foreign key references.

13. What, if a table has one column defined as TIMESTAMP?

Timestamp field gets the current timestamp whenever the row gets altered.
Oral Questions and Answers (DBMS LAB)

14. What happens when the column is set to AUTO INCREMENT and if you reach maximum
value in the table?

It stops incrementing. Any further inserts are going to produce an error, since the key has been
used already.

15. How can we find out which auto increment was assigned on Last insert?

LAST_INSERT_ID will return the last value assigned by Auto_increment and it is not required to
specify the table name.

16. How can you see all indexes defined for a table?

Indexes are defined for the table by:

SHOW INDEX FROM <tablename>;

17. What do you mean by % and _ in the LIKE statement?

% corresponds to 0 or more characters, _ is exactly one character in the LIKE statement.

18. What is the difference between NOW() and CURRENT_DATE()?

NOW() command is used to show current year, month, date with hours, minutes and seconds
while CURRENT_DATE() shows the current year with month and date only.

19. What is a trigger in MySQL?

A trigger is a set of codes that executes in response to some events.

20. How many Triggers are possible in MySQL?

There are six Triggers allowed to use in MySQL database.


1. Before Insert
2. After Insert
3. Before Update
4. After Update
5. Before Delete
6. After Delete

21. What is the difference between TRUNCATE and DELETE in MySQL?

The DELETE command is used to delete data from a table. It only deletes the rows of data from
the table while, truncate is very dangerous command and should be used carefully because it
deletes every row permanently from a table.
Oral Questions and Answers (DBMS LAB)

Questions & Answers- NoSQL


https://intellipaat.com/interview-question/no-sql-interview-questions/

1. Compare NoSQL & RDBMS

Criteria NoSQL RDBMS


Data format Does not follow any order Organized and structured
Scalability Very Good Average
Querying Limited as no Join Clause Using SQL
Storage Key-Value Pair, document, column Data & relationship stored in
mechanism storage, etc. different tables

2. What is NoSQL?

NoSQL encompasses a wide variety of different database technologies that were developed in
response to a rise in the volume of data stored about users, objects and products. The frequency in
which this data is accessed, and performance and processing needs. Relational databases, on the
other hand, were not designed to cope with the scale and agility challenges that face modern
applications, nor were they built to take advantage of the cheap storage and processing power
available today.

3. What are the features of NoSQL?

When compared to relational databases, NoSQL databases are more scalable and provide superior
performance, and their data model addresses several issues that the relational model is not
designed to address:

• Large volumes of structured, semi-structured, and unstructured data


• Agile sprints, quick iteration, and frequent code pushes
• Object-oriented programming that is easy to use and flexible
• Efficient, scale-out architecture instead of expensive, monolithic architecture

Questions & Answers- MongoDB


http://www.guru99.com/mongodb-interview-questions.html

1) Explain what is MongoDB?

Mongo-DB is a document database which provides high performance, high availability and easy
scalability.

2) What is “Namespace” in MongoDB?

MongoDB stores BSON (Binary Interchange and Structure Object Notation) objects in the
collection. The concatenation of the collection name and database name is called a namespace.
Oral Questions and Answers (DBMS LAB)

3) What is sharding in MongoDB?

The procedure of storing data records across multiple machines is referred as Sharding. It is a
MongoDB approach to meet the demands of data growth. It is the horizontal partition of data in a
database or search engine. Each partition is referred as shard or database shard.

4) How can you see the connection used by Mongos?

To see the connection used by Mongos use db_adminCommand (“connPoolStats”);

5) Explain what is a replica set?

A replica set is a group of mongo instances that host the same data set. In replica set, one node is
primary, and another is secondary. From primary to the secondary node all data replicates.

6) How replication works in MongoDB?

Across multiple servers, the process of synchronizing data is known as replication. It provides
redundancy and increase data availability with multiple copies of data on different database
server. Replication helps in protecting the database from the loss of a single server.

7) While creating Schema in MongoDB what are the points need to be taken in
consideration?

Points need to be taken in consideration are

• Design your schema according to user requirements


• Combine objects into one document if you use them together. Otherwise, separate them
• Do joins while write, and not when it is on read
• For most frequent use cases optimize your schema
• Do complex aggregation in the schema

8) What is the syntax to create a collection and to drop a collection in MongoDB?

• Syntax to create collection in MongoDB is db.createCollection(name,options)


• Syntax to drop collection in MongoDB is db.collection.drop()

9) Explain what is the role of profiler in MongoDB?

MongoDB database profiler shows performance characteristics of each operation against the
database. You can find queries using the profiler that are slower than they should be.

10) Explain can you move old files in the moveChunk directory?

Yes, it is possible to move old files in the moveChunk directory, during normal shard balancing
operations these files are made as backups and can be deleted once the operations are done.

11) To do safe backups what is the feature in MongoDB that you can use?

Journaling is the feature in MongoDB that you can use to do safe backups.
Oral Questions and Answers (DBMS LAB)

12) Mention what is Objecld composed of?

Objectld is composed of

• Timestamp
• Client machine ID
• Client process ID
• 3 byte incremented counter

13) Mention what is the command syntax for inserting a document?

For inserting a document command syntax is database.collection.insert (document).

14) Mention how you can inspect the source code of a function?

To inspect a source code of a function, without any parentheses, the function must be invoked.

15) What is the command syntax that tells you whether you are on the master server or
not? And how many master does MongoDB allow?

Command syntax Db.isMaster() will tell you whether you are on the master server or not.
MongoDB allows only one master server, while couchDB allows multiple masters.

16) Mention the command syntax that is used to view Mongo is using the link?

The command syntax that is used to view mongo is using the link is
db._adminCommand(“connPoolStats.”)

17) Explain what are indexes in MongoDB?

Indexes are special structures in MongoDB, which stores a small portion of the data set in an easy
to traverse form. Ordered by the value of the field specified in the index, the index stores the value
of a specific field or set of fields.

18) Mention what is the basic syntax to use index in MongoDB?

The basic syntax to use in MongoDB is >db.COLLECTION_NAME.ensureIndex ( {KEY:1} ). In here


the key is the the name of the COLUMN (or KEY:VALUE pair) which is present in the documents.

19) Explain what is GridFS in MongoDB?

For storing and retrieving large files such as images, video files and audio files GridFS is used. By
default, it uses two files fs.files and fs.chunks to store the file’s metadata and the chunks.

20) What are alternatives to MongoDB?

Cassandra, CouchDB, Redis, Riak, Hbase are a few good alternatives.


1) This is not a application layer protocol
a) HTTP
b) SMTP
c) FTP
d) TCP
ANSWER: d

2)The packet of information at the application layer is called


a) Packet
b) Message
c) Segment
d) Frame
ANSWER: B

3) This is one of the architecture paradigm


a) Peer to peer
b) Client-server
c) HTTP
d) Both a and b
Answer: d

4) Application developer has permission to decide the following on transport layer side
a) Transport layer protocol
b) Maximum buffer size
c) Both of the mentioned
d) None of the mentioned
Answer: c

5) Application layer offers _______ service


a) End to end
b) Process to process
c) Both of the mentioned
d) None of the mentioned
Answer: a

6) E-mail is
a) Loss-tolerant application
b) Bandwidth-sensitive application
c) Elastic application
d) None of the mentioned
Answer: c

7) Pick the odd one out


a) File transfer
b) File download
c) E-mail
d) Interactive games
Answer: d

8) Which of the following is an application layer service ?


a) Network virtual terminal
b) File transfer, access, and management
c) Mail service
d) All of the mentioned
Answer: d

9) To deliver a message to the correct application program running on a host, the _______
address must be consulted
a) IP
b) MAC
c) Port
d) None of the mentioned
Answer: c

10) This is a time-sensitive service


a) File transfer
b) File download
c) E-mail
d) Internet telephony
Answer: d

11) Transport services available to applications in one or another form


a) Reliable data transfer
b) Timing
c) Security
d) All of the mentioned
Answer: d

12) Electronic mail uses this Application layer protocol


a) SMTP
b) HTTP
c) FTP
d) SIP

Answer: a

13. The ____ translates internet domain and host names to IP address.
a) domain name system
b) routing information protocol
c) network time protocol
d) internet relay chat
Answer:a

13. Which one of the following allows a user at one site to establish a connection to another site
and then pass keystrokes from local host to remote host?
a) HTTP
b) FTP
c) telnet
d) none of the mentioned
Answer:c

14. Application layer protocol defines


a) types of messages exchanged
b) message format, syntax and semantics
c) rules for when and how processes send and respond to messages
d) all of the mentioned

Answer:d

15. Which one of the following protocol delivers/stores mail to reciever server?
a) simple mail transfer protocol
b) post office protocol
c) internet mail access protocol
d) hypertext transfer protocol
Answer:a

16. The ASCII encoding of binary data is called


a) base 64 encoding
b) base 32 encoding
c) base 16 encoding
d) base 8 encoding
Answer:a

17. Which one of the following is an internet standard protocol for managing devices on IP
network?
a) dynamic host configuration protocol
b) simple newtwork management protocol
c) internet message access protocol
d) media gateway protocol
Answer:b
18. Which one of the following is not an application layer protocol?
a) media gateway protocol
b) dynamic host configuration protocol
c) resource reservation protocol
d) session initiation protocol
Answer:c

19. Which protocol is a signalling communication protocol used for controlling multimedia
communication sessions?
a) session initiation protocol
b) session modelling protocol
c) session maintenance protocol
d) none of the mentioned
Answer:a

20. Which one of the following is not correct?


a) application layer protocols are used by both source and destination devices during a
communication session
b) application layer protocols implemented on the source and destination host must match
c) both (a) and (b)
d) none of the mentioned
Answer:c

21. When displaying a web page, the application layer uses the
a) HTTP protocol
b) FTP protocol
c) SMTP protocol
d) none of the mentioned
Answer:a

22. Which DNS client maps an address to a name or a name to an address especially when
required by a host?

a. Resolver
b. Mapper
c. Primary Server
d. Secondary Server
ANSWER: a

23. Which intermediaries are more likely to get involved during the transfer function of an e-mail
system?

a. Storage and forwarding of e-mail for certain addresses


b. Act as gateways to other e-mail or messaging systems
c. Both a & b
d. None of the above
ANSWER: c

24. Which among the below specified illustrations belongs to the category of GUI based user
agents?

a. mail
b. pine
c. Outlook & Netscape
d. All of the above
ANSWER: c

25. Which phase/s of POP3 allow/s an user agent to retrieve the messages as well as to mark
the messages for deletion purpose?

a. Authorization Phase
b. Transaction Phase
c. Update Phase
d. All of the above
ANSWER: b

Application Layer - MCQs with Answer

Topics >>
Electronics and Communication Engineering >>
Computer Network -07/09/15

« Previous
Next »

Application Layer - MCQs with Answer

1. Which DNS client maps an address to a name or a name to an address especially when
required by a host?

a. Resolver
b. Mapper
c. Primary Server
d. Secondary Server

View Answer / Hide Answer


ANSWER: a. Resolver

2. Which application-level protocol plays a crucial role in carrying out the data definition and
manipulation in addition to X-500 features?

a. TCP
b. LDAP
c. FTP
d. None of the above

View Answer / Hide Answer

3. Which intermediaries are more likely to get involved during the transfer function of an e-mail
system?

a. Storage and forwarding of e-mail for certain addresses


b. Act as gateways to other e-mail or messaging systems
c. Both a & b
d. None of the above

View Answer / Hide Answer

ANSWER: c. Both a & b

4. Which among the below specified illustrations belongs to the category of GUI based user
agents?

a. mail
b. pine
c. Outlook & Netscape
d. All of the above

View Answer / Hide Answer

ANSWER: c. Outlook & Netscape

5. Which phase/s of POP3 allow/s an user agent to retrieve the messages as well as to mark
the messages for deletion purpose?
a. Authorization Phase
b. Transaction Phase
c. Update Phase
d. All of the above

View Answer / Hide Answer

ANSWER: b. Transaction Phase

26. Consider the assertions given below. Which among them prove to be beneficial for
Persistent HTTP connections?

A. Reduction in latency over the sub-sequent requests

B. Pipeline-oriented connection over the requests and responses

C. Increase in number of packets due to TCP opens

D. Prevention in opening and closing of some TCP connections

a. A & B
b. C & D
c. A & C
d. B & B

ANSWER: a

27. Which URL method of HTTP performs similar function as that of PUT method only with an
exception of request comprising a list of differences that exhibit the necessity to get
implemented in the existing file?

a. POST
b. GET
c. PATCH
d. OPTION
ANSWER: c

28. Which language in WWW specifies a web's way by describing three-dimensional objects?

a. HTML
b. VRML
c. XML
d. UML
ANSWER: b

29. Which field of cookie in WWW represents the server's directory structure by identifying the
utilization of part associated with server's file tree?

a. Domain
b. Path
c. Content
d. Secure

ANSWER: b

30. Which among the below mentioned protocols provides a mechanism of acquiring an IP
address without manual intervention in addition to plug and play type of networking?

a. BOOTP
b. DHCP
c. Both a & b
d. None of the above
ANSWER: b
Computer Networks II (CS - 343)
Unit 1 Multiple Choice Quiz

1: What is the hexadecimal equivalent of the Ethernet address 01011010 00010001


01010101 00011000 10101010 00001111?
a. 5A:88:AA:18:55:F0 b. 5A:81:BA:81:AA:0F
c. 5A:18:5A:18:55:0F d. 5A:11:55:18:AA:0F
The correct answer is d

2: If an Ethernet destination address is 07:01:02:03:04:05, then this is a ______


address.
a. unicast b. multicast
c. broadcast d. any of the above
The correct answer is b

3: If an Ethernet destination address is 08:07:06:05:44:33, then this is a ______


address.
a. unicast b. multicast
c. broadcast d. any of the above
The correct answer is a

4: Which of the following could not be an Ethernet unicast destination?


a. 43:7B:6C:DE:10:00 b. 44:AA:C1:23:45:32
c. 46:56:21:1A:DE:F4 d. 48:32:21:21:4D:34
The correct answer is a

5: Which of the following could not be an Ethernet multicast destination?


a. B7:7B:6C:DE:10:00 b. 7B:AA:C1:23:45:32
c. 7C:56:21:1A:DE:F4 d. 83:32:21:21:4D:34
The correct answer is c

6: _______ is the most widely used local area network protocol.


a. Token Ring b. Token Bus
c. Ethernet d. none of the above
The correct answer is c

7: The IEEE 802.3 Standard defines _________ CSMA/CD as the access method
for first-generation 10-Mbps Ethernet.
a. 1-persistent b. p-persistent
c. non-persistent d. none of the above
The correct answer is a

8: The _______ layer of Ethernet consists of the LLC sublayer and the MAC
sublayer.
a. data link b. physical
c. network d. none of the above
The correct answer is a

9: The _____ sublayer is responsible for the operation of the CSMA/CD access
method and framing.
a. LLC b. MII
c. MAC d. none of the above
The correct answer is c

10: Each station on an Ethernet network has a unique _______ address imprinted
on its network interface card (NIC).
a. 5-byte b. 32-bit
c. 48-bit d. none of the above
The correct answer is c

11: The minimum frame length for 10-Mbps Ethernet is _______bytes.


a. 32 b. 80
c. 128 d. none of the above
The correct answer is d

12: The maximum frame length for 10-Mbps Ethernet is ________ bytes.
a. 1518 b. 1500
c. 1200 d. none of the above
The correct answer is a

13: _________ uses thick coaxial cable.


a. 10Base5 b. 10Base2
c. 10Base-T d. 10Base-F
The correct answer is a

14: __________ uses thin coaxial cable.


a. 10Base5 b. 10Base2
c. 10Base-T d. 10Base-F
The correct answer is b

15: _________ uses four twisted-pair cables that connect each station to a common
hub.
a. 10Base5 b. 10Base2
c. 10Base-T d. 10Base-F
The correct answer is c

16: ________ uses fiber-optic cable.


a. 10Base5 b. 10Base2
c. 10Base-T d. 10Base-F
The correct answer is d

17: Fast Ethernet has a data rate of ________Mbps.


a. 10 b. 100
c. 1000 d. 10,000
The correct answer is b

18: In _________, autonegotiation allows two devices to negotiate the mode or data
rate of operation.
a. Fast Ethernet b. Ten-Gigabit Ethernet
c. Gigabit Ethernet d. All of the above
The correct answer is d

19: __________ uses two pairs of twisted-pair cable.


a. 100Base-TX b. 100Base-FX
c. 100Base-T4 d. none of the above
The correct answer is a
20: _________ uses two fiber-optic cables.
a. 100Base-TX b. 100Base-FX
c. 100Base-T4 d. none of the above
The correct answer is b
21: _________ uses four pairs of voice-grade, or higher, twisted-pair cable.
a. 100Base-TX b. 100Base-FX
c. 100Base-T4 d. none of the above
The correct answer is c

22: Gigabit Ethernet has a data rate of ________Mbps.


a. 10 b. 100
c. 1000 d. 10,000
The correct answer is c

23: Gigabit Ethernet access methods include _______ mode.


a. half-duplex b. full-duplex
c. both (a) and (b) d. neither (a) nor (b)
The correct answer is c

24: __________ uses two optical fibers and a short-wave laser source,
a. 1000Base-SX b. 1000Base-LX
c. 1000Base-T d. none of the above
The correct answer is a

25: __________uses two optical fibers and a long-wave laser source.


a. 1000Base-SX b. 1000Base-LX
c. 1000Base-T d. none of the above
The correct answer is b

26: __________ uses four twisted pairs.


a. 1000Base-SX b. 1000Base-LX
c. 1000Base-T d. none of the above
The correct answer is c
27: ________ uses short-wave 850-nm multimode fiber.
a. 10GBase-S b. 10GBase-L
c. 10GBase-E d. none of the above
The correct answer is a

28: ________uses long-wave 1310-nm single mode fiber.


a. 10GBase-S b. 10GBase-L
c. 10GBase-E d. none of the above
The correct answer is b

29: ________ uses 1550-mm single mode fiber.


a. 10GBase-S b. 10GBase-L
c. 10GBase-E d. none of the above
The correct answer is c

30: In Ethernet addressing, if the least significant bit of the first byte is 0, the address
is _________.
a. unicast b. multicast
c. broadcast d. none of the above
The correct answer is a

31: In Ethernet addressing, if the least significant bit of the first byte is 1, the address
is _________.
a. unicast b. multicast
c. broadcast d. none of the above
The correct answer is b

32: In Ethernet addressing, if all the bits are 1s, the address is _________.
a. unicast b. multicast
c. broadcast d. none of the above
The correct answer is c

33: ______defines a protocol data unit (PDU) that is somewhat similar to that of
HDLC.
a. MAC b. LLC
c. LLU d. none of the above
The correct answer is b

34: The purpose of the _______ is to provide flow and error control for the upper-
layer protocols that actually demand these services
a. MAC b. LLC
c. LLU d. none of the above
The correct answer is b
35: In the Ethernet, the _______field is actually added at the physical layer and is
not (formally) part of the frame.
a. CRC b. preamble
c. address d. none of the above
The correct answer is b

36: In the Ethernet frame, the _______ field contains error detection information.
a. CRC b. preamble
c. address d. none of the above
The correct answer is a

37: Standard Ethernet (10-Mbps) uses _______ encoding


a. NRZ b. AMI
c. Manchester d. differential Manchester
The correct answer is c

38: 100Base-TX uses _________ block coding and ________ line coding.
a. 4B/5B; NRZ b. 8B/10B; NRZ
c. 4B/5B; MLT-3 d. 8B/10B; NRZ
The correct answer is c

39: 100Base-FX uses _________ block coding and ________ line coding.
a. 4B/5B; NRZ-I b. 8B/10B; NRZ
c. 4B/5B; MLT-3 d. 8B/10B; NRZ
The correct answer is a

40: 100Base-T4 uses ________ line coding.


a. NRZ b. 8B6T
c. MLT-3 d. Manchester
The correct answer is b

41: 1000Base-SX, 1000Base-LX, and 1000Base-CX use _________ block coding


and ________ line coding.
a. 4B/5B; NRZ b. 8B/10B; NRZ
c. 4B/5B; MLT-3 d. 8B/10B; NRZ
The correct answer is b

42: 1000Base-T uses ________ line coding.


a. 4D-PAM5 b. 8B6T
c. MLT-3 d. Manchester
The correct answer is a
1: IEEE has defined the specifications for a wireless LAN, called _______, which covers the
physical and data link layers.
a. IEEE 802.3
b. IEEE 802.5
c. IEEE 802.11
d. IEEE 802.2
The correct answer is c

2: In IEEE 802.11, a ___ is made of stationary or mobile wireless stations and an optional
central base station, known as the access point (AP).
a. ESS
b. BSS
c. CSS
d. none of the above
The correct answer is b

3: In IEEE 802.11, a BSS without an AP is called an _________.


a. an ad hoc architecture
b. an infrastructure network
c. either (a) or (b)
d. neither (a) nor (b)
The correct answer is a

4: In IEEE 802.11, a BSS with an AP is sometimes referred to as ____________.


a. an ad hoc architecture
b. an infrastructure network
c. either (a) or (b)
d. neither (a) nor (b)
The correct answer is b

5: In IEEE 802.11, communication between two stations in two different BSSs usually occurs
via two ________.
a. BSSs
b. ESSs
c. APs
d. none of the above
The correct answer is c

6: In IEEE 802.11, a station with ________ mobility is either stationary (not moving) or
moving only inside a BSS.
a. no-transition
b. BSS-transition
c. ESS-transition
d. none of the above
The correct answer is a
7: In IEEE 802.11, a station with ________mobility can move from one BSS to another, but
the movement is confined inside one ESS.
a. no-transition
b. BSS-transition
c. ESS-transition
d. none of the above
The correct answer is b

8: In IEEE 802.11, a station with ________ mobility can move from one ESS to another.
a. no-transition
b. BSS-transition
c. ESS-transition
d. none of the above
The correct answer is c

9: In IEEE 802.11, _______ is an optional access method that can be implemented in an


infrastructure network (not in an ad hoc network).
a. DCF
b. PCF
c. either (a) or (b)
d. neither (a) nor (b)
The correct answer is b

10: In IEEE 802.11, when a frame is going from one station in a BSS to another without
passing through the distribution system, the address flag is _____
a. 00
b. 01
c. 10
d. 11
The correct answer is a

11: In IEEE 802.11, when a frame is coming from an AP and going to a station, the address
flag is _______.
a. 00
b. 01
c. 10
d. 11
The correct answer is b

12: In IEEE 802.11, when a frame is going from a station to an AP, the address flag is
_____.
a. 00
b. 01
c. 10
d. 11
The correct answer is c
13: In IEEE 802.11, when a frame is going from one AP to another AP in a wireless
distribution system, the address flag is _____
a. 00
b. 01
c. 10
d. 11
The correct answer is d

14: The IEEE 802.11 standard for wireless LANs defines two services: ______ and
_______.
a. BSS; ASS
b. ESS; SSS
c. BSS; ESS
d. BSS; DCF
The correct answer is c

15: In IEEE 802.11, the access method used in the DCF sublayer is _________.
a. ALOHA
b. CSMA/CA
c. CSMA/CD
d. none of the above
The correct answer is b

16: In IEEE 802.11, the access method used in the PCF sublayer is ______.
a. contention
b. controlled
c. polling
d. none of the above
The correct answer is c

17: In IEEE 802.11, the ______ is a timer used for collision avoidance.
a. NAV
b. BSS
c. ESS
d. none of the above
The correct answer is a

18: In IEEE 802.11, the MAC layer frame has ______ fields.
a. four
b. five
c. six
d. none of the above
The correct answer is d
19: In IEEE 802.11, the addressing mechanism can include up to ______addresses.
a. four
b. five
c. six
d. none of the above
The correct answer is a

20: The original IEEE 802.11, uses _________.


a. FHSS
b. DSSS
c. OFDM
d. either (a) or (b)
The correct answer is d

21: The IEEE 802.11a, uses _________.


a. FHSS
b. DSSS
c. OFDM
d. either (a) or (b)
The correct answer is c

22: The IEEE 802.11b, uses _________.


a. FHSS
b. DSSS
c. OFDM
d. either (a) or (b)
The correct answer is b

23: The IEEE 802.11g, uses _________.


a. FHSS
b. DSSS
c. OFDM
d. either (a) or (b)
The correct answer is c

24: The original IEEE 802.11, has a data rate of _____Mbps.


a. 1
b. 6
c. 11
d. 22
The correct answer is a

25: IEEE 802.11a, has a data rate of _____Mbps.


a. 1
b. 2
c. 6
d. none of the above
The correct answer is c

26: IEEE 802.11b, has a data rate of _____Mbps.


a. 1
b. 2
c. 5.5
d. none of the above
The correct answer is c

27: IEEE 802.11g, has a data rate of _____Mbps.


a. 1
b. 2
c. 11
d. 22
The correct answer is d

28: The IEEE 802.11 wireless LANs use ________ types of frames.
a. four
b. five
c. six
d. none of the above
The correct answer is d

29: Bluetooth is a _______ technology that connects devices (called gadgets) in a small
area.
a. wired LAN
b. wireless LAN
c. VLAN
d. none of the above
The correct answer is b

30: A Bluetooth network is called a ________.


a. piconet
b. scatternet
c. bluenet
d. none of the above
The correct answer is a

31: In Bluetooth, multiple ________ form a network called a _________.


a. scatternet; piconets
b. piconets: scatternet
c. piconets: bluenet
d. bluenet; scatternet
The correct answer is b
32: A Bluetooth network consists of _____ primary device(s) and up to ____ secondary
devices.
a. one; five
b. five; three
c. two; six
d. one; seven
The correct answer is d

33: The RTS and CTS frames in CSMA/CA ____ solve the hidden station problem. The RTS
and CTS frames in CSMA/CA ____ solve the exposed station problem.
a. can; cannot
b. cannot; can
c. can; can
d. cannot; cannot
The correct answer is a

34: In Bluetooth, the current data rate is ____Mbps


a. 2
b. 5
c. 11
d. none of the above
The correct answer is d

35: In Bluetooth, the _______ layer is roughly equivalent to the physical layer of the Internet
model.
a. radio
b. baseband
c. L2CAP
d. none of the above
The correct answer is a

36: In Bluetooth, the _____layer is roughly equivalent to the MAC sublayer in LANs.
a. radio
b. baseband
c. L2CAP
d. none of the above
The correct answer is b

37: In Bluetooth, the L2CAP sublayer, is roughly equivalent to the LLC sublayer in LANs.
a. radio
b. baseband
c. L2CAP
d. none of the above
The correct answer is c
38: The access method in Bluetooth is ________.
a. FDMA
b. TDD-TDMA
c. CDMA
d. none of the above
The correct answer is b

39: In Bluetooth, the _____ link is used when avoiding latency (delay in data delivery) is
more important than integrity (error-free delivery).
a. SCO
b. ACL
c. ACO
d. SCL
The correct answer is a

40: In Bluetooth, the _____ link is used when data integrity is more important than avoiding
latency.
a. SCO
b. ACL
c. ACO
d. SCL
The correct answer is b

41: Bluetooth uses ______method in the physical layer to avoid interference from other
devices or other networks.
a. DSSS
b. FHSS
c. FDMA
d. none of the above
The correct answer is b
Computer Networks (CS: 343)
Unit 3 MCQs
1: An IPv4 address consists of _______ bits.
a. 4 b. 8
c. 32 d. 64
The correct answer is c

2: In IPv4, class _______ has the greatest number of addresses in each block.
a. A
b. B
c. C
d. D
The correct answer is a

3: Identify the class of the following IPv4 address: 4.5.6.7.


a. A
b. B
c. C
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
4: Identify the class of the following IPv4 address: 229.1.2.3.
a. A
b. B
c. D
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
5: Identify the class of the following IPv4 address: 191.1.2.3.
a. A
b. B
c. C
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
6: What is the result of ANDing 255 and 15?
a. 255
b. 15
c. 0
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
7: What is the result of ANDing 0 and 15?
a. 255
b. 15
c. 0
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
8: What is the result of ANDing 254 and 15?
a. 254
b. 14
c. 0
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
9: What is the result of ANDing 192 and 65?
a. 192
b. 65
c. 64
d. none of the above
The correct answer is c
Your answer is c
Feedback :
CORRECT
10: Which one is not a contiguous mask?
a. 255.255.255.254
b. 255.255.224.0
c. 255.148.0.0
d. all are
The correct answer is c
Your answer is c
Feedback :

CORRECT
11: The number of addresses in a class C block is _______.
a. 65,534
b. 16,777,216
c. 256
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
12: The number of addresses in a class B block is _______.
a. 65,536
b. 16,777,216
c. 256
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
13: The number of addresses in a class A block is _______.
a. 65,534
b. 16,777,216
c. 256
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
14: The number of addresses assigned to an organization in classless addressing _______.
a. can be any number
b. must be a multiple of 256
c. must be a power of 2
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
15: The first address assigned to an organization in classless addressing _______.
a. must be a power of 4
b. must be evenly divisible by the number of addresses
c. must belong to one of the A, B, or C classes
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
16: Which address could be the beginning address of a block of 32 classless addresses?
a. 2.4.6.5
b. 2.4.6.16
c. 2.4.6.64
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
17: Which address could be the beginning address of a block of 16 classless addresses?
a. 2.4.6.5
b. 2.4.6.15
c. 2.4.6.62
d. none of the above
The correct answer is d
Your answer is d
Feedback :

CORRECT
18: Which address could be the beginning address of a block of 256 classless addresses?
a. 2.4.6.5
b. 2.4.6.15
c. 2.4.6.0
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
19: What is the first address of a block of classless addresses if one of the addresses
is 12.2.2.76/27?
a. 12.2.2.0
b. 12.2.2.32
c. 12.2.2.64
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
20: What is the first address of a block of classless addresses if one of the addresses
is 12.2.2.76/10?
a. 12.0.0.0
b. 12.2.0.0
c. 12.2.2.2
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
21: What is the first address of a block of classless addresses if one of the addresses
is 12.2.2.127/28?
a. 12.2.2.0
b. 12.2.2.96
c. 12.2.2.112
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
22: Find the number of addresses in a block of classless addresses if one of the addresses
is 12.2.2.7/24.
a. 32
b. 64
c. 256
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
23: Find the number of addresses in a block of classless addresses if one of the addresses
is 12.2.2.7/30.
a. 2
b. 4
c. 8
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
24: What is the last address of a block of classless addresses if one of the addresses
is 12.2.2.127/28?
a. 12.2.2.16
b. 12.2.2.112
c. 12.2.2.127
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
25: What is the last address of a block of classless addresses if one of the addresses
is 12.2.2.6/30?
a. 12.2.2.2
b. 12.2.2.6
c. 12.2.2.7
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
26: An organization is granted a block; one address is 2.2.2.64/20. The organization needs
10 subnets. What is the subnet prefix length?
a. /20
b. /24
c. /25
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
27: An organization is granted a block; one address is 2.2.2.64/25. If the subnet prefix length
is /28, what is the maximum number of subnets?
a. 2
b. 4
c. 8
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
28: An organization is granted a block of classless addresses with the starting
address 199.34.76.64/28. How many addresses are granted?
a. 8
b. 16
c. 32
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
29: An organization is granted a block of classless addresses with the starting
address 199.34.76.128/29. How many addresses are granted?
a. 8
b. 16
c. 32
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
30: An organization is granted a block of classless addresses with the starting
address 199.34.32.0/27. How many addresses are granted?
a. 8
b. 16
c. 32
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
31: What is the default mask for class A in CIDR notation?
a. /9
b. /8
c. /16
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
32: What is the default mask for class B in CIDR notation?
a. /9
b. /8
c. /16
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
33: What is the default mask for class C in CIDR notation?
a. /24
b. /8
c. /16
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
34: In classless addressing, the ______ is another name for the common part of the address
range.
a. suffix
b. prefix
c. netid
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
35: In classless addressing, the _______ is the varying part (similar to the hostid).
a. suffix
b. prefix
c. hostid
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
36: In classless addressing, the prefix length defines the _____________.
a. netid
b. hostid
c. mask
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
37: In a block, the prefix length is /24; what is the mask?
a. 255.255.255.0
b. 255.255.242.0
c. 255.255.0.0
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
38: In a block, the prefix length is /15; what is the mask?
a. 255.254.0.0
b. 255.255.255.0
c. 255.255.255.128
d. none of the above
The correct answer is a
Your answer is a
Feedback :

CORRECT
39: In a block, the mask is 255.255.192.0; what is the prefix length?
a. /20
b. /28
c. /18
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
40: An IPv6 address is _________ bits long.
a. 32
b. 64
c. 128
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
41: An IPv6 address consists of ________ bytes (octets);
a. 4
b. 8
c. 16
d. none of the above
The correct answer is c
Your answer is c
Feedback :

CORRECT
42: To make addresses more readable, IPv6 specifies ____________notation.
a. dotted decimal
b. hexadecimal colon
c. both a and b
d. none of the above
The correct answer is b
Your answer is b
Feedback :
INCORRECT
43: In hexadecimal colon notation, a 128-bit address is divided into _______ sections, each
_____ hexadecimal digits in length.
a. 8: 2
b. 8: 3
c. 8: 4
d. none of the above
The correct answer is c
Your answer is a
Feedback :

CORRECT
44: An IPv6 address can have up to __________ colons.
a. 8
b. 7
c. 4
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
45: An IPv6 address can have up to __________ hexadecimal digits.
a. 16
b. 32
c. 8
d. none of the above
The correct answer is b
Your answer is b
Feedback :

CORRECT
46: In IPv6, _______ address defines a single computer.
a. a unicast
b. a multicast
c. an anycast
d. none of the above
The correct answer is a

47: In IPv6, ____ address defines a group of computers with addresses that have the same
prefix.
a. a unicast b. a multicast
c. an anycast d. none of the above
The correct answer is c

48: In IPv6, _________ address defines a group of computers.


a. a unicast b. a multicast
c. an anycast d. none of the above
The correct answer is b

49: In IPv6, the ________ prefix defines the purpose of the address.
a. type b. purpose
c. both a and b d. none of the above
The correct answer is a

50: In IPv6, the___________ address is generally used by a normal host as a unicast


address.
a. provider-based unicast b. link local
c. site local d. none of the above
The correct answer is a
Your answer is a

51: In IPv6, a _________address comprises 80 bits of zero, followed by 16 bits of one,


followed by the 32-bit IPv4 address.
a. link local b. site local
c. mapped d. none of the above
The correct answer is c

52: In IPv6, a ___________ address is an address of 96 bits of zero followed by 32 bits of


IPv4 address.
a. link local b. site local
c. mapped d. none of the above
The correct answer is d

53: In IPv6, a _______ address is used if a LAN uses the Internet protocols but is not
connected to the Internet for security reasons.
a. link local b. site local
c. mapped d. none of the above
The correct answer is a

54: In IPv6, a ______address is used if a site with several networks uses the Internet
protocols but is not connected to the Internet for security reasons.
a. link local b. site local
c. mapped d. none of the above
The correct answer is b
Computer Networking II

MKSSS's Shri Siddhivinayak Mahila Mahavidyalaya , Karve Nagar, Pune-52


Department of Computer Science TYBSc(CS) SEM II CS-343 Computer Networking II Question Bank
Sr. Question Option 1 Option 2 Option 3 Option 4
No.
1 Physical or logical arrangement of network is ______ Topology Routing Networking Control
2 Which network topology requires a central controller or hub Star Mesh Ring Bus
3 _______ topology requires a multipoint connection. Star Mesh Ring Bus
4 Data communication system spanning states, countries, or the whole world is LAN WAN MAN PAN
________
5 Data communication system within a building or campus is________ LAN WAN MAN PAN
6 WAN stands for __________ World area network Wide area network Web area network Web access network
7 In TDM, slots are further divided into __________ Seconds Frames Packets Bits
8 WLANs use high power levels and generally require a license for spectrum true FALSE
use.
9 Which of the following specifies a set of media access control (MAC) and IEEE 802.16 IEEE 802.3 IEEE 802.11 IEEE 802.15
physical layer specifications for implementing WLANs?
10 The network layer is concerned with __________ of data. bits frames packets bytes
11 Which one of the following is not a function of network layer? routing inter-networking congestion control error control
12 A 4 byte IP address consists of __________ only network address only host address network address & host network address & MAC
address address
13 In virtual circuit network each packet contains ___________ full source and destination a short VC number only source address only destination address
address
14 Which of the following is not correct in relation to multi-destination routing? is same as broadcast contains the list of all data is not sent by packets there are multiple receivers
routing destinations
15 A subset of a network that includes all the routers but contains no loops is spanning tree spider structure spider tree special tree
called ________
16 Which one of the following algorithm is not used for congestion control? traffic aware routing admission control load shedding routing information protoco
17 The network layer protocol for internet is ________ ethernet internet protocol hypertext transfer protocol file transfer protocol
18 Which is a reason for avoiding doing route redistribution on two routers Higher cost of two routers Routing feedback Cisco IOS incompatibility Not possible to use two
between the same two routing domains? routers
19 Which of the following is false with respect to TCP? Connection-oriented Process-to-process Transport layer protocol Unreliable
20 In TCP, sending and receiving data is done as ______ Stream of bytes Sequence of characters Lines of data Packets
21 TCP process may not write and read data at the same speed. So we need Packets Buffers Segments Stack
__________ for storage.
22 TCP groups a number of bytes together into a packet called _______ Packets Buffers Segments Stack
23 Communication offered by TCP is ________ Full-duplex Half-duplex Semi-duplex Byte by byte

1
Computer Networking II

24 To achieve reliable transport in TCP, ___________ is used to check the safe Packet Buffer Segments Acknowledgment
and sound arrival of data.
25 In segment header, sequence number and acknowledgement number fields Byte number Buffer number Segment number Acknowledgment
refer to _______
26 Suppose a TCP connection is transferring a file of 1000 bytes. The first byte is 10000 10001 12001 11001
numbered 10001. What is the sequence number of the segment if all data is
sent in only one segment?
27 Bytes of data being transferred in each connection are numbered by TCP. Fixed number Random sequence of 0’s One Sequence of zero’s and
These numbers start with a ________ and 1’s one’s
28 The value of acknowledgement field in a segment defines _______ sequence number of the total number of bytes to sequence number of the sequence of zeros and ones
byte received previously receive next byte to be received
29 In the layer hierarchy as the data packet moves from the upper to the lower Added Removed Rearranged Modified
layers, headers are ___________
30 Communication between a computer and a keyboard involves Automatic Half-duplex Full-duplex Simplex
______________ transmission
31 Which of this is not a network edge device? PC Smartphones Servers Switch
32 Protocols are set of rules to govern _________ Communication Standard Metropolitan Bandwidth
communication
33 An internet is a __________ Collection of WANS Network of networks Collection of LANS Collection of identical
LANS and WANS
34 Checksum is used in Internet by several protocols although not at the Session layer Transport layer Network layer Data link layer
_________
35 In version field of IPv4 header, when machine is using some other version of Discarded Accepted Interpreted Interpreted incorrectly
IPv4 then datagram is ______
36 Network layer at source is responsible for creating a packet from data coming Station Link Node Protocol
from another ______
37 Header of datagram in IPv4 has _________ 0 to 20 bytes 20 to 40 bytes 20 to 60 bytes 20 to 80 bytes
38 In IPv4 layer, datagram is of ________ Fixed length Variable length Global length Zero length
39 In IPv4, service type of service in header field, first 3 bits are called ______ Type of service Code bits Sync bits Precedence bits
40 Which is a link layer protocol? ARP TCP UDP HTTP
41 Which of the following is false with respect to UDP? Connection-oriented Unreliable ransport layer protocol Low overhead
42 Beyond IP, UDP provides additional services such as _______ Routing and switching Sending and receiving of Multiplexing and Demultiplexing and error
packets demultiplexing checking
43 What is the main advantage of UDP? More overload Reliable Low overhead Fast
44 The ______ field is used to detect errors over the entire user datagram. udp header checksum source port destination port
45 Which of the following is not applicable for IP? Error reporting Handle addressing Datagram format Packet handling
conventions conventions

2
Computer Networking II

46 Which of the following field in IPv4 datagram is not related to fragmentation Flags Offset TOS Identifier
47 Which of these is not applicable for IP protocol? is connectionless offer reliable service offer unreliable service does not offer error
reporting
48 Which field helps to check rearrangement of the fragments? offset flag ttl identifer
49 IP Security operates in which layer of the OSI model? Network Transport Application Physical
50 Two broad categories of congestion control are Open-loop and Closed-loop Open-control and Closed- Active control and Passive Active loop and Passive
control control loop
51 In open-loop control, policies are applied to _________ Remove after congestion Remove after sometime Prevent before congestion Prevent before sending
occurs occurs packets
52 . Retransmission of packets must not be done when ____ Packet is lost Packet is corrupted Packet is needed Packet is error-free
53 Closed-Loop control mechanisms try to _____ Remove after congestion Remove after sometime Prevent before congestion Prevent before sending
occurs occurs packets
54 The technique in which a congested node stops receiving data from the Admission policy Backpressure Forward signaling Backward signaling
immediate upstream node or nodes is called as _______
55 Backpressure technique can be applied only to __ Congestion networks Closed circuit networks Open circuit networks Virtual circuit networks
56 The packet sent by a node to the source to inform it of congestion is called Explicit Discard Choke Backpressure
_______
57 In the slow-start algorithm, the size of the congestion window increases exponentially additively multiplicatively suddenly
__________ until it reaches a threshold
58 The address that is unique in the scope of the network or internationally if the Global address Network address Physical address IP address
network is part of an international network is called as ______
59 The Identifier that is used for data transfer in virtual circuit network is called Global address Virtual circuit identifier Network identifier IP identifier
_____
60 During teardown phase, the source, after sending all the frames to destination, teardown response teardown request termination request termination response
sends a _____ to notify termination.
61 The data link layer takes the packets from _________ and encapsulates them network layer physical layer transport layer application layer
into frames for transmission.
62 Which of the following tasks is not done by data link layer? framing error control flow control channel coding
63 CRC stands for __________ cyclic redundancy check code repeat check code redundancy check cyclic repeat check
64 Which of the following is a data link protocol? ethernet point to point protocol hdlc all of the mentioned
65 The technique of temporarily delaying outgoing acknowledgements so that piggybacking cyclic redundancy check fletcher’s checksum parity check
they can be hooked onto the next outgoing data frame is called ___
66 . Expansion of FTP is __________ Fine Transfer Protocol File Transfer Protocol First Transfer Protocol Fast Transfer Protocol
67 FTP is built on _____ architecture. Client-server P2P Data centric Service oriented
68 FTP uses _________ parallel TCP connections to transfer a file. 1 2 3 5
69 Identify the incorrect statement regarding FTP. FTP stands for File FTP uses two parallel TCP FTP sends its control FTP sends exactly one file
Transfer Protocol connections information in-band over the data connection

3
Computer Networking II

70 FTP server _____________ Maintains state information Is stateless Has single TCP connection Has UDP connection for
for a file transfer file transfer
71 The password is sent to the server using ________ command PASSWD PASS PASSWORD PWORD
72 Simple mail transfer protocol (SMTP) utilizes _________ as the transport TCP UDP DCCP SCTP
layer protocol for electronic mail transfer.
73 SMTP connections secured by SSL are known as __________ SMTPS SSMTP SNMP STARTTLS
74 SMTP uses which of the following TCP port? 22 23 74 25
75 Which one of the following protocol is used to receive mail messages? SMTP POP IMAP FTP
76 What is on-demand mail relay (ODMR)? protocol for SMTP security an SMTP extension protocol for web pages protocol for faster mail
transfer
78 An email client needs to know the _________ of its initial SMTP server. IP address MAC address URL Name
79 An SMTP session may not include _______ zero SMTP transaction one SMTP transaction more than one SMTP one HTTP transaction
transaction
80 SMTP defines _______ message transport message encryption message content message password
81 Which one of the following is an SMTP server configured in such a way that open mail relay wide mail reception open mail reception short mail reception
anyone on the internet can send e-mail through it?
82 SMTP is not used to deliver messages to ______ user’s terminal user’s mailbox user’s word processor user’s email client
83 An asymmetric-key cipher uses 1 Key 2 Key 3 key 4 key
84 .Which one of the following protocol is used to secure HTTP connection? Resource reservation Transport layer security Xplicit congestion Stream control transmission
protocol (TSL) notification (ECN) protocol (SCTP)
85 Cryptography term is used to transforming messages to make them secure and Change Defend Idle Attacks
to prevent from
86 Shift cipher is also referred to as the Caesar cipher cipher text Shift cipher None of the above
87 Which one is the Heart of Data Encryption Standard (DES)? DES function Encryption Rounds Cipher
88 DES stands for………………… Data Encryption Slots Data Encryption Data Encryption Standard Data Encryption Solutions
Subscription
89 Encryption algorithm is used to transforms plaintext into…………… Simple Text Cipher Text Empty Text None of the above
90 What is cipher in Cryptography ? Algorithm for performing Algorithm for performing Encrpted Messages Both algorithm for
encryption decryption performing encryption and
Decryption and encrypted
message
91 The message before being transformed, is Simple Text Cipher Text Empty Text plain text
92 Which technique is used for data protection ?. Data piracy Authentication Encryption None of these
93 ________are the types of firewalls. Packet Filtering Dual Homed Gateway Both A and B None of these
94 In networks protocol TCP/ IP stands for. Transaction control Transmission control Transmission contribution None of these
protocol protocol protocol
95 Which of the following services use TCP? DHCP SMTP HTTP TFTP

4
Computer Networking II

96 What layer in the TCP/IP stack is equivalent to the Transport layer of the OSI Application Host-to-Host Internet Network Access
model?
97 You want to implement a mechanism that automates the IP configuration, SMTP SNMP DHCP ARP
including IP address, subnet mask, default gateway, and DNS information.
Which protocol will you use to accomplish this?
98 The DoD model (also called the TCP/IP stack) has four layers. Which layer of Application Host-to-Host Internet Network Access
the DoD model is equivalent to the Network layer of the OSI model?
99 Which of the following services use UDP? DHCP SMTP SNMP TFTP
100 Which statements are true regarding ICMP packets? ICMP guarantees datagram ICMP can provide hosts ICMP is encapsulated ICMP is encapsulated
delivery. with information about within IP datagrams. within UDP datagrams.
network problems.
101 Which layer 4 protocol is used for a Telnet connection? IP TCP TCP/IP UDP

5
T.Y. B. Sc. COMPUTER SCIENCE
Computer Networks -II
CH:1 Wired LANs

1) The technique of temporarily delaying outgoing acknowledgements so that they can be


hooked onto the next outgoing data frame is known as
a) Bit stuffing
b) Piggy backing
c) Pipelining
d) 1Broadcasting
Answer: (b).

2) The data link layer takes the packets from _________ and encapsulates them into frames
for transmission.
a) network layer
b) physical layer
c) transport layer
d) application layer
Answer: a

3) Which of the following tasks is not done by data link layer?


a) framing
b) error control
c) flow control
d) channel coding

Answer: d
Explanation: Channel coding is the function of physical layer. Data link layer mainly deals with
framing, error control and flow control. Data link layer is the layer where the packets are
encapsulated into frames.

4) Which sublayer of the data link layer performs data link functions that depend upon the
type of medium?
a) logical link control sublayer
b) media access control sublayer
c) network interface control sublayer
d) error control sublayer
Answer:b
Explanation: Media access control (MAC) deals with transmission of data packets to and from the
network-interface card, and also to and from another remotely shared channel. The MAC sublayer
also prevents collision using protocols like CSMA/CD.

5) Header of a frame generally contains ______________


a) synchronization bytes
b) addresses
c) frame identifier
d) all of the mentioned
Answer:d
Explanation: In a frame, the header is a part of the data that contains all the required information
about the transmission of the file. It contains information like synchronization bytes, addresses,
frame identifier etc. It also contains error control information for reducing the errors in the
transmitted frames.

6) Ethernet frame consists of ____________


a) MAC address
b) IP address
c) Default mask
d) Network address

Answer: a
Explanation: The Ethernet frame has a header that contains the source and destination MAC
address. Each MAC address is of 48 bits.

7) MAC address is of ___________


a) 24 bits
b) 36 bits
c) 42 bits
d) 48 bits

Answer: d
Explanation: MAC address is like a local address for the NIC that is used to make a local Ethernet
(or wifi) network function. It is of 48 bits.

8) What is the hexadecimal address 01011010 00010001 01010101 00011000 10101010


00001111?
a) 5A:88:AA:18:55:F0
b) 5A:81:BA:81:AA:0F
c) 5A:11:55:18:AA:0F
d) C.5A:11:55:18:AA:0F

Answer: B
9) The field of the MAC frame that alerts the receiver and enables it to synchronize is known
as
a) SFD
b) Preamble
c) Source address
d) Destination address
Answer : b Preamble

10) Preamble contains


a) 6 Bytes
b) 4 Byres
c) 2 Bytes
d) 7 Bytes
Answer : d 7 Bytes

11) A destination address can be


a) Unicast
b) Multicast
c) Broadcast
d) All of above
Answer : d

12) In Ethernet frame both source and destination address are of length
a) 1 Bytes
b) 2 Bytes
c) 4 Bytes
d) 6 Bytes
Answer : 6 Bytes

13) The ethernet frame contains


a) 3 Fields
b) 5 Fields
c) 7 Fields
d) 9 Fields
Answer : c 7 Fields

14) NIC stand for


a) Network Interface Card
b) National Internet Code
c) Network Isolated Card
d) Network International Code
Answer : a Network Interface Card

15) A Source address is always as


a) Unicast
b) Multicast
c) Broadcast
d) All of above
Answer : a Unicast

16) In Ethernet frame the flag of the Start Frame Delimiter (SFD) is
a) 11000011
b) 10101011
c) 10010011
d) 11011011
Answer : b 10101011

17) The CRC Field is used to show the


a) Error Correction
b) Sender Address
c) Receiver Address
d) Error detection information
Answer : d Error detection information

18) The Minimum and Maximum length of data in ethernet frame is


a) 64 Bytes and 1518 Bytes
b) 46 Bytes and 1500 Bytes
c) 48 Bytes and 1500 Bytes
d) 46 Bytes and 1518 Bytes
Answer : b Minimum 46 Bytes and Maximum 1500 Bytes

19) The Minimum and Maximum length of Ethernet frame is


a) 64 Bytes and 1518 Bytes
b) 46 Bytes and 1500 Bytes
c) 48 Bytes and 1500 Bytes
d) 46 Bytes and 1518 Bytes
Answer : a Minimum 64Bytes and Maximum 1518 Bytes

20) In 10Base5, the cable is


a) Thin
b) Thick
c) Twisted pair
d) None of the above
Answer : b Thick

21) In 10Base2 , the cable is


a) Thin
b) Thick
c) Twisted pair
d) None of the above
Answer : a Thin

22) In 10Base-T , the cable is


a) Thin
b) Thick
c) Twisted pair
d) None of the above
Answer : c Twisted pair

23) In 10Base-FL, the cable is


a) Thick
b) Twisted pair
c) Fiber Optic
d) Thin
Answer : c Fiber Optic

24) 10Base T is used to connect the station by using


a) Star Topology
b) Bus Topology
c) Ring Topology
d) Mesh Topology
Answer : a Star Topology

25) Header plus trailer of Ethernet is


a) 12 Bytes
b) 14 Bytes
c) 16 Bytes
d) 18 Bytes
Answer : d 18 Bytes

26) This is a device that can be used to connect one Ethernet network to another nearby
Ethernet network.
a) gateway
b) switch
c) bridge
d) forwarder
Answer c brige

27) If an Ethernet destination address is 07:01:02:03:04:05, then this is a ______ address.


a) unicast
b) multicast
c) broadcast
d) any of the above
Answer b Multicast

LSB of 1st octate 0 in unicast


LSB of 1 Multicast
ALL 1 Broadcast for above example its 1 hence it is multicast

28) The _______ layer of Ethernet consists of the LLC sublayer and the MAC sublayer.
a) data link
b) physical
c) network
d) none of the above

Answer : a data link

29) The _____ sublayer is responsible for the operation of the CSMA/CD access method and
framing.
a) LLC
b) MII
c) MAC
d) none of the above
Answer : c MAC

30) Fast Ethernet has a data rate of ________Mbps.


a) 10
b) 100
c) 1000
d) 10,000
Answer : b 100Mbps

31) Gigabit Ethernet access methods include _______ mode.


a) half-duplex
b) full-duplex
c) both (a) and (b)
d) neither (a) nor (b)
Answer: (c).both (a) a(b)

32) In Ethernet addressing, if the least significant bit of the first byte is 0, the address is
_________.
a) Unicast
b) multicast
c) broadcast
d) none of the above

Answer: (a).unicast

33) In Ethernet addressing, if the least significant bit of the first byte is 1, the address is
_________.
a) Unicast
b) Multicast
c) Broadcast
d) None of the above

Answer: (b).multicast

34) In Ethernet addressing, if all the bits are 1s, the address is _________.
a) Unicast
b) Multicast
c) Broadcast
d) None of the above

Answer: (c).broadcast

35) A hub is used in ......................... Ethernet.


a) 10Base 5
b) 10Base 2
c) 10Base – T
d) 10Base – F
Answer: (c).10Base – T

36) A transceiver cable is used in ......................... Ethernet.


a) 10Base 5
b) 10Base 2
c) 10Base – T
d) 10Base – F

Answer: (a).10Base 5

37) VLANs provides


a) time-efficiency and security
b) reduce network traffic
c) both a and b
d) None of the Above
Answer : c Both a and c

38) Virtual LANs create


a) broadcast domains
b) limited domains
c) metropolitan area domains
d) All of the Above

Answer: (a).broadcast domains

39) In backbone network, the topology of the backbone is


a) bus
b) star
c) mesh
d) ring

Answer: a

40) By using fast Ethernet two stations are connected via


a) point to point
b) Switch
c) Hub
d) Bridge

Answer: (a).point to point

41) Gigabit Ethernet has a data rate of


a) 100 Mbps
b) 1000 Mbps
c) 1500 Mbps
d) 2000 Mbps

Answer : B 1000 Mbps

42) The latest Ethernet standard is Ten-Gigabit Ethernet operates at


a) 2 Gbps
b) 6 Gbps
c) 8 Gbps
d) 10 Gbps

Answer: (d).10 Gbps

43) 10 Gigabit Ethernet operates only in


a) Duplex Mode
b) Half Duplex Mode
c) Quadratic Duplex Mode
d) Full Duplex Mode

Answer: (d).Full Duplex Mode

44) Which station characteristics can be used to group stations into a VLAN
a) Port Number
b) MAC Address
c) IP Address
d) All of the above
Answer : d All of the above

45) In a VLAN, stations are separated into group by


a) Physical methods
b) Software methods
c) Location
d) Switches

Answer : b Software Methods


T.Y. B. Sc. COMPUTER SCIENCE
Computer Networks -II
CH:2 Wiredless LANs
1. What is the access point (AP) in a wireless LAN?
a) device that allows wireless devices to connect to a wired network
b) wireless devices itself
c) both device that allows wireless devices to connect to a wired network and wireless devices
itself
d) all the nodes in the network
Answer: a
Explanation: Access point in a wireless network is any device that will allow the wireless
devices to a wired network. A router is the best example of an Access Point.

2. In wireless ad-hoc network _________


a) access point is not required
b) access point is must
c) nodes are not required
d) all nodes are access points
Answer: a
Explanation: An ad-hoc wireless network is a decentralized kind of a wireless network. An
access point is usually a central device and it would go against the rules of the ad-hoc network to
use one. Hence it is not required.

3. Which multiple access technique is used by IEEE 802.11 standard for wireless LAN?
a) CDMA
b) CSMA/CA
c) ALOHA
d) CSMA/CD
Answer: b
Explanation: CSMA/CA stands for Carrier-sense multiple access/collision avoidance. It is a
multiple access protocol used by IEEE 802.11 standard for wireless LAN. It’s based on the
principle of collision avoidance by using different algorithms to avoid collisions between
channels.

4. In wireless distribution system __________


a) multiple access point are inter-connected with each other
b) there is no access point
c) only one access point exists
d) access points are not required
Answer: a
Explanation: A Wireless Distribution System allows the connection of multiple access points
together. It is used to expand a wireless network to a larger network.

5. A wireless network interface controller can work in _______


a) infrastructure mode
b) ad-hoc mode
c) both infrastructure mode and ad-hoc mode
d) WDS mode
Answer: c
Explanation: A wireless network interface controller works on the physical layer and the data
link layer of the OSI model. Infrastructure mode WNIC needs access point but in ad-hoc mode
access point is not required.

6. In wireless network an extended service set is a set of ________


a) connected basic service sets
b) all stations
c) all access points
d) connected access points
Answer: a
Explanation: The extended service set is a part of the IEEE 802.11 WLAN architecture and is
used to expand the range of the basic service set by allowing connection of multiple basic service
sets.

7. Mostly ________ is used in wireless LAN.


a) time division multiplexing
b) orthogonal frequency division multiplexing
c) space division multiplexing
d) channel division multiplexing
Answer: b
Explanation: In orthogonal frequency division multiplexing, digital data is encoded on multiple
carrier frequencies. It is also used in digital television and audio broadcasting in addition to
Wireless LANs.

8. Which one of the following event is not possible in wireless LAN?


a) collision detection
b) acknowledgement of data frames
c) multi-mode data transmission
d) connection to wired networks
Answer: a
Explanation: Collision detection is not possible in wireless LAN with no extensions. Collision
detection techniques for multiple access like CSMA/CD are used to detect collisions in Wireless
LANs.

9. What is Wired Equivalent Privacy (WEP)?


a) security algorithm for ethernet
b) security algorithm for wireless networks
c) security algorithm for usb communication
d) security algorithm for emails
Answer: b
Explanation: WEP is a security algorithm for wireless network which intended to provide data
confidentiality comparable to that of traditional wired networks. It was introduced in 1997.

10. What is WPA?


a) wi-fi protected access
b) wired protected access
c) wired process access
d) wi-fi process access
Answer: a
Explanation: WPA or WiFi Protected Access is a security protocol used to provide users and
firms with strong data security and protection for their wireless networks (WiFi) to give them
confidence that only authorized users can access their network.

11. IEEE has defined the specifications for a wireless LAN,called________, which covers
the physical and data link layers.
a) IEEE 802.3
b) IEEE 802.5
c) IEEE 802.11
d) IEEE 802.2
Answer : C

12. In IEEE 802.11, a is made of stationary or mobile wireless stations and an optional
central base station, known as the access point (AP).
a) ESS
b) BSS
c) CSS
d) none of the above
Answer : B

13. In IEEE802.11, a ESS without an AP is called


a) an ad hoc architecture
b) an infrastructure network
c) either (a) or (b)
d) neither (a) nor (b)
Answer : A

14. In IEEE802.11, a ESS with an AP is sometime referred to as ________________


a) an ad hoc architecture
b) an infrastructure network
c) either (a) or (b)
d) neither (a) nor (b)
Answer : B

15. In IEEE802.11, Communication between two stations in two different BSSs usually
occurs via two________.
a) BSSs
b) ESSs
c) APs
d) None of the above
Answer : C

16. In IEEE 802.11, a station with __________mobility is either stationary (not moving) or
moving only inside a BSS.
a) no-transition
b) BSS-transition
c) ESS-transition
d) none of the above
Answer : A

17. In IEEE 802.11, a station with_______mobility can move from one BSS to another, but
the movement is confined inside one ESS.
a) no-transition
b) BSS-transition
c) ESS-transition
d) none of the above
Answer : B

18. In IEEE 802.11, a station with___________mobility can move from one ESS to another.
a) no-transition
b) BSS-transition
c) ESS-transition
d) none of the above
Answer :C

19. In IEEE 802.11, _____is an optional access method that can be implemented in an
infrastructure network (or it in an adhoc network).
a) DCF
b) PCF
c) either (a) or (b)
d) neither (a) nor (b)
Answer : PCF

20. The IEEE 802.11 s andard for wireless LANs defines two services:
a) BSS; ASS
b) ESS; SSS
c) BSS; ESS
d) BSS; DCF
Answer : C

21. Bluetooth is a ________technology that connect (called gadgets) in a small area


a) wired LAN
b) wireless LAN
c) VLAN
d) none of the above
Answer : B

22. A Bluetooth network is called a ______________ .


a) piconet
b) scatternet
c) bluenet
d) none of the above
Answer : A

23. In Bluetooth, multiple_________form a network called a____________


a) scatternet; piconets
b) piconets: scatternet
c) piconets: bluenet
d) bluenet; scatternet
Answer : B

24. A Bluetooth network consists of_____ primary device(s) and up to_____secondary


devices.
a) one; five
b) five; three
c) two; six
d) one; seven
Answer : D

25. In Bluetooth, the current data rate is ______Mbps


a) 2
b) 5
c) 11
d) none of the above
Answer : D
Correct Answer : 1mbps
Unit 1 – Wired LAN
1. What is the hexadecimal equivalent of the Ethernet address 01011010 00010001 01010101
00011000 10101010 00001111?
A. 5A:88:AA:18:55:F0
B. 5A:81:BA:81:AA:0F
C. 5A:11:55:18:AA:0F
D. 5A:18:5A:18:55:0F

2. If an Ethernet destination address is 07:01:02:03:04:05, then this is a __________ address.


A. unicast
B. multicast
C. broadcast
D. any of the above

3. If an Ethernet destination address is 08:07:06:05:44:33, then this is a _________address.


A. unicast
B. multicast
C. broadcast
D. any of the above

4. Which of the following could not be an Ethernet unicast destination?


A. 43:7B:6C:DE:10:00
B. 44:AA:C1:23:45:32
C. 46:56:21:1A:DE:F4
D. 48:32:21:21:4D:34

5. Which of the following could not be an Ethernet multicast destination?


A. B7:7B:6C:DE:10:00
B. 7B:AA:C1:23:45:32
C. 7C:56:21:1A:DE:F4
D. 83:32:21:21:4D:34

6. _______ is the most widely used local area network protocol.


A. Token Ring
B. Token Bus
C. Ethernet
D. none of the above

7. The IEEE 802.3 Standard defines CSMA/CD as the access method for first-generation 10-Mbps
Ethernet.
A. 1-persistent
B. p-persistent
C. non-persistent
D. none of the above
8. The _______layer of Ethernet consists of the LLC sublayer and the MAC sublayer.
A. data link
B. physical
C. network
D. none of the above

9. The _______ sublayer is responsible for the operation of the CSMA/CD access method and
framing.
A. LLC
B. MII
C. MAC
D. none of the above

10. Each station on an Ethernet network has a ______ unique address imprinted on its network
interface card (NIC).
A. 5-byte
B. 32-bit
C. 48-bit
D. none of the above

11. The minimum frame length for 10-Mbps Ethernet is_________bytes.


A. 32
B. 80
C. 128
D. none of the above

12. The maximum frame length for 10-Mbps Ethernet is_______ bytes.
A. 1518
B. 1500
C. 1200
D. none of the above

13. ________ uses thick coaxial cable


A. 10Base5
B. 10Base2
C. 10Base-T
D. 10Base-F
14. _______ uses thin coaxial cable
A. 10Base5
B. 10Base2
C. 10Base-T
D. 10Base-F

15. _______ uses four twisted-pair cables that connect each station to a common hub.
A. 10Base5
B. 10Base2
C. 10Base-T
D. 10Base-F

16. ________ uses fiber-optic cable


A. 10Base5
B. 10Base2
C. 10Base-T
D. 10Base-F

17. Fast Ethernet has a data rate of __________Mbps.


A. 10
B. 100
C. 1000
D. 10000

18. In __________, auto negotiation allows two devices to negotiate the mode or data
rate of operation.
A. Standard
B. Fast Ethernet
C. Gigabit Ethernet
D. Ten-Gigabit Ethernet

19. ________ uses two pairs of twisted-pair cable.


A. 100Base-TX
B. 100Base-FX
C. 100Base-T4
D. none of the above
20. ________ uses two fiber-optic cables.
A. 100Base-TX
B. 100Base-FX
C. 100Base-T4
D. none of the above

UNIT 2 – Wireless LAN


1. What is the access point (AP) in a wireless LAN?
a) device that allows wireless devices to connect to a wired network
b) wireless devices itself
c) both device that allows wireless devices to connect to a wired network and wireless devices
itself
d) all the nodes in the network
Answer: a
Explanation: Access point in a wireless network is any device that will allow the wireless devices
to a wired network. A router is the best example of an Access Point.

2. In wireless ad-hoc network _________


a) access point is not required
b) access point is must
c) nodes are not required
d) all nodes are access points
Answer: a
Explanation: An ad-hoc wireless network is a decentralized kind of a wireless network. An access
point is usually a central device and it would go against the rules of the ad-hoc network to use
one. Hence it is not required.

3. Which multiple access technique is used by IEEE 802.11 standard for wireless LAN?
a) CDMA
b) CSMA/CA
c) ALOHA
d) CSMA/CD
Answer: b
Explanation: CSMA/CA stands for Carrier-sense multiple access/collision avoidance. It is a
multiple access protocol used by IEEE 802.11 standard for wireless LAN. It’s based on the
principle of collision avoidance by using different algorithms to avoid collisions between
channels.
4. In wireless distribution system __________
a) multiple access point are inter-connected with each other
b) there is no access point
c) only one access point exists
d) access points are not required
Answer: a
Explanation: A Wireless Distribution System allows the connection of multiple access points
together. It is used to expand a wireless network to a larger network.

5. A wireless network interface controller can work in _______


a) infrastructure mode
b) ad-hoc mode
c) both infrastructure mode and ad-hoc mode
d) WDS mode
Answer: c
Explanation: A wireless network interface controller works on the physical layer and the data
link layer of the OSI model. Infrastructure mode WNIC needs access point but in ad-hoc mode
access point is not required.

6. In wireless network an extended service set is a set of ________


a) connected basic service sets
b) all stations
c) all access points
d) connected access points
Answer: a
Explanation: The extended service set is a part of the IEEE 802.11 WLAN architecture and is used
to expand the range of the basic service set by allowing connection of multiple basic service
sets.

7. Mostly ________ is used in wireless LAN.


a) time division multiplexing
b) orthogonal frequency division multiplexing
c) space division multiplexing
d) channel division multiplexing
Answer: b
Explanation: In orthogonal frequency division multiplexing, digital data is encoded on multiple
carrier frequencies. It is also used in digital television and audio broadcasting in addition to
Wireless LANs.

8. Which one of the following event is not possible in wireless LAN?


a) collision detection
b) acknowledgement of data frames
c) multi-mode data transmission
d) connection to wired networks
Answer: a
Explanation: Collision detection is not possible in wireless LAN with no extensions. Collision
detection techniques for multiple access like CSMA/CD are used to detect collisions in Wireless
LANs.

9. What is Wired Equivalent Privacy (WEP)?


a) security algorithm for ethernet
b) security algorithm for wireless networks
c) security algorithm for usb communication
d) security algorithm for emails
Answer: b
Explanation: WEP is a security algorithm for wireless network which intended to provide data
confidentiality comparable to that of traditional wired networks. It was introduced in 1997.

10. What is WPA?


a) wi-fi protected access
b) wired protected access
c) wired process access
d) wi-fi process access
Answer: a
Explanation: WPA or WiFi Protected Access is a security protocol used to provide users and firms
with strong data security and protection for their wireless networks (WiFi) to give them
confidence that only authorized users can access their network.

11. An interconnected collection of piconet is called ___________


a) scatternet
b) micronet
c) mininet
d) multinet
Answer: a
Explanation: Piconet is the basic unit of a bluetooth system having a master node and upto
seven active slave nodes. A collection of piconets is called scatternet and a slave node of a
piconet may act as a master in a piconet that is part of the scatternet.

12. In a piconet, there can be up to ________ parked nodes in the network.


a) 63
b) 127
c) 255
d) 511
Answer: c
Explanation: A slave node in a piconet can be instructed by the master node to go into parked
mode. Then the slave node enters the parked mode in which the node is not disconnected from
the network but is inactive unless the master wakes it up.
13. Bluetooth is the wireless technology for __________
a) local area network
b) personal area network
c) metropolitan area network
d) wide area network
Answer: b
Explanation: Bluetooth is a wireless technology used to create a wireless personal area network
for data transfer up to a distance of 10 meters. It operates on 2.45 GHz frequency band for
transmission.

14. Bluetooth uses __________


a) frequency hopping spread spectrum
b) orthogonal frequency division multiplexing
c) time division multiplexing
d) channel division multiplexing
Answer: a
Explanation: Frequency hopping spread spectrum is a method of transmitting radio signals by
rapidly changing the carrier frequency and is controlled by the codes known to the sender and
receiver only.

15. Unauthorised access of information from a wireless device through a bluetooth connection is
called _________
a) bluemaking
b) bluesnarfing
c) bluestring
d) bluescoping
Answer: b
Explanation: Unauthorised access of information from a wireless device through a bluetooth
connection is called Bluesnarfing. It is done through exploiting the vulnerabilities of the
Bluetooth device to steal the transmitted information.

16. In a piconet, one master device ________


a) can not be slave
b) can be slave in another piconet
c) can be slave in the same piconet
d) can be master in another piconet
Answer: b
Explanation: In a scatternet, a slave node of one piconet may act as a master in a piconet that is
part of the scatternet. The scatternet uses this property to connect many piconets together to
create a larger network.

17. Bluetooth supports _______


a) point-to-point connections
b) point-to-multipoint connection
c) both point-to-point connections and point-to-multipoint connection
d) multipoint to point connection
Answer: c
Explanation: In Bluetooth, each slave node communicates with the master of the piconet
independently i.e. each master-slave connection is independent. The slave is not allowed to
communicate with other slaves directly.

18. A scatternet can have maximum __________


a) 10 piconets
b) 20 piconets
c) 30 piconets
d) 40 piconets
Answer: a
Explanation: A scatternet can have maximum of 10 piconets and minimum of 2 piconets. To
connect these piconets, a slave node of one piconet may act as a master in a piconet that is part
of the scatternet.

Unit 3 – Network Layer

1. The network layer is concerned with __________ of data.


a) bits
b) frames
c) packets
d) bytes
Answer: c
Explanation: In computer networks, the data from the application layer is sent to the transport
layer and is converted to segments. These segments are then transferred to the network layer
and these are called packets. These packets are then sent to data link layer where they are
encapsulated into frames. These frames are then transferred to physical layer where the frames
are converted to bits.

2. Which one of the following is not a function of network layer?


a) routing
b) inter-networking
c) congestion control
d) error control
Answer: d
Explanation: In the OSI model, network layer is the third layer and it provides data routing paths
for network communications. Error control is a function of the data link layer and the transport
layer.

3. A 4 byte IP address consists of __________


a) only network address
b) only host address
c) network address & host address
d) network address & MAC address
Answer: c
Explanation: An ip address which is 32 bits long, that means it is of 4 bytes and is composed of a
network and host portion and it depends on address class. The size of the host address and
network address depends upon the class of the address in classful IP addressing.

4. In virtual circuit network each packet contains ___________


a) full source and destination address
b) a short VC number
c) only source address
d) only destination address
Answer: b
Explanation: A short VC number also called as VCID (virtual circuit identifier) is a type of
identifier which is used to distinguish between several virtual circuits in a connection oriented
circuit switched network. Each virtual circuit is used to transfer data over a larger packet
switched network.

5. Which of the following routing algorithms can be used for network layer design?
a) shortest path algorithm
b) distance vector routing
c) link state routing
d) all of the mentioned
Answer: d
Explanation: The routing algorithm is what decides where a packet should go next. There are
several routing techniques like shortest path algorithm, static and dynamic routing,
decentralized routing, distance vector routing, link state routing, Hierarchical routing etc. The
routing algorithms go hand in hand with the operations of all the routers in the networks. The
routers are the main participants in these algorithms.

6. Which of the following is not correct in relation to multi-destination routing?


a) is same as broadcast routing
b) contains the list of all destinations
c) data is not sent by packets
d) there are multiple receivers
Answer: c
Explanation: In multi-destination routing, there is more than one receiver and the route for each
destination which is contained in a list of destinations is to be found by the routing algorithm.
Multi-destination routing is also used in broadcasting.

7. A subset of a network that includes all the routers but contains no loops is called ________
a) spanning tree
b) spider structure
c) spider tree
d) special tree
Answer: a
Explanation: Spanning tree protocol (STP) is a network protocol that creates a loop free logical
topology for ethernet networks. It is a layer 2 protocol that runs on bridges and switches. The
main purpose of STP is to ensure that you do not create loops when you have redundant paths
in your network.

8. Which one of the following algorithm is not used for congestion control?
a) traffic aware routing
b) admission control
c) load shedding
d) routing information protocol
Answer: d
Explanation: The Routing Information Protocol (RIP) is used by the network layer for the
function of dynamic routing. Congestion control focuses on the flow of the traffic in the network
and uses algorithms like traffic aware routing, admission control and load shedding to deal with
congestion.

9. The network layer protocol for internet is __________


a) ethernet
b) internet protocol
c) hypertext transfer protocol
d) file transfer protocol
Answer: b
Explanation: There are several protocols used in Network layer. Some of them are IP, ICMP,
CLNP, ARP, IPX, HRSP etc. Hypertext transfer protocol is for application layer and ethernet
protocol is for data link layer.

10. ICMP is primarily used for __________


a) error and diagnostic functions
b) addressing
c) forwarding
d) routing
Answer: a
Explanation: ICMP abbreviation for Internet Control Message Protocol is used by networking
devices to send error messages and operational information indicating a host or router cannot
be reached. ICMP operates over the IP packet to provide error reporting functionality as IP by
itself cannot report errors.

11. Datagram switching is done at which layer of OSI model?


a) Network layer
b) Physical layer
c) Application layer
d) Transport layer
Answer: a
Explanation: Datagram switching is normally done at network layer. In datagram switching, the
datagram stream need not be in order as each datagram can take different routes to the
destination.

12. Packets in datagram switching are referred to as ________


a) Switches
b) Segments
c) Datagrams
d) Data-packets
Answer: c
Explanation: As the name suggests, in datagram switching packets are called as datagram. Each
datagram/packet is treated as an individual entity and routed independently through the
network.

13. Datagram networks mainly refers to _________


a) Connection oriented networks
b) Connection less networks
c) Telephone networks
d) Internetwork
Answer: b
Explanation: The switch does not keep the information about the connection state, hence it is
connection less. There is no need for establishing a handshake to begin the transmission in such
networks.

14. Datagrams are routed to their destinations with the help of ________
a) Switch table
b) Segments table
c) Datagram table
d) Routing table
Answer: c
Explanation: Routing table is used to route the packets to their destinations. The
packet/datagram header contains the destination header for the whole journey to source to the
destination through the routers.

15. The main contents of the routing table in datagram networks are ___________
a) Source and Destination address
b) Destination address and Output port
c) Source address and Output port
d) Input port and Output port
Answer: b
Explanation: Routing table contains destination address and output port to route the packets to
their destinations. The port address specifies the particular application that the packet has to be
forwarded to after it has reached the destination.

16. Which of the following remains same in the header of the packet in a datagram network during
the entire journey of the packet?
a) Destination address
b) Source address
c) Checksum
d) Padding
Answer: a
Explanation: Destination address remains same in the header during the entire journey of the
packet. There is no pre-decided route for the packets so each datagram/packet is treated as an
individual entity and routed independently through the network.

17. Which of the following is true with respect to the delay in datagram networks?
a) Delay is greater than in a virtual circuit network
b) Each packet may experience a wait at a switch
c) Delay is not uniform for the packets of a message
d) All of the mentioned
Answer: d
Explanation: The delay of each packet in a datagram network is different as each packet might
take a different route to the destination. The delay includes the propagation delay and the
processing delay that is induced at each stop/switch that the packet encounters in its journey.

18. During datagram switching, the packets are placed in __________ to wait until the given
transmission line becomes available.
a) Stack
b) Queue
c) Hash
d) Routing table
Answer: b
Explanation: When there are too many packets to be transmitted and the transmission line gets
blocked while transmitting some packets, the remaining packets are stored in queue during
delay and are served as first in first out. The delay is called as queuing delay.

19. The probability of the error in a transmitted block _________ with the length of the block
a) Remains same
b) Decreases
c) Increases
d) Is not proportional
Answer: c
Explanation: Probability of the error in a transmitted block increases with the length of the
block. Hence, the blocks should be as short as possible for ideal transmission with low possibility
of an error.
20. Which of the following is false with respect to the datagram networks?
a) Number of flows of packets are not limited
b) Packets may not be in order at the destination
c) Path is not reserved
d) Delay is the same for all packets in a flow
Answer: d
Explanation: The delay of each packet in a datagram network is different as each packet might
take a different route to the destination. This happens because there is no pre-decided route for
the packets.
UNIT 4- Address Mapping
1)An ARP reply is normally _______.

a) broadcast

b) multicast

c) unicast

d) none of the above

2)DHCP (dynamic host configuration protocol) provides __________ to the client.

a) IP address

b) MAC address

c) Url

d) None of the mentioned

3. The DHCP server _________

a) maintains a database of available IP addresses

b) maintains the information about client configuration parameters

c) grants a IP address when receives a request from a client

d) all of the mentioned

4) A _______ is an ARP that acts on behalf of a set of hosts

a) ​ARP

b) ​RARP
c) proxy ARP

d) none of the above

5) Which protocol is used to resolve an IP address to Ethernet address.

a) ​BootP

b) ​RARP

c) ARP

d) none of the above

6) Which protocol does DHCP uses at the transport layer.

a) IP

b) UDP

c) ARP

d) TCP

7) ARP is a---

a) 8

b) 10

c) 12

d) 16

8) Which of the following describes the function of ARP?

a)It is used to map a 32-bit IP address to a 48-bit ethernet address.

b)It is used to map a 48-bit ethernet address to a 32-bit IP address.

c)It is used to map a 32-bit ethernet address to a 48-bit IP address.


d)It is used to map a 48-bit IP address to a 32-bit ethernet address.

9) Which of the following describes the function of RARP?

A. It is used to map a 32-bit IP address to a 48-bit ethernet address.

B. It is used to map a 48-bit ethernet address to a 32-bit IP address.

C. It is used to map a 32-bit ethernet address to a 48-bit IP address.

D. It is used to map a 48-bit IP address to a 32-bit ethernet address.

10) In ARP, each user has been assigned a

a) Trigger

b)Integer

c)Repeater

d)Process Header

11) DHCP stands for

a) Dynamic Host Configuration Protocol

b) Digital Host Communication Provider

c) Digital Host Communication Protocol

d) Dynamic Host Configuration Provide

12) DHCP provides static and dynamic address allocation that can be

a) Manual

b) Automatic
c) Both a and b

d) None

13) DHCP is used for ________

a) IPv6

b) IPv4

c) Both IPv6 and IPv4

d) None of the mentioned

14) DHCP uses UDP port _________ for sending data to the server.

a) 66

b) 67

c) 68

d) 69

15) DHCP client and servers on the same subnet communicate via _________

a) UDP broadcast

b) UDP unicast

c) TCP broadcast

d) TCP unicast

16) What is DHCP snooping?

a) Techniques applied to ensure the security of an existing DHCP infrastructure

b) encryption of the DHCP server requests

c) algorithm for DHCP

d) none of the mentioned


17) If DHCP snooping is configured on a LAN switch, then clients having specific ______ can
access the network.

a) MAC address

b) IP address

c) Both MAC address and IP address

d) None of the mentioned

18)Which of the following is the ethernet broadcast address used in ARP and RARP
requests?

a) 255.255.255.255

b) 08:00:20:11:aa:01

c) ff:ff:ff:ff:ff:ff

d) 224.0.0.0

MCQ on TRANSPORT LAYER:

1.​ W
​ hat are the functions of the transport layer?

a) Multiplexing/ Demultiplexing

b) Connection less Services

c) Connection oriented service

d) Congestion control

2.​ W
​ hich services are provided by transport layer?

a) Error control

b) Connection service
c) Connection less service

d) Congestion control

3.​ T
​ CP and UDP are called ________

a) Application protocols

b) Session protocols

c) Transport protocols

d) Network protocols

4.​ ​ Security based connection is provided by which layer?

a) Network layer

b) Session layer

c) Application layer

d) Transport layer

5.​ T
​ CP is the standard protocol with std no?

a) 5

b) 4

c) 7

d) 3

6.​ U
​ sing which method in transport layer data integrity can be ensured?

a) Checksum

b) Repetition codes
c) Cyclic redundancy checks

d) Error correcting codes

7.​ ​ Buffer overrun can be reduced by using what?

a) Traffic control

b) Flow control

c) Byte orientation

d) Data integrity

8.​ T
​ ransport layer can identify the symptoms of overload nodes using _________

a) Flow control

b) Traffic control

c) Byte orientation

d) Data integrity

9.​ T
​ ransport layer receives data in the form of __________

a) Packets

b) Byte streams

c) Bits stream

d) Both packets and Byte stream

10.​ T
​ ransport layer is which layer in OSI model?
a) Fourth layer

b) Third layer

c) Second layer

d) Fifth layer

11.​ ​Congestion control can control traffic entry into a telecommunications network, so to avoid
_________

a) Congestive connection

b) Connection collapse

c) Congestive collapse

d) Collapse congestive

12.​ F
​ CP stands for _________

a) Fiber Channel Protocol

b) Field Channel Protocol

c) Fast Channel Protocol

d) Fiber Carrying Protocol

13.​ U
​ DP packets are called as _________

a) Segments

b) Checksum

c) Frames
d) Datagrams

14.​ _​ ________ does not provide reliable end to end communication.

a) TCP

b) UDP

c) Both TCP and UDP

d) Neither TCP nor UDP

15.​ A
​ RQ stands for __________

a) Automatic Repeat Request

b) Automatic Request Repeat

c) Application Repeat Request

d) Application Request Repeat

16. Which among the following are delivered by the transport layer in process-to-process
delivery mechanism?

a) Frames

b) Datagrams

c)Packets

d) All of the above


17. Which among the following are uncontrolled and un-registered form of ephemeral ports in
accordance to IANA?

a)Well known Ports

b) Registered Ports

c)Dynamic Ports

d) All of the above

18. What is the purpose of using source & destination port numbers respectively in the addressing
method of transport layer?

a) For Delivery & Reply operations

b) For Reply & Delivery operations

c)Only for Delivery operations

d) Only for Reply operations

19. An endpoint of an inter-process communication flow across a computer network is called


__________

a) socket

b) pipe

c) port

d) machine

20. A _____ is a TCP name for a transport service access point.

a) port

b) pipe

c) node

d) protocol

21. Which one of the following is a transport layer protocol?


a) stream control transmission protocol

b) internet control message protocol

c) neighbor discovery protocol

d) dynamic host configuration protocol

22) Transport layer aggregates data from different applications into a single stream before passing
it to:

a) network layer

b) data link layer

c) application layer

d) physical layer

23) The ports ranging from 49,152 to 65,535 can be used as temporary or private port numbers.
They are called the ________ ports.

a) Well known ports

b) Registered

c) Dynamic

d)None

24) A port address in UDP is _______bits long.

a) 8

b) 16

c) 32
d)64

25) The combination of an IP address and a port number is called a ____________.

a) transport address

b) network address

c) socket address

d) none of the above


Questions On APPLICATION LAYER and NETWORK SECURITY

1. Which is not an application layer protocol?


a) HTTP
b) SMTP
c) FTP
d) TCP
Ans : d

2. The packet of information at the application layer is called __________


a) Packet
b) Message
c) Segment
d) Frame
Ans : b

3. Which one of the following is an architecture paradigms?


a) Peer to peer
b) Client-server
c) HTTP
d) Both Peer-to-Peer & Client-Server
Ans : c

4. Application developer has permission to decide the following on transport layer


side
a) Transport layer protocol
b) Maximum buffer size
c) Both Transport layer protocol and Maximum buffer size
d) None of the mentioned
Ans : c

5. Application layer offers _______ service.


a) End to end
b) Process to process
c) Both End to end and Process to process
d) None of the mentioned
Ans : a

6. E-mail is _________
a) Loss-tolerant application
b) Bandwidth-sensitive application
c) Elastic application
d) None of the mentioned
Ans : c

7. Pick the odd one out.


a) File transfer
b) File download
c) E-mail
d) Interactive games
Ans : d

8. Which of the following is an application layer service?


a) Network virtual terminal
b) File transfer, access, and management
c) Mail service
d) All of the mentioned
Ans : d

9. To deliver a message to the correct application program running on a host, the


_______ address must be consulted.
a) IP
b) MAC
c) Port
d) None of the mentioned
Ans : c

10. Which is a time-sensitive service?


a) File transfer
b) File download
c) E-mail
d) Internet telephony
Ans: d

11. Transport services available to applications in one or another form _________


a) Reliable data transfer
b) Timing
c) Security
d) All of the mentioned

Ans : d

12. Electronic mail uses which Application layer protocol?


a) SMTP
b) HTTP
c) FTP
d) SIP
Ans: a

13.​The ____ translates internet domain and host names to IP address.


a) domain name system
b) routing information protocol
c) network time protocol
d) internet relay chat
Ans : a

14. ​ Which one of the following allows a user at one site to establish a connection to
another site and then pass keystrokes from local host to remote host?
a) HTTP
b) FTP
c) Telnet
d) none of the mentioned
Ans : c

15. ​Application layer protocol defines:


a) types of messages exchanged
b) message format, syntax and semantics
c) rules for when and how processes send and respond to messages
d) all of the mentioned
Ans : d
16 . ​ Which one of the following protocol delivers/stores mail to receiver server?
​a) simple mail transfer protocol
b) post office protocol
c) internet mail access protocol
d) hypertext transfer protocol
Ans : a

17. ​Which one of the following is not an application layer protocol?


a) media gateway protocol
b) dynamic host configuration protocol
c) resource reservation protocol
d) session initiation protocol
Ans : c

18. ​When displaying a web page, the application layer uses the:
a) HTTP protocol
b) FTP protocol
c) SMTP protocol
d) none of the mentioned
Ans : a

19. ​The packet of information at the application layer is called:


a) Packet
b) Message
c) Segment
d) Frame
Ans : b

20. ​This is one of the architecture paradigm:


a) Peer to peer
b) Client-server
c) HTTP
d) Both a and b
Ans : d

1. The field that covers a variety of computer networks, both public and private, that
are used in everyday jobs.
a) Artificial Intelligence
b) ML
c) Network Security
d) IT
Ans : c

2. Network Security provides authentication and access control for resources.


a) True
b) False
Ans : a

3. Which is not an objective of network security?


a) Identification
b) Authentication
c) Access control
d) Lock
Ans : d

4. Which of these is a part of network identification?


a) UserID
b) Password
c) OTP
d) fingerprint
Ans : a

5. The process of verifying the identity of a user.


a) Authentication
b) Identification
c) Validation
d) Verification
Ans : a

6. A concern of authentication that deals with user rights.


a) General access
b) Functional authentication
c) Functional authorization
d) Auto verification
Ans :c

7. CHAP stands for?


a) Challenge Handshake authentication protocol
b) Challenge Hardware authentication protocol
c) Circuit Hardware authentication protocol
d) Circuit Handshake authentication protocol
Ans : a
8. Security features that control that can access resources in the OS.
a) Authentication
b) Identification
c) Validation
d) Access control
Ans : d

9. An algorithm in encryption is called _____________


a) Algorithm
b) Procedure
c) Cipher
d) Module
Ans : c

10. The information that gets transformed in encryption is ____________


a) Plain text
b) Parallel text
c) Encrypted text
d) Decrypted text
Ans : a

11.Number of phases in the handshaking protocol?


a) 2
b) 3
c) 4
d) 5
Ans : c

12. Which is the key exchange algorithm used in CipherSuite parameter?


a) RSA
b) Fixed Diffie-Hellman
c) Ephemeral Diffie-Hellman
d) Any of the mentioned
Ans : d

13. The certificate message is required for any agreed-on key exchange method
except _______________
a) Ephemeral Diffie-Hellman
b) Anonymous Diffie-Hellman
c) Fixed Diffie-Hellman
d) RSA
Ans : b

14. The DSS signature uses which hash algorithm?


a) MD5
b) SHA-2
c) SHA-1
d) Does not use hash algorithm
Ans : c

15. The RSA signature uses which hash algorithm?


a) MD5
b) SHA-1
c) MD5 and SHA-1
d) None of the mentioned.
Ans : c

16. The certificate_request massage includes two parameters, one of which is-
a) certificate_extension
b) certificate_creation
c) certificate_exchange
d) certificate_type
Ans : d

17. An asymmetric key cipher uses


a) 1-key
b) 2-key
c) 3-key
d) 4-key
Ans : b

18. The shift cipher sometimes referred to as


a) Caesar cipher
b) Shift cipher
c) Cipher
d) Cipher text
Ans : a

19. Firewalls can be of _______ kinds.


a) 1
b) 2
c) 3
d) 4
Ans : c

20. _________________ is the kind of firewall is connected between the device and
the network connecting to internet.
a) Hardware Firewall
b) Software Firewall
c) Stateful Inspection Firewall
d) Microsoft Firewall
Ans : a

You might also like