Question Bank
Question Bank
QUESTIONBANK
SEM/YEAR: VI/III
Q. Course Competence
Questions Outcome BT Level
No.
1 In any hierarchy of data organization, what is the smallest
entity to be processed as a single unit is called?
(A) Data field CO1 BT1
(B) Data record
(C) Data file
(D) Database
2 There are certain packages that allow people to define
data items, place these items in particular records, combine
the records into designated files and then manipulate and
retrieve the stored data. What are they called?
CO1 BT1
(A) Data storage system
(B) Database management system (DBMS)
(C) Batch processing system
(D) Data communication package
3 Which of the following is true?- A database
management system
(A) Allows simultaneous access to multiple files
(B) Can do more than a record management system CO1 BT1
(C) Is a collection of programs for managing data in a single
file
(D) None of the above
4 Which of the following in not a function of DBA?
(A) Network Maintenance
(B) Routine Maintenance CO1 BT1
(C) Schema Definition
(D) Authorization for data access
5 What refers to the correctness and completeness of the data
in a database?
(A) Data security
CO1 BT1
(B) Data integrity
(C) Data constraint
(D) Data independence
6 Which of the following is a serious problem of
file management systems?
(A) Difficult to update
CO1 BT1
(B) Lack of data independence
(C) Data redundancy
(D) All of the above
7 Which of the following is Database Language?
(A) Data Definition Language
(B) Data Manipulation Language CO1 BT1
(C) Query Language
(D) All of the above
8 Who created the first DBMS?
(A) Edgar Frank Codd
(B) Charles Bachman CO1 BT1
(C) Charles Babbage
(D) Sharon B. Codd
9 What is scheme describes?
(A) Data elements
(B) Records and files CO1 BT1
(C) Record relationships
(D) All of the above
10 Which of the following is/are disadvantages of Database
Management System?
(A) Cost of Hardware and Software
(B) Reduce data redundancy
(C) Remove data inconsistency CO1 BT1
a) A
b) B
c) C
d) B & C
11 In the architecture of a database system what is the
external level
(A) Physical level
CO1 BT1
(B) Logical level
(C) Conceptual level
(D) View level
12 What is Data independence?
(A) Data is defined separately and not included in programs
(B) Programs are not dependent on the physical attributes of
data
(C) Programs are not dependent on the logical attributes of CO1 BT1
data
(D) Both programs are not dependent on the physical
attributes of data & programs are not dependent
on the logical attributes of data
13 What is Concurrent access?
(a) Accessing system by only single user at a time
(b) Accessing System by more than one user one by one
(c) Accessing system by more than one user at a CO1 BT1
time (simultaneously)
(d) Accessing system by single only
28
If both data and database administration exist in an
organization, the database administrator is responsible
for which of the following?
CO1 BT1
(A) Data modeling
(B) Database design
(C) Meta data
(D) All the above
29 refers to the correctness and completeness of
the data in a database?
a. Data security
b. Data integrity CO1
c. Data constraint
d. Data independence
30 Which of the following is not Modification of the Database?
a. Deletion
b. Insertion
CO1 BT1
c. Sorting
d. Updating
UNIT-2
QUESTION
BANK
SEM/YEAR: VI/III
Q. Course
Compete
Questions Outcom nceBT
No. e Level
A relational database consists of a collection of
A. Tables
B. Fields
C. Records
1 D. Keys CO2 BT1
A in a table represents a relationship among a set CO2
of values.
A. Column
2 B. Key BT2
C. Row
D. Entry
The term attribute refers to a of a table. CO2
A. Record
B. Column
3 BT1
C. Tuple
D. Key
A is a set of entities of the same type that share the same CO2
properties, or attributes.
A. Entity set
B. Attribute set
4 BT1
C. Relation set
D. Entity model
A. Simple attribute
5 B. Composite attribute BT1
C. Multivalued attribute
D. Derived attribute
A. Single valued
C. Composite
D. Derived
In a relation between the entities the type and condition of the CO2
relation should be specified. That is called as attribute.
A. Descriptive
7 B. Derived BT2
C. Recursive
D. Relative
A. One-to-many
8 BT3
B. One-to-one
C. Many-to-many
D. Many-to-one
A. One-to-many
9 BT1
B. One-to-one
C. Many-to-many
D. Many-to-one
D. Domain Constraints
Which one of the following uniquely identifies the elements in the CO2
relation?
A. Secondary Key
C. Foreign key
D. Composite key
A. Constraints
D. Cursors
Let us consider phone - number, which can take single or several CO2
values. Treating phone - number as a permits instructors
to have several phone numbers (including zero) associated with
them.
A. Entity
14 BT1
B. Attribute
C. Relation
D. Value
Given the basic ER and relational models, which of the following is CO2
INCORRECT?
A. Ellipse
B. Dashed ellipse
16 CO2 BT1
C. Rectangle
D. Triangle
A. Unary
17 CO2 BT1
B. Binary
C. Ternary
D. Quaternary
A primary key is combined with a foreign key creates CO2
A. Commonality
19 BT1
B. Specialization
C. Generalization
D. Similarity
A. Overlapping
20 BT1
B. Disjointness
C. Uniqueness
D. Relational
A. Total
C. Should be specified
D. cannot be determined
The operation allows the combining of two relations by CO2
merging pairs of tuples, one from each relation, into a single
tuple.
A. Select
22 BT1
B. Join
C. Union
D. Intersection
The operation performs a set union of two “similarly CO2
structured” tables
A. Union
23 B. Join BT1
C. Product
D. Intersect
A. Child
B. Owner
24 BT1
C. Dominant
D. Parent
The subset of a super key is a candidate key under what condition? CO2
A. Tuples.
26 B. Attributes CO2 BT1
C. Tables.
D. Rows.
In an E-R diagram an entity set is represent by a
A. Rectangle.
B. Ellipse.
27 CO2 BT1
C. Diamond box.
D. Circle.
A. Unary
B. Binary
29 CO2 BT1
C. Ternary
D. Quaternary
A. 2
30 CO2 BT1
B. 4
C. 5
D. 3
Let us consider first name, middle initial, and last name as a
subparts of name attribute, then Name is a
attribute
An entity set which does not have any key attributes is called as a
A. Generalization
33 B. Partialization CO2 BT1
C. Specialization
D. Aggregation
A. Recursive
B. Many to many
36 C. One to many CO2 BT3
D. Many to one
A. Primary key
37 B. Super key CO2 BT3
C. Candidate key
D. None of these
A. Fourth
B. Third
38 CO2 BT2
C. BCNF
D. First
A. Top-down approach
39 B. Bottom-up approach CO2 BT2
C. Left-right approach
D. Right- Left approach
A. Specialization
40 B. Aggregation CO2 BT2
C. Initialisation
D. Generalization
key is a candidate key not used for primary key
A. Alternate
41 B. Foreign CO2 BT2
C. Super
D. Unique
42 A. # CO2 BT3
B. *
C. %
D. @
The set of permitted values for each attribute is called its :
A. Attribute set
B. Attribute range
43 CO2 BT3
C. Domain
D. Group
A. Unique
44 B. Alternative CO2 BT2
C. Candidate
D. Primary
A. Union
45 B. Intersection CO2 BT2
C. Minus
D. Aggregation
Which of the following is not a set operation?
A. Union
B. Intersection
D. Aggregation
A. Max
B. Min
47 CO2 BT3
C. Minus
D. Sum
CO2 BT2
In an E-R, Y is the dominant entity and X is a subordinate entity.
Then which of the following is incorrect?
A. operationally, If Y is deleted, so is X
49 B. X existence is dependent on Y CO2 BT2
C. operationally, if X is deleted, so is Y
D. operationally, if X is deleted, Y remains the same
A. Double ellipse
50 B. Dashed ellipse CO2 BT3
C. Squared ellipse
D. Ellipse with attribute name underlined
PART B (4 Marks)
What is the difference between a database schema and a database state?
The following points explain the main differences between database and
schema:
● Each database uses the memory to store the data, whereas the
schema can use a logical structure to store data.
What is an entity type? What is an entity set? Explain the differences CO2
among an entity, an entity type, and an entity set.
The entity type refers to the collection of entity that share a common
definition.
Entity set is the set of entities of the same type that share the same
attributes.
E.g. Set of all people who are customer at a particular bank can be
defined as the entity customer, while, Entity set of entities of the
same entity type.
2 BT1
Entity: It is something which has real existence.
If the newly made entity type doesn't have key attributes, it is called
weak entity type and it needs to be related to a strong entity type
(directly or indirectly) that has: key attributes of its own.
Owner (or identifying) entity type is a title for entity type that
identifies weak entity types related to it. Weak entity types include
3 one of their attributes when combining with owner entity type. BT1
Weak entity type is an entity type that does not have key attributes of
its own.
5 BT1
Describe the two alternatives for specifying structural constraints CO2
on relationship types. What are the advantages and disadvantages
of each?
● Participation constraint
Cardinality ratio
Disadvantage
Weak Entity Type: Weak entity type doesn't have a key attribute.
Weak entity type can't be identified on its own. It depends upon some
10 other strong entity for its distinct identity. CO2 BT2
1. Primary Key
2. Candidate Key
3. Super Key
4. Foreign Key
5. Composite Key
6. Alternate Key
7. Unique Key
What are the Constraints on Binary Relationship Types?
13 CO2 BT2
Explain about the Constraints on Ternary (or Higher-Degree)
Relationships.
There are two notations for specifying structural constraints on n-ary
relationships, and they specify different constraints. They should
thus both be used if it is important to fully specify the structural
constraints on a ternary or higher-degree relationship. The first
notation is based on the cardinality ratio notation of binary
relationships. The second notation is based on the (min, max)
14 notation. A (min, max) on a participation here specifies that each CO2 BT2
entity is related to at least min and at most max relationship
instances in the relation-ship set. These constraints have no bearing
on determining the key of an n-ary relationship, where n > 2, but
specify a different type of constraint that places restrictions on how
many relationship instances each entity can participate in.
A database is being constructed to keep track of the teams and games CO2
of a sports league. A team has a number of players, not all of whom
participate in each game. It is desired to keep track of the players
participating in each game for each team, the positions they played in
4 BT2
that game, and the result of the game. Design an ER schema diagram
for this application, stating any assumptions you make. Choose your
favorite sport (e.g., soccer, baseball, football).
Discuss the main categories of data models. What are the basic
differences
5 between the relational model, the object model, and the XML CO2 BT2
model?
UNIT-3
QUESTION BANK
A. CREATE
B. DROP
C. TRUNCATE
D. Al of the above
A. ROLLBACK
B. GRANT
C. UPDATE
D. Al of the above
5 Select the correct statement. CO3 BT1
A. REVOKE
B. COMMIT
C. ROLLBACK
D. SAVE
CO3
10 Difference between GRAND & REVOKE command is/are? BT1
A. RETRIEVE
B. SELECT
C. CREATE
D. ALTER
12 Which command will remove the records from the table, but CO3 BT2
not affect the structure of the table?
A. REMOVE
B. DELETE
C. DROP
D. TRUNCATE
14 BT1
Select the correct statement. CO3
16 In how many parts are the SQL functions are divided into? CO1 BT1
A. 1
B. 2
C. 3
D. 4
A. MIN()
B. MAX()
C. LARGE()
D. AVG()
20 By constraining a SQL statement, we limit the CO3 BT1
according to certain conditions
or restrictions.
A. Row
B. Column
C. Table
D. Database
2 What is TRUE about NOT NULL Constraint? CO3 BT1
1
A. In columns that are subject to the NOT NULL
constraint, duplicate values are not alowed.
B. When a table's column is declared as NOT NULL, no
record in the table can have an empty value for that
column.
C. By applying the NOT NULL constraint, we wil always
ensure that the column contains a unique value and won't
alow nuls.
D. The value wil first be checked for certain conditions
before inserting it into the column when a NOT
NULL constraint applies to a column in the table.
A. Change
B. Delete
C. Modify
D. Drop
A. Before
B. After
C. Inside
D. Outside
24 Which of the following clause cannot be used in SQL sub CO3 BT1
queries?
A. GROUP BY
B. ORDER BY
C. DELETE
D. FROM
25 In order to prevent multiple records from being CO3 BT1
returned bythe sub query, must be used before
the sub query.
28 Which of the following function gives the error code of CO1 BT1
the recently occurred exception?
A. SQLERRCODE
B. SQLERROR
C. ERRCODE
D. SQLCODE
29 Can the PL/SQL block process more than one exception at a CO1 BT1
time?
A. Yes
B. No
C. Depends upon
30 What is the output for SELECT SAL INTO V_SAL FROM CO1 BT1
EMP;
A. Al rows selected
B. First record only printed
C. Error as “exact fetch returns more than requested
number of rows”
D. Al columns selected
32 How many types of triggers are present in SQL Server? CO1 BT1
a) 4
b) 5
c) 8
d) 9
3 AFTER trigger in SQL Server can be applied to CO1 BT1
3
a) Table
b) Views
c) Table and Views
d) Function
A) Public
B) Private
C) Friend
D) Protected
40 ......................contain a pointer that keeps track of current row CO3 BT2
being accessed, which enables your program to process the
rows at a time.
A) Tracker
B) Cursor
C) Accesser
D) Trigger
A) PL/SQL Cursors
B) PL/SQL Trigger
C) PL/SQL Select
D) PL/SQL Process
A. Uncheck
B. With Check
C. Check
D. With
43 CO3 BT3
views help to keep the database up-to-date.
A. View materialization
B. View isolation
C. View updating
44 D. View maintenance CO4 BT2
A. ZERO_DIVIDE
B. VALUE_ERROR
C. TOO_MANY_ROWS
D. SELF_IS_NULL
A. DDL
B. TCL
C. DML
D. TTL
47 When creating a function, in which section wil you typicaly CO4 BT3
find a return key word?
A. Header Only
B. Declarative
C. Executable and Header
D. Executable and exception handling
A. FINAL
B. FINALLY
C. THROW
D. THROWS
PART B (4 Marks)
1 What is SQL? BT1
SQL is a database language designed for the retrieval and management of data
in a relational database.
CO3
SQL is the standard language for database management. All the RDBMS
systems like MySQL, MS Access, Oracle, Sybase, Postgres, and SQL Server
use SQL as their standard database language. SQL programming language uses
various commands for different operations. We will learn about the like DCL,
TCL, DQL, DDL and DMLcommands in SQLwith examples.
2 CO3 BT1
What is DDL?
CREATE
DROP
ALTER
TRUNCATE:
3 BT1
CO3
What is Data Manipulation Language?
There are three basic constructs which allow database program and user to
enter data and information are:
● INSERT
● UPDATE
● DELETE
4 CO3 BT2
What is DCL?
DCL (Data Control Language) includes commands like GRANT and REVOKE,
which are useful to give “rights & permissions.” Other permission controls
parameters of the database system.
● Grant
● Revoke
5 CO3 BT1
What is DQL?
Data Query Language (DQL) is used to fetch the data fromthe database. It
uses only one command:
6 CO3 BT2
What are SQL Constraints?
SQL Constraints are used to specify the rules for the data in a table.
These are used to limit which type of data must be stored in the
database, and aims to increase the accuracy and reliability of the
data stored in the database.
7 BT2
List out Aggregate functions:
CO3
These functions are used to do operations from the values of the
column and a single value is returned.
1. AVG()
2. COUNT()
3. FIRST()
4. LAST()
5. MAX()
6. MIN()
7. SUM()
8 List out Scalar functions: BT2
CO3
These functions are based on user input; these too returns single
value.
1. UCASE ()
2. LCASE ()
3. MID ()
4. LEN ()
5. ROUND ()
6. NOW ()
7. FORMAT ()
4 Explain in detail about Sub Queries, correlated sub queries CO3 BT2
5 Explain in detail about Nested Queries, Views and its Types CO3 BT2
UNIT-4
QUESTION BANK
Course Competence
Q.No. Questions Outcome BT Level
A __________expression forms a new relation after applying a
number of algebraic operators to an existing set of relations
A. Update BT1
2
B. Drop CO5
C. Truncate
D. Select
Which can be violated if a key value in the new tuple t already
exists in another tuple in the relation r(R).
A. Structured
4 B. Logical CO5 BT1
C. Procedural
D. Relational
A. a nonprocedural language
5 B. a procedural language CO5 BT1
C. a structured language
D. a unstructured language
A. primary key
6 B. referential integrity CO5 BT1
C. alternate key
D. super key
A. Intersection Value
8 BT1
B. Union Value CO5
C. Deny Value
D. Truth Value
_____________can be violated if the value of any foreign key in t
refers to a tuple that does not exist in the referenced relation.
A. Super Key
9 CO5 BT1
B. Referential integrity
C. Primary Key
D. Candidate Key
A. Finite Relation
13 B. Infinite Relation BT1
C. Invalid Relation
D. Composite Relation
Which of the following statements about normal forms is FALSE? CO5
A. transitive dependency
15 B. partial dependency BT1
C. multivalued dependency
D. full functional dependency
A. Divisible
16 CO5 BT1
B. Single atomic
C. Multiple
D. Numeric
A. Accupressure
18 BT1
B. Decomposition CO5
C. Precomposition
D. Both decomposition & precomposition
E.
Consider the relation(ABCDEF)
FDs:
AFC
CD
BE
Find the 3NF relations:
19 BT3
CO5
A. ACDF,BE,AB
B. ACDF,BE,AB,CD
C. CD,ACF,BE,AB
D. ACF,CDF,AB,BE
A. String Variables
20 BT1
B. Column Variables. CO5
C. Relation Variables
D. Tuple Variables.
22 A. 3 CO5 BT3
B. 4
C. 2
D. 5
A. indivisible values
23 B. divisible values CO5 BT1
C. single atomic values
D. multivalued attributes
In a functional dependency X --> Y, if Y is functionally dependent
on X, but not on X's proper subsets, then we would call the
functional dependency as
A. Partial Dependency
25 BT2
B. Multivalued Dependency CO5
C. Transitive Dependency
D. Full Functional Dependency.
A. {p | COND(t)}
29 B. {t | COND(t)} CO5 BT1
C. {p | COND(p)}
D. {p| P(t)}
A. Repetition of Information
30 B. Inability to represent some information CO5 BT1
C. Inconsistent database state due to some transaction
D. All of the above
A. Partial Dependency
31 CO5 BT1
B. Multivalued Dependency
C. Transitive Dependency
D. Join Dependency
A. Partial Dependency
32 B. Multivalued Dependency CO5 BT1
C. Transitive Dependency
D. Full Functional Dependency.
A. Prime
33 CO5 BT1
B. Non-prime
C. Composite
D. Derived
A. a non-prime attribute
39 CO5 BT2
B. a prime attribute
C. Composite attribute
D. Derived attribute
A. One-to-Many
41 CO5 BT1
B. Many-to-One
C. One-to-One
D. Many-to-Many
A. Denormalization
47 CO5 BT1
B. Normalization
C. Dependency
D. Relational Algebra
A. AB,BCD
48 CO5 BT3
B. AB,BC,CD
C. ABC,CAD
D. ABCD
A. 2NF
49 CO5 BT1
B. 3NF
C. 4 NF
D. BCNF
A. y⊆x
50 CO5 BT2
B. y⊂ x
C. x⊂y
D. x ⊂y and y⊂ x
PART B (4 Marks)
Explain select and project operation in relational algebra.
Ans:
Select operation
Syntax:
1 CO5 BT1
σcondition(table name)
Projection operation
Syntax:
∏condition(table name)
Ans:
What are the Pitfalls in Relational database design?
Ans:
Relational database design requires that we find a “good”
collection of relational schemas. A bad design may lead to
Repetition of information
Inability to represent certain information
Design Goals for Relational Database:
1. Avoid redundant data
2. Ensure that relationships among attributes are represented.
3. Facilitate the checking of updates for violation of database integrity
constraints
Example:
3 CO5 BT1
Consider the relational schema Lending-schema = (branch-name,
branch-city, assets, customer-name, loan- number, amount)
Redundancy:
Data for branch name, branch city, assets are repeated for each
loan that a branch makes.
Wastes space and complicates updating.
Null Values:
cannot store information about a branch if no loan exists.
can use null values, but they are difficult to handle.
In the given example the database design is faulty which makes the
above pitfalls in database. So, in relational database design if the
design is not good then there will be faults in databases.
Write short note on normalization.
Ans:
Database Normalization is a design technique. Using this we can
design or re-design schemas in the database to reduce redundant data
and the dependency of data by breaking the data into smaller and more
4 relevant tables. BT1
CO5
6 BT2
CO5
Illustrate functional dependency with example?
Ans:
Functional Dependency (FD) is a constraint that determines the
relation of one attribute to another attribute in a Database Management
System (DBMS). Functional Dependency helps to maintain the quality
of data in the database.
A functional dependency is denoted by an arrow “→”. The functional
dependency of X on Y is represented by X → Y.
Example:
Employee
Employee Name Salary City
number
7 BT2
CO5
1 Dana 50000 San Francisco
To find (AE)+:
11 CO5 BT3
result := AE
result := ABE from the FD A → B
result := ABCE from the FD E → C.
We cannot move further. Hence, the closure is ABCE.
To find (ADE)+:
result := ADE
result := ABDE from the FD A → B
result := ABCDE from the FD E → C
result := ABCDEI from the FD CD → I
We cannot move further. Hence, the closure is ABCDEI.
UNIT-V
UNIT V
Transaction concepts, properties of transactions, Serializability of transactions, testing for serializability, System
recovery, Concurrency Control, Two- Phase Commit protocol, Recovery and Atomicity, Log-based recovery,
Concurrent executions of transactions and related problems, Locking mechanism, solution to concurrency related
problems, Deadlock, Two-phase locking protocol, Isolation, Intent locking.
PART-A (Multiple Choice Questions)
Q. Questions Course Competen Page
Outcom ce Numb
No e BT Level er
1 What is a collection of operations that form a single logical unit of
work is defined as?
a) Views
CO6 BT1 625
b) Networks
c) Units
d) Transaction
Answer:
d) Transaction
2 The “all-or-none” property is commonly referred to as _________
a)Isolation
b)Durability
CO6 BT1 628
c)Atomicity
d) Consistency
Answer:
c)Atomicity
3 Which of the following is the property of transaction that protects
data from system failure?
a) Consistency
CO6 BT2 628
b)Durability
c)Atomicity
d)Isolation
Answer:
b)Durability
4 Identify the property that the database system must provide to
isolate transactions from the effects of other concurrently
executing transactions.
CO6 BT2 628
a)Consistency
b)Durability
c)Atomicity
d) Isolation
Answer:
d) Isolation
5 Which of the following is a unit of program execution that
accesses and possibly updates various data items?
a) Schedule
CO6 BT2 628
b) View
c) Transaction
d) block
Answer:
c)Transaction
6 Identify the statements used to delimit a transaction.
a) begin transaction and end transaction
b) start transaction and stop transaction
CO6 BT3 629
c) get transaction and post transaction
d) read transaction and write transaction
Answer:
a) begin transaction and end transaction
7 Highlight which property of the database is preserved when
execution of a transaction is in isolation.
a)Concurrency
CO6 BT1 629
b)Durability
c)Atomicity
d) Consistency
Answer:
d) Consistency
8 What are the ACID properties of Transactions?
a)Atomicity,Consistency,Isolation,Datacentric
b)Atomicity,Consistency,Isolation,Durability
CO6 BT2 628
c)Atomicity,Concurrency,Inconsistent,Durability
d) Automatically, Concurrency, Isolation, Durability
Answer:
b)Atomicity,Consistency,Isolation,Durability
9 Choose who has the responsibility of ensuring consistency for an
individual transaction.
a)Applicationprogrammer
CO6 BT3 630
b)Databasedesigners
c)Naïveusers
d) System Analyst
Answer:
a) Application programmer
10 Determine which state of the system no longer reflects a real state
of the world that the database is supposed to capture because of a
failure.
CO6 BT3 633
a) valid state
b) inconsistent state
c) failed state
d) waiting state
Answer:
b)inconsistentstate
11 Find out to which type of file the transaction information is
written as the database system keeps track on disk of the old
values of any data.
CO6 BT1 632
a) block
b) record
c) log
d) backup
Answer:
c)log
12 Select which component of the database handles atomicity of the
database system.
a) storage engine
CO6 BT1 633
b) log manager
c) query processor
d) recovery system
Answer:
d) recovery system
13 Choose the component of the database system that ensures the
isolation property.
a) concurrency-control system
CO6 BT3 636
b) Optimization engine
c) query processor
d) recovery system
Answer:
a)concurrency-control system
14 When a transaction may not always complete its execution
successfully it is termed as_____
a) committed
CO6 BT1 634
b) aborted
c) rollback
d) active
Answer:
a)aborted
15 To which state does the transaction move to once the changes
caused by an aborted transaction have been undone?
a) committed
CO6 BT2 634
b) aborted
c) rollback
d) active
Answer:
c)rollback
Answer:
b)Shrinking phase
34 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.
CO6 BT3 679
a) Explicit lock in exclusive mode
b) Implicit lock in shared mode
c) Explicit lock in shared mode
d) Implicit lock in exclusive mode
Answer:
d) Implicit lock in exclusive mode
35 Who is responsible for assigning, policing and managing the locks
used by the transactions?
a) Scheduler
CO6 BT1 667
b) DBMS
c) Lock manager
d) Locking agent
Answer:
c) Lock manager
36 Which type of errors causes a transaction to fail?
a) logical and system error
b) logical and process error
CO6 BT1 634
c) instance and system error
d) media and system error
Answer:
a)logical and system error
37 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 referred as ______
CO6 BT2 722
a) point based assumption
b) fail-stop assumption
c) interval based assumption
d) fail-abort assumption
Answer:
b)fail-stop assumption
38 The log is a sequence of _________ recording all the update
activities in the database.
a) Log records
CO6 BT1 632
b) Records
c) Entries
d) Redo
Answer:
Log records
39 In the ___________ scheme, a transaction that wants to update the
database first creates a complete copy of the database.
a) Shadow copy CO6 BT2 727
b) Shadow Paging
c) Update log records
d) Delete log records
Answer:
a) Shadow copy
40 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.
CO6 BT1 727
a) Shadow copy
b) Shadow Paging
c) Update log records
d) Delete log records
Answer:
b) Shadow Paging
41 If a transaction does not modify the database until it has
committed, it is said to use the ___________ technique.
a) Deferred-modification
CO6 BT1 729
b) Late-modification
c) Immediate-modification
d) Undo
Answer:
a) Deferred-modification
42 If database modifications occur while the transaction is still active,
the transaction is said to use the ___________technique.
a) Deferred-modification
CO6 BT2 729
b) Late-modification
c) Immediate-modification
d) Undo
Answer
a) Immediate-modification
43 ___________ using a log record sets the data item specified in the
log record to the old value.
a) Deferred-modification
CO6 BT2 670
b) Late-modification
c) Immediate-modification
d) Undo
Answer:
a)Undo
44 In the __________ phase, the system replays updates of all
transactions by scanning the log forward from the last checkpoint.
a) Repeating
CO6 BT1 728
b) Redo
c) Replay
d) Undo
Answer:
a)Redo
45 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. What are these log records sometimes called as?
CO6 BT1 736
a) Log records
b) Records
c) Compensation log records
d) Compensation redo records
Answer:
c)Compensation log records
PART B (4 Marks)
The database transaction system maintains the following CO6 BT2 628
four properties. These properties are often called the ACID
properties; the acronym is derived from the first letter of each of
the four properties.
● Atomicity
● Consistency
● Isolation
● Durability
Atomicity: Either all operations of the transaction are
reflected properly in the database, or none should be updated.
Consistency: Execution of a transaction in isolation
preserves the consistency of the database.
Isolation: 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.
Thus, each transaction is unaware of other transactions executing
concurrently in the system.
Durability: After a transaction completes successfully, the
changes it has made to the database persist, even if there are
system failures.
2 Explain the distinction between the term’s serial schedule and
serializable schedule.
CO6 BT1 636
T 1 T 2
read(A)
A := A
50
write(A)
read(B)
B := B + 50
write(B)
commit
read(A)
temp := A *
0.1
A := A temp
write(A)
read(B)
B := B + temp
write(B)
commit
Fig 3.2. Schedule 1 - A serial schedule in which T is followed by T
1 2
T 1 T 2
read(A)
temp := A *
0.1
A := A temp
write(A)
read(B)
B := B + temp
write(B)
read(A)
commit
A := A
50
write(A)
read(B)
B := B + 50
write(B)
commit
Two-Phase Commit
● Consider a transaction T initiated at site S , where thei
transaction coordinator is C . i
A system is in a deadlock state if there exists a set of transactions such that every transaction in the set is waiting for anoth
Note:
2. CO – Course Outcomes
BT1 –Remember BT2 – Understand BT3 – Apply BT4 – Analyze BT5 – Evaluate BT6 – Create