53 DBMS & SQL (Computer Science) questions asked in CIL MT previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Identify the correct option for project operation in relational algebra:
Statement-1: The project operation is a binary operation that returns its argument
relation, with certain tuple left out.
Statement-2: The result of the PROJECT operation can be visualized as a
horizontal partition of the relation into two relations: one has the needed rows (tuples) and contains the result of the operation, and the other contains the discarded rows.
AStatement-1 is True and Statement-2 is False
BStatement-1 is True and Statement-2 is True
CStatement-1 is False and Statement-2 is True
DStatement-1 is False and Statement-2 is False
Show answerHide answer
Correct answer: (D) Statement-1 is False and Statement-2 is False
Which of the following statements correctly describes Isolation and Transaction Isolation Levels in a database system?
Statement-1: Ensuring the isolation property is the responsibility of a component
of the database system called the concurrency-control system.
Statement-2: The isolation levels may be Serializable, Repeatable read, Read
committed, Read uncommitted and all the isolation levels additionally disallow dirty writes, that is, they disallow writes to a data item that has already been written by another transaction that has not yet committed or aborted.
AStatement-1 is True and Statement-2 is True
BStatement-1 is True and Statement-2 is False
CStatement-1 is False and Statement-2 is False
DStatement-1 is False and Statement-2 is True
Show answerHide answer
Correct answer: (A) Statement-1 is True and Statement-2 is True
Which of the following statements are TRUE about server and client side scripting in computer networks?
S1: PHP is used for server side scripting S2: HTML is used for database operations S3: CSS is used for server side scripting S4: ASP.NET is used for server side scripting
AThe cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.
BThe cardinality ratio for a binary relationship specifies the minimum number of relationship instances that an entity can participate in.
CThe partial participation constraint is also called existence dependency.
DThe cardinality ratio for a binary relationship specifies the average number of relationship instances that an entity can participate in.
Show answerHide answer
Correct answer: (A) The cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.
Considering the relation schemas R (A, B, C, D) and S (C, D, E, F), what will be the degree of the resultant relation of the following Relational Algebra expression, where "*" represents the "natural join" operation?
(σc1(ΠA,B,C(R))) * (σc2(ΠC,D,E(S)))
Given total number of instances of a resource to be 18, three processes (P1, P2, and P3) and the resource requirement and allocation table are given below. Which of the following orders of process execution forms a safe (deadlock free) sequence?
Process – Max. Need – Current Allocation
P1 – 12 – 7
P2 – 10 – 5
P3 – 5 – 4
Consider the following relation schema R and S along with their tuple sets.
R(A, B) = {<a1, b1>, <a2, b1>, <a3, b1>, <a4, b1>, <a1, b2>, <a3, b2>, <a2, b3>, <a3, b3>, <a4, b3>, <a1, b4>, <a2, b4>, <a3, b4>}
S(A) = {a1, a2, a3}
What is the value of T ← R / S, where "/" represents the Relational Algebra "division" operation?
Which of the following statements about the "DELETE" command is FALSE?
AIt removes tuples from a relation (table).
BIt removes tuples as well as the relation (table).
CA missing WHERE clause specifies that all tuples in the relation are to be deleted.
DDepending on the number of tuples selected by the condition in the WHERE clause, zero, one or several tuples can be deleted by a single DELETE command.
Show answerHide answer
Correct answer: (B) It removes tuples as well as the relation (table).
Considering the process details given in the following table, what will be the completion order of the processes under the policies FCFS and RR (with CPU quantum of 2 time units)?
Process ID – CPU Burst – Arrival Time
P1 – 5 – 3
P2 – 7 – 2
P3 – 5 – 0
Consider the following relation schema R along with the tuples.
Employee(name, salary) = {<e1, 10000>, <e2, 5000>, <e3, 2500>, <e4, 7500>, <e5, 8900>, <e6, 9800>}
What is the output of following SQL query?
SELECT name, MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee);
Consider the process details given in the following table.
Process ID – CPU Burst – Arrival Time – Priority
P0 – 3 – 0 – 1
P1 – 9 – 2 – 4
P2 – 7 – 4 – 3
P3 – 6 – 3 – 2
A new pre-emptive scheduling algorithm is proposed, i.e., the Longest Remaining Time Next (LRTN), wherein ties are broken by giving priority to the process with the highest priority. Calculate the following.
i. Turnaround time for Process P2
ii. Response time for Process P3
Consider the characters and their frequency counts given in the following table.
Character: a, b, c, d, e, f
Frequency (in 1000s): 24, 16, 12, 20, 8, 4
Using the Huffman coding technique, which of the following is the valid code for character 'c'?
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.
Consider the following table of arrival time and burst time for three processes P0, P1, P2.
P0: Arrival time 0 s, Burst time 9 s
P1: Arrival time 1 s, Burst time 4 s
P2: Arrival time 2 s, Burst time 9 s
The preemptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of process. The average waiting time for the three process is ________.
A trigger has three parts.
The ________ describes the change that activates the trigger.
The _______ is a query that is run whenever the trigger is activated.
The ______ is the procedure that is executed if the trigger is activated and the condition is true.
Write true (T) / false (F) for each of the following statements:
A. Symbol table is used only in first phase of a compiler.
B. A pretty printer analyses a program and prints it in such a way that the structure of the program becomes early visible.
C. YACC build up LALR parsing table.
D. If a grammar is LALR(1), it is not necessarily SLR(1)
Consider the following relational schema
Sailors(sid, sname, rating, age)
Reserves(sid, bid, day)
Boats(bid, bname, color)
What is the equivalent of following relational algebra query in SQL query
π_sname ((σ_color='red' Boats) ⋈ Reserves ⋈ Sailors)
ASELECT S.sname, S.rating FROM Sailors S, Reserves R WHERE S.sid = R.sid AND R.bid = B.bid AND B.color = 'red'
BSELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE S.sid = R.sid AND R.bid = B.bid AND B.color = 'red'
CSELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE S.sid = R.sid AND B.color = 'red'
DSELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE R.bid = B.bid AND B.color = 'red'
Show answerHide answer
Correct answer: (B) SELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE S.sid = R.sid AND R.bid = B.bid AND B.color = 'red'
A relation is in _______ form if every field contains only atomic values, that is, not lists or sets.
AFirst normal
BThird normal
CSecond normal
DFourth normal
Show answerHide answer
Correct answer: (A) First normal
How to use these CIL MT Computer Science questions
Every question here was asked in a real CIL MT paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full CIL MT papers as timed tests to check your speed under exam conditions.