DBMSMCQ
DBMSMCQ
Which of the following SQL commands works on the structure/indexes of the table
DDL
DML
DCL
TCL
Q2). Which of the following is true with respect to weak entity set in an E-R diagram?
a weak entity set is always present in total participation with the identifying relationship set.
A diamond symbol is used for the representation of the relationship that exists between the two weak
entity sets or one weak and strong entity set
None of them
Q3). The database system installed on the personal computer is an example of which type of
architecture
1-tier
2-tier
3-tier
N-tier
Q4). Consider the relation student(reg_no, name, dob, course, age) which stores the roll, name, date
of birth(dob), courses taken and age of the student. The attribute reg_no is unique for every student.
Multi-valued attribute
Derived attribute
Composite attribute
Key attribute
Q5). Which of the following clause is used with alter command to update the exiting datatype of a
column to some other datatype.
alter
modify
change
rename
Q6). Consider a attribute city whose value is set to ='Mumbai' while creating the table employee.
Which of the following constraint is used to set such rule on an attribute.
Check
Default
Unique
Not NULL
Q7). In which of the following normal form, the transitive dependencies are taken care of
BCNF
Q9). What is the equivalent relational algebra query for the following SQL query
π name, age>18)(student)
σ name,age(π age>18)(student)
σ name,age>18)(student)
Q10). Consider the relation R(A,B,C,D,E) and the following functional dependencies AB->C, D->E.
Which of the following is true for the above scenario
AB is a candidate key
Q11). In a relation, if every non-key attribute is functionally dependent on a key attribute i.e primary
key, then the relation will be in
1NF
2NF
3NF
4NF
What does above SQL statement select from the student table?
None of them
Q14). The normalization of the tables in a database is done to remove which of the following
anomalies
insert
update
delete
all of them
Q15). Consider the following schedule consists of two transactions( indicated by the subscript), which
of the following problems exists in the schedule
R1(A)
R2(A)
W1(A) R2(A)
Unrepeatable Read
Dirty Read
Phantom Read
Lost Update
Q16). Consider the following transaction involving two bank accounts x and y.
The constraint that the sum of the accounts x and y should remain constant is that of
Atomicity
Durability
Consistency
Isolation
Relocking on same data item by the same transaction can be done any number of times
Atomicity
Durability
Consistency
Isolation
Partially committed
Committed
Failed
All of them
Q20). When a transaction reads a value, which is a value of an uncommitted transaction is known as
Unrepeatable Read
Dirty Read
Phantom Read
Lost Update
Q21). Which of the following is false in relation to time stamp ordering protocol
Read time stamp is the time stamp of the last transaction which executed read operation successfully
Write time stamp is the time stamp of the first transaction which executed write operation successfully.
Q22). Which of the following is used to close the IF statement block in PLSQL
END
ENDIF
END IF
Brackets
Q23). If CASE is executed without including else clause in it, and if any case does not match with any
of the given cases then which of the following is true?
Error is displayed
Exception is raised
TOO_MANY_ROWS
NO_DATA_FOUND
CASE_NOT_FOUND
RAISE_APPLICATION_ERROR
Q25). Which of the following is true about comments in PL/SQL?
The PL/SQL single-line comments start with the delimiter — (double hyphen)
Q26). Which of the following is used when you want to execute a sequence of statements based on
the results of multiple Boolean expressions
IF-THEN statement
None of them
Q27). Which of the following is the fastest file access methods?
Linear
Indexed
Linked
All of them
Stack Overflow
None of them
All of them
Q30). Consider the following PLSQL code :
DECLARE
a number := 0;
BEGIN
LOOP
a := a + 1;
END LOOP;
END;
Q31-: Which of the following triggers is used to audit the structure of the table
DML Triggers
Compound trigger
DDL trigger
Instead Trigger
Q32-: Consider a file of 8192 records with each record having 16 bytes stored in the file system
with block size 512 bytes. Assume that the key pointer pair in the index file takes 8 bytes. The
file is ordered on a non-key field and file organization is unspanned. If the secondary index is
built on the key field of the file, then the number of blocks in the first level is
64
512
128
1024
Q33-: Which of the following is the worst choice of calculating hash functions?
Q34-: Which of the following is true about the index taking space on the disk?
a) trees
b) hash
c)clustering
d)both a and b
Q36-: The hashing technique where a hash file either is allowed to expand or to shrink
dynamically is known as__________.
Linear Hashing
Extendible Hashing
Non-Linear Hashing
External hashing
Q37-: In ......................... there is an index record for every search key value in the database.
Sparse Indexing
Dense Indexing
Clustering
None of them
Q38-: The clustered indexing is used on the type of fields which are.............
the data records of the file are organized in the same order as the data entries of the index.
All of them
Q40-: Which of the following is used transforms a file key into a record location for storing the
record at the physical location
Indexed file
Hashed file
Sequential file
none of them
Q41-: If the file is stored in the contiguous blocks in the memory, without wasting any memory,
then the type of file organization is known as
Sorted
Unsorted
Spanned
Unspanned
ii.Serializability
Q44-: Which of the following normal forms is considered to be most adequate one practically
Ans-: 3NF
W2(X)
Which one of the schedules below is the correct serialization of the above?
1->2->3
2->3->1
3->1->2
1->3->2
Q46-: Consider the following four schedule consisting of three transactions,which one of the is
conflict serializable?
Ans-: r2(x);w2(x);r3(x);r1(x);w1(x)
Q47-: Consider the following schedule consists of two transactions(indicated through subscript)
R1(A);W1(A);W2(A);R2(A);commit1;commit2
Recoverable
Cascadeless
None of them
Q48-: Consider the three transactions with 3, 2 and 4 operations respectively, how many total numbers
of serial schedules are possible
2. Conflict serializability
c)Both a and b
d)None of them
Q50-: What is the value of %NOTFOUND attributes when it is used inside the cursor?
NULL
TRUE
INVALID CURSOR
All of them
Q51-: What is the output of the following code?
declare
begin
a:=5;
dbms_output.put_line(a);
end;
10
Error
declare
begin
a:='';
dbms_output.put_line(a);
end;
NULL
Hello
Statement Processed
DML Triggers
DDL Triggers
Compound Triggers
Instead Of Triggers
Q54-: Which of the following is used to ensure the type compatibility between variable declared
and columns of a table
Bind Variables
Constants
Anchored Variable
begin
a:=10;
dbms_output.put_line(a);
end;
Normalization
Relational Model
Indexing
E-R Model
Ans-: %ROWTYPE
Q58-:If the database admin is using an indexed file allocation scheme,then maximum possible
size of file depends on
Ans-: the number of blocks used for the index, and the size of the blocks