MCQ DBMS
MCQ DBMS
MCQ DBMS
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Relational
Database and Database Schema”.
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
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.
Answer: b
Explanation: Tuple is one entry of the relation with several attributes which are fields.
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.
Answer: b
Explanation: None.
Answer: a
Explanation: The values only count. The order of the tuples does not matter.
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!
Recommended Posts:
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
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.
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
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!
Recommended Posts:
This set of Database MCQs focuses on “Relational Query Operations and Relational Operators”.
Answer: a
Explanation: Query language is a method through which the database entries can be accessed.
advertisement
Answer: d
Explanation: The attributes name, dept and tot_cred can have same values unlike ID.
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.
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
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!
Recommended Posts:
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)
Answer: b
Explanation: Data Definition language is the language which performs all the operation in
defining structure of relation.
advertisement
4.
SELECT * FROM employee
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
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
Answer: b
Explanation: Delete command removes the entries in the table.
9.
advertisement
INSERT INTO instructor VALUES (10211, ’Smith’, ’Biology’, 66000);
Answer: b
Explanation: The values are manipulated. So it is a DML.
Answer: a
Explanation: Integrity constraint has to be maintained in the entries of the relation.
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!
Recommended Posts:
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
Answer: b
Explanation: Join clause joins two tables by matching the common column.
7.
SELECT * FROM employee WHERE salary>10000 AND dept_id=101;
Answer: d
Explanation: Here * is used to select all the fields of the relation.
advertisement
8.
Answer: d
Explanation: Greater than symbol does not include the given value unlike >=.
Answer: d
Explanation: This query do not have from clause which specifies the relation from which the
values has to be selected.
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.
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!
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;
2.
SELECT * FROM employee WHERE dept_name="Comp Sci";
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.
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;
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;
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.
Answer: c
Explanation: || is the concatenation operator.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Set
Operations”.
Answer: b
Explanation: Union operator combines the relations.
advertisement
Answer: b
Explanation: Intersection operator ignores unique tuples and takes only common ones.
Answer: d
Explanation: None.
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);
Answer: d
Explanation: Except keyword is used to ignore the values.
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
Answer: b
Explanation: None.
Answer: c
Explanation: Having is used to provide additional aggregate filtration to the query.
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.
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!
Recommended Posts:
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.
Answer: c
Explanation: Primary key must satisfy unique and not null condition for sure.
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.
Answer: d
Explanation: Since unknown does not hold any value the value cannot have a reverse value.
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!
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.
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.
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!
Recommended Posts:
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
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
Answer: c
Explanation: With is used to create temporary relation and its not an aggregate function.
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Modification
of Database”.
Answer: a
Explanation: Delete can delete from only one table at a time.
advertisement
2.
Delete from r where P;
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.
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’);
Answer: c
Explanation: The query must include building=watson condition to filter the tuples.
6.
UPDATE instructor
_____ salary= salary * 1.05;
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
Answer: c
Explanation: The case statements can add the order of updating tuples.
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
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
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Join
Expressions”.
Answer: a
Explanation: On gives the condition for the join expression.
advertisement
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);
b)
SELECT *
FROM student OUTER JOIN takes USING (ID);
c)
SELECT *
FROM student LEFT OUTER JOIN takes USING (ID);
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..
Answer: d
Explanation: Join can combine multiple tables.
Answer: d
Explanation: There are totally four join types in SQL.
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.
Answer: a
Explanation: None.
Answer: b
Explanation: None.
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!
Recommended Posts:
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.
Answer: b
Explanation: None.
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.
Department:
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;
Answer: d
Explanation: Syntax is – create view v as <query expression>;.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Transactions”.
Answer: a
Explanation: Transaction is a set of operation until commit.
advertisement
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.
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.
Answer: b
Explanation: By atomic, either all the effects of the transaction are reflected in the database, or
none are (after rollback).
Answer: a
Explanation: None.
advertisement
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.
Answer: c
Explanation: Flashback will undo all the statements and Abort will terminate the operation.
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!
Recommended Posts:
Answer: c
Explanation: SYNTAX – alter table table-name add constraint, where constraint can be any
constraint on the relation.
advertisement
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);
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
Answer: a
Explanation: None.
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “SQL Data
Types and Schemas”.
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.
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
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.
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
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!
Recommended Posts:
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
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 ;
b)
CREATE ROLE instructor;
GRANT SELECT ON takes
TO instructor;
c)
advertisement
CREATE ROLE instructor;
GRANT DELETE ON takes
TO instructor;
Answer: c
Explanation: The role is first created and the authorization is given on relation takes to the role.
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.
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.
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!
Recommended Posts:
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.
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
Answer: a
Explanation:? is used as a placeholder whose value can be provided later.
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
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.
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!
Recommended Posts:
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
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
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.
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.
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.
Answer: b
Explanation: If it an atomic statement then the statements are in single transaction.
Answer: d
Explanation: None.
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.
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!
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Triggers”.
Answer: b
Explanation: Triggers are automatically generated when a particular operation takes place.
advertisement
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.
Answer: b
Explanation: AFTER TRIGGERS can be classified further into three types as: AFTER INSERT
Trigger, AFTER UPDATE Trigger, AFTER DELETE Trigger.
advertisement
Answer: b
Explanation: Example : declare @empid int; where empid is the variable.
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
Answer: c
Explanation: Triggers are not possible for create, drop.
Answer: a
Explanation: Triggers can be manipulated.
Answer: c
Explanation: None.
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!
Recommended Posts:
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
Answer: b
Explanation: Order by clause arranges the values in ascending or descending order where a
default is ascending order.
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
____________;
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;
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “OLAP”.
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.
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
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
Answer: a
Explanation: None.
9.
SELECT item name, color, clothes SIZE, SUM(quantity)
FROM sales
GROUP BY rollup(item name, color, clothes SIZE);
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.
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!
Recommended Posts:
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
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.
Answer: d
Explanation: Generalization Selection takes only one argument for operation.
Answer: a
Explanation: None.
advertisement
Answer: b
Explanation: The expression is evaluated from left to right according to the precedence.
Answer: d
Explanation: The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT
joins.
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
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!
Recommended Posts:
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.
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”))}
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.
Answer: b
Explanation: The comparison operators are (<, ≤, =, =, >, ≥).
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.
Answer: d
Explanation:Э is used to denote “some” values in relational calculus.
advertisement
Answer: d
Explanation: None.
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!
Recommended Posts:
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.
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
Answer: c
Explanation: NULL always represents that the value is not present.
Answer: a
Explanation: Name and Date_of_birth cannot hold more than 1 value.
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.
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!
Recommended Posts:
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.
Answer: d
Explanation: Here more than one entity in one set is related to one one entity in other set.
Answer: c
Explanation: The data entered will be in a particular cell (i.e., table column).
advertisement
Answer: b
Explanation: Only particular value satisfying the constraints are entered in the column.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Entity-
Relationship Diagrams”.
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
Answer: d
Explanation: Dashed lines link attributes of a relationship set to the relationship set.
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
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
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!
Recommended Posts:
Consider the following relational schemas and answer the questions below
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.
Answer: c
Explanation: Both the entries has unique entry.
3.
advertisement
SELECT * FROM teaches WHERE Sec_id = 'CS-101';
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;
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).
Answer: c
Explanation: The value Name cannot be a primary key.
advertisement
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.
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!
Recommended Posts:
Answer: a
Explanation: Treating a phone as an attribute phone_number implies that instructors have
precisely one phone number each.
advertisement
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
Answer: d
Explanation: Ellipse represents attributes, rectangle represents entity.
Answer: b
Explanation: Binary word usually represents two attributes.
Answer: d
Explanation: Directory is a low level to word on in file system.
advertisement
Answer: c
Explanation: Primary key of one relation used as an attribute in another relation is called foreign
key.
Answer: b
Explanation: View is a logical portion of a database which is needed by some users.
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
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!
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
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
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
Answer: b
Explanation: Partial generalization or specialization – Some higher-level entities may not belong
to any lower-level entity set.
Answer: a
Explanation: The subclasses are combined to form the superclass.
Answer: a
Explanation: A parent may be called as a strong entity.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Querying
database part-1 DDL”.
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.
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.
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.
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!
Recommended Posts:
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 .
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);
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.');
Answer: d
Explanation: This displays the names of instructors with salary greater than that of some (at least
one) instructor in the Biology department .
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Atomic
Domains”.
Answer: a
Explanation: A set of names is an example of a nonatomic value.
advertisement
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
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.
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.
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.
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Normal
Forms”.
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.
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.
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.
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.
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!
Recommended Posts:
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
Answer: c
Explanation: It is possible to use Armstrong’s axioms to prove that Pseudotransitivity rule is
sound.
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)
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.
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.
Answer: c
Explanation: Here the keys are not formed by B and C.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Algorithms for
Decomposition”.
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
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}
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
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
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
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!
Recommended Posts:
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
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.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Database
Design Process”.
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
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
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.
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!
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.
Answer: b
Explanation: The actions in GUI are usually performed through direct manipulation of the
graphical elements.
Answer: a
Explanation: An application programming interface specifies how some software components
should interact with each other.
advertisement
Answer: c
Explanation: An application programming interface specifies how some software components
should interact with each other.
Answer: c
Explanation: A blueprint is a reproduction of a technical drawing, documenting an architecture
or an engineering design, using a contact print process.
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.
Answer: c
Explanation: In computing, graphical user interface is a type of user interface that allows users
to interact with electronic devices.
Answer: c
Explanation: In computing, graphical user interface is a type of user interface that allows users
to interact with electronic devices.
advertisement
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Web
Fundamentals”.
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
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.
Answer: b
Explanation: Meta data is the data about data which is included in the meta data tag.
advertisement
Answer: d
Explanation: <> are tags,size is a attribute.
Answer: d
Explanation: .doc is used only for the word document format.
Answer: c
Explanation: The heading levels are h1,h2,h3,h4,h5,h6.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Servlets and
JSP”.
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.
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
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.
Answer: b
Explanation: Servlets are commonly used to generate dynamic responses to HTTP requests.
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.
Answer: c
Explanation: Metadata contains data about other data which is given in the <meta>…</meta>
tags.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Application
Architectures”.
Answer: a
Explanation: Presentation is abstracted from dialogue and application.
advertisement
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.
Answer: d
Explanation: All of the mentioned are the main task accomplished by the user.
Answer: d
Explanation: The portability concerns founded in Seeheim model are- Replacing the
presentation toolkit and Replacing the application toolkit.
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!
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
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
Answer: d
Explanation: Create is a DDL operation.
Answer: d
Explanation: Sequence is a series of items which is like a unique index.
Answer: b
Explanation: ALTER SYSTEM ARCHIVE LOG CURRENT is the best practice for production
backup scripts with RMAN. .
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.
Answer: a
Explanation: SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC;.
Answer: a
Explanation: The CREATE INDEX statement is used to create indexes in tables.
advertisement
Answer: a
Explanation: SMON (System MONitor) is an Oracle background process created when you start
a database instance.
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.
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!
Recommended Posts:
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
Answer: d
Explanation: Both array and linked lists are in data structure concepts.
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
Answer: d
Explanation: There are several types of traversals.
Answer: b
Explanation: Search is performed by traversing through the tree.
Answer: a
Explanation: The operator tree has a tree like format where the evaluation starts from root of the
tree.
advertisement
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Application
Security”.
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
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.
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.
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
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!
Recommended Posts:
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.
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
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.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Physical
Storage Media”.
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.
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
Answer: a
Explanation: Flash memory is of two types – NAND and NOR.
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.
Answer: c
Explanation: Tape storage is used primarily for backup and archival data.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Magnetic Disk
and Flash Storage”.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “RAID”.
Answer: a
Explanation: RAID level 1 refers to disk mirroring with block striping.
advertisement
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Tertiary
Storage”.
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
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.
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.
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.
Answer: b
Explanation: Physical database design is the process of selecting the data storage and data
access characteristics of the database.
advertisement
Answer: d
Explanation: Network model has data stored in a hierarchical network flow.
Answer: b
Explanation: Network model has data stored in a hierarchical network flow.
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
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!
Recommended Posts:
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.
Answer: c
Explanation: Users see the data in one global schema.
advertisement
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.
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.
Answer: b
Explanation: Database is a collection of all tables which contains the data in form of fields.
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!
Recommended Posts:
This set of Database Questions and Answers for Aptitude test focuses on “Organization of
Records in Files”.
Answer: d
Explanation: The database is always consistent and so there is no duplication.
advertisement
Answer: b
Explanation: This is more useful for all recovery actions.
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.
Answer: d
Explanation: The data are traversed using several algorithms.
Answer: b
Explanation: All the data are stored in form of memory in the disk.
advertisement
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
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!
Recommended Posts:
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.
Answer: a
Explanation: A tablespace is a storage location where the actual data underlying database
objects can be kept.
advertisement
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.
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.
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
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!
Recommended Posts:
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
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.
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
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!
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
Answer: d
Explanation: Nonleaf nodes are also referred to as internal nodes.
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
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!
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
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
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.
Answer: c
Explanation: A formula generates the hash, which helps to protect the security of the
transmission from unauthorized users.
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.
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
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Ordered
Indexing and Hashing”.
Answer: c
Explanation: Encryption algorithms are used to keep the contents safe.
advertisement
Answer: b
Explanation: Only if the criteria is fulfilled the values are hashed.
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.
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.
Answer: a
Explanation: The tables are always related in the database to form consistency.
Answer: c
Explanation: The is binary n-array association meaning more than two classes are involved in
the relationship.
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!
Recommended Posts:
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
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
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Index
Definition in SQL”.
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.
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.
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
Answer: b
Explanation: Indexes tend to improve the performance.
Answer: b
Explanation: Indexes take memory slots which are located on the disk.
Answer: b
Explanation: A composite index is an index on two or more columns of a table.
advertisement
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Query
Processing”.
Answer: b
Explanation: Database is a collection of related tables.
advertisement
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.
Answer: b
Explanation: One entity department is related to several employees.
advertisement
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.
Answer: b
Explanation: Concurrency control ensures that correct results for concurrent operations are
generated while getting those results as quickly as possible.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Selection
Operation”.
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.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Sorting”.
Answer: b
Explanation: The operations taking place with the time and space is counted.
Answer: a
Explanation: Time complexity maintains the maximum time needed.
Answer: d
Explanation: Null case cannot be counted as the factor for complexity.
advertisement
Answer: d
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.
Answer: a
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.
Answer: a
Explanation: Algorithmic complexity is concerned about how fast or slow particular algorithm
performs.
advertisement
Answer: a
Explanation: It refers to n values complexity in the algorithm which can be reduced by choosing
the other algorithms.
Answer: b
Explanation: This shows that it has a standard complexity in addressing.
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
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!
Recommended Posts:
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
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”.
Answer: d
Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN.
advertisement
Answer: d
Explanation: INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN, EQUIJOIN are the types
of joins.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Evaluation of
Expressions”.
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.
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.
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!
Recommended Posts:
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
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.
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.
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*)*.
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!
Recommended Posts:
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.
Answer: c
Explanation: PRINT @@TRANCOUNT — The BEGIN TRAN statement will increment the —
transaction count by 1.
Answer: c
Explanation: A database cursor is a control structure that enables traversal over the records in a
database.
advertisement
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
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
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!
Recommended Posts:
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.
Answer: b
Explanation: Redundancy in BCNF is low when compared to 3NF.
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
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.
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.
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
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.
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Advanced
Query Optimization”.
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.
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
Answer: d
Explanation: The database object name is referred to as its identifier.
Answer: b
Explanation: The terms literal and constant value are synonymous and refer to a fixed data
value.
Answer: d
Explanation: The terms literal and constant value are synonymous and refer to a fixed data
value.
advertisement
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
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!
Recommended Posts:
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
Answer: d
Explanation: Because of the above three properties, transactions are an ideal way of structuring
interaction with a database.
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.
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
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
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!
Recommended Posts:
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
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.
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
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.
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
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!
Recommended Posts:
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
Answer: b
Explanation: Information residing in nonvolatile storage survives system crashes.
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.
Answer: a
Explanation: ASCII text format uses the standard text file for the changing the value.
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.
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
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!
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
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.
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.
Answer: b
Explanation: The transaction states are abort, active, committed, partially committed, Failed.
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!
Recommended Posts:
Answer: b
Explanation: Inner query joins only the rows that are matching.
advertisement
Answer: a
Explanation: Like matches the pattern with the query.
Answer: a
Explanation: All these are functions of the database.
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.
Answer: b
Explanation: Query optimization is used to improve quality.
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.
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
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!
Recommended Posts:
This set of Database Questions and Answers for Experienced people focuses on ” Querying
database part – 4″.
Answer: c
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
advertisement
Answer: d
Explanation: Data modelling designs the data in a secured manner.
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
Answer: b
Explanation: Insertion anomaly is due to confusion in data deletion or insertion.
Answer: a
Explanation: Normalization helps in improving the quality of the data.
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
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!
Recommended Posts:
This set of Database Interview Questions and Answers for Experienced people focuses on ”
Querying database part – 5″.
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.
Answer: a
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
advertisement
Answer: a
Explanation: SQL-99 is the most recent version of standard SQL prescribed by the ANSI.
Answer: b
Explanation: External users are the people who do not involve in the processing of the database.
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.
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
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!
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
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on
“Implementation of Isolation Levels”.
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.
Answer: c
Explanation: View is the temporary space created for the database.
advertisement
Answer: d
Explanation: This will replicate the table as in the select statement.
Answer: d
Explanation: This will replicate the table as in the select statement.
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;
Answer: c
Explanation: This will replicate the table as in the select statement.
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!
Recommended Posts:
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
Answer: d
Explanation: Snapshot gets the instance of the database at that time.
Answer: c
Explanation: ACID properties are the properties of transactions.
Answer: a
Explanation: Check and foreign constraints are used to constraint the table data.
advertisement
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.
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.
Answer: d
Explanation: Read committed is used to commit the default read operation.
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
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!
Recommended Posts:
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
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!
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
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Multiple
Granularity”.
Answer: a
Explanation: This level is the root of the tree.
advertisement
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
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!
Recommended Posts:
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
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Snapshot
Isolation”.
Answer: a
Explanation: It has gained wide acceptance in commercial and open-source systems, including
Oracle, PostgreSQL, and SQL Server.
advertisement
Answer: d
Explanation: The data values in the snapshot consist only of values written by committed
transactions.
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.
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.
Answer: b
Explanation: Syntax: create table table_name(name constraint).
advertisement
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.
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!
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
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Insertion
Deletion Predicate Reads”.
Answer: d
Explanation: Indexes are used to access the data efficiently.
advertisement
Answer: d
Explanation: Committing a transaction refers to making the changes to record in the database.
Answer: c
Explanation: The VERSIONS BETWEEN clause of the SELECT statement is used to create a
Flashback Version Query.
advertisement
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.
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.
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;
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;
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.
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.
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!
Recommended Posts:
Answer: b
Explanation: Hash technique uses particular hash key value.
advertisement
Answer: c
Explanation: Indices do not have to be treated like other database structures.
Answer: d
Explanation: Two techniques are present.
Answer: a
Explanation: It moves in a crab like manner.
advertisement
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Failure
Classification”.
Answer: a
Explanation: It must minimize the time for which the database is not usable after a failure.
advertisement
Answer: c
Explanation: Types of system failure are transaction failure, system crash and disk failure.
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.
Answer: b
Explanation: Blocks are the units of data transfer to and from disk, and may contain several data
items.
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!
Recommended Posts:
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
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!
Recommended Posts:
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.
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Failure with
Nonvolatile Storage”.
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
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
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!
Recommended Posts:
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.
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
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!
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Lock Release
and Undo Operations”.
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
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.
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.
Answer: a
Explanation: Undo erases all the changes and redo makes the deleted changes.
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.
Recommended Posts:
This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Remote
Backup Systems”.
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
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.
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.
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.
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
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!
Recommended Posts:
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. }
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/-
Recommended Posts:
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. }
Recommended Posts:
a. Stored in main memory and stays resident there even after the application that uses it terminates.
c. Stored indefinitely in case it's needed since storing it is much cheaper now.
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.
Answer: (b).It has evolved over the years into a fairly simple set of tools that are relatively easy to master.
b. Allows a user to submit queries to a database without having to know how the data will be retrieved.
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
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.
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
Answer: (a).It is very different and much more challenging than managing the other physical resources of an org
c. Query Language
a. Network Maintenance
b. Routine Maintenance
c. Schema Definition
a. A Row
b. A Table
c. A Field
d. A Column
a. Table
b. Relation
c. Attributes
d. Domain
Answer: (c).Attributes
a. Deletion
b. Insertion
c. Sorting
d. Updating
Answer: (c).Sorting
a. Null = 0
b. Null < 0
c. Null > 0
d. Null <> 0
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
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)
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. Physical Level
b. Critical Level
c. Logical Level
d. View Level
a. Database Schema
b. Physical Schema
c. Critical Schema
d. Logical Schema
a. Entity-Relationship model
a. Database Instance
b. Database Snapshot
c. Database Schema
a. Database Schema
b. Database Instance
c. Database Snapshot
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
d. Bottom – Up approach
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
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
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
a. NULL
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
16. If a denormalization situation exists with a one-to-one binary relationship, which of the following is true?
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
c. Block contention
1. A Relation is a
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
a. Superkey
b. Domain
c. Attribute
d. Schema
Answer: (a).Superkey
a. Schema keys
b. Candidate keys
c. Domain keys
d. Attribute keys
Answer: (a).it takes a list of values and return a single values as result
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
c. Method constraints
4. ______ is a special type of integrity constraint that relates two relations & maintains consistency across th
d. Domain Constraints
a. Tape Storage
b. Optical Storage
c. Flash memory
6. Which of the following creates a virtual relation for storing the query ?
a. Function
b. View
c. Procedure
7. Which of the following is the syntax for views where v is view name ?
c. Data isolation
a. RAID level 1
b. RAID level 2
c. RAID level 0
d. RAID level 3
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
c. Multi-purpose dependencies
c. Multi-purpose 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
a. BCNF
b. PJNF
c. 5NF
a. Database definition.
b. Database manipulation.
c. Database control.
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
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
a. Mean(salary)
b. Avg(salary)
c. Sum(salary)
d. Count(salary)
Answer: (b).Avg(salary
Oral Questions and Answers (DBMS LAB)
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.
• Data definition
• Update
• Retrieval
• Administration
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.
• 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.
Organized data void of inconsistent dependency and redundancy within a database is called
normalization.
• No duplicate entries
• Saves storage space
• Boasts the query performances.
Boosting up database performance, adding of redundant data which in turn helps rid of complex
data is called denormalization.
They are:
CREATE:
ALTER:
DROP:
A database object which helps in manipulating data row by row representing a result set is called
cursor.
They 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.
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.
Functions which operate against a collection of values and returning single value is called
aggregate functions
Oral Questions and Answers (DBMS LAB)
Scalar function is depended on the argument given and returns sole value.
25) What restrictions can you apply when you are creating views?
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.
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.
Joins help in explaining the relation between different tables. They also enable you to select data
with relation to data in another table.
• 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.
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)
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)
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.
HEAP tables are present in memory and they are used for high speed storage on temporary
basis.
• 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)
• SET
• BLOB
• ENUM
• CHAR
• TEXT
• VARCHAR
• PHP Driver
• JDBC Driver
• ODBC Driver
• C WRAPPER
• PYTHON Driver
• PERL Driver
• RUBY Driver
• CAP11PHP Driver
• Ado.net5.mxj
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.
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?
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.
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)
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.
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:
Mongo-DB is a document database which provides high performance, high availability and easy
scalability.
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)
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.
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.
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?
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)
Objectld is composed of
• Timestamp
• Client machine ID
• Client process ID
• 3 byte incremented counter
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.”)
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.
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.
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
6) E-mail is
a) Loss-tolerant application
b) Bandwidth-sensitive application
c) Elastic application
d) None of the mentioned
Answer: c
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
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
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
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
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?
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
Topics >>
Electronics and Communication Engineering >>
Computer Network -07/09/15
« Previous
Next »
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
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
3. Which intermediaries are more likely to get involved during the transfer function of an e-mail
system?
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
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
26. Consider the assertions given below. Which among them prove to be beneficial for
Persistent HTTP 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
Answer: a
Explanation: The Ethernet frame has a header that contains the source and destination MAC
address. Each MAC address is of 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.
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
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
16) In Ethernet frame the flag of the Start Frame Delimiter (SFD) is
a) 11000011
b) 10101011
c) 10010011
d) 11011011
Answer : b 10101011
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
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
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
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
Answer: (a).10Base 5
Answer: a
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
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.
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
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
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
12. The maximum frame length for 10-Mbps Ethernet is_______ bytes.
A. 1518
B. 1500
C. 1200
D. none of the above
15. _______ uses four twisted-pair cables that connect each station to a common hub.
A. 10Base5
B. 10Base2
C. 10Base-T
D. 10Base-F
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
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.
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.
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.
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.
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
a) IP address
b) MAC address
c) Url
a) ARP
b) RARP
c) proxy ARP
a) BootP
b) RARP
c) ARP
a) IP
b) UDP
c) ARP
d) TCP
7) ARP is a---
a) 8
b) 10
c) 12
d) 16
a) Trigger
b)Integer
c)Repeater
d)Process Header
12) DHCP provides static and dynamic address allocation that can be
a) Manual
b) Automatic
c) Both a and b
d) None
a) IPv6
b) IPv4
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
a) MAC address
b) IP address
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
1. W
hat are the functions of the transport layer?
a) Multiplexing/ Demultiplexing
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
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
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
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 _________
13. U
DP packets are called as _________
a) Segments
b) Checksum
c) Frames
d) Datagrams
a) TCP
b) UDP
15. A
RQ stands for __________
16. Which among the following are delivered by the transport layer in process-to-process
delivery mechanism?
a) Frames
b) Datagrams
c)Packets
b) Registered Ports
c)Dynamic Ports
18. What is the purpose of using source & destination port numbers respectively in the addressing
method of transport layer?
a) socket
b) pipe
c) port
d) machine
a) port
b) pipe
c) node
d) protocol
22) Transport layer aggregates data from different applications into a single stream before passing
it to:
a) network 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.
b) Registered
c) Dynamic
d)None
a) 8
b) 16
c) 32
d)64
a) transport address
b) network address
c) socket address
6. E-mail is _________
a) Loss-tolerant application
b) Bandwidth-sensitive application
c) Elastic application
d) None of the mentioned
Ans : c
Ans : d
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
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
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
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
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
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