CIL MT · Computer Science

DBMS & SQL Previous Year Questions

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.

  • 53 questions
  • Official answer key
  • Free

Other Computer Science topics

Q1CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
The entity integrity constraint ensures that:
  1. ANo foreign key value can be NULL
  2. BAll attribute values must belong to the same domain
  3. CEach tuple must reference at least one other tuple
  4. DNo primary key value can be NULL
Show answerHide answer

Correct answer: (D) No primary key value can be NULL

Q2CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
Which constraint ensures that a foreign key value in one table either matches a primary key in another table or is NULL (if allowed) in DBMS?
  1. AReferential integrity
  2. BEntity integrity
  3. CDomain constraint
  4. DKey constraint
Show answerHide answer

Correct answer: (A) Referential integrity

Q3CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
If a system uses 32-bit virtual addresses and a page size of 4 KB, how many entries are needed in a single-level page table?
  1. A2¹²
  2. B2³²
  3. C2²⁰
  4. D2¹⁰
Show answerHide answer

Correct answer: (C) 2²⁰

Q4CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
Which operation in Relational Algebra is used to retrieve specific columns from a relation?
  1. ACartesian Product (×)
  2. BProjection (π)
  3. CSelection (σ)
  4. DIntersection (∩)
Show answerHide answer

Correct answer: (B) Projection (π)

Q5CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
A banking transaction commits successfully, but a system crash occurs immediately afterward. Which mechanism ensures durability?
  1. ALocking
  2. BTransaction isolation
  3. CPartial commit
  4. DRedo log
Show answerHide answer

Correct answer: (D) Redo log

Q6CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
What does each row in a relational table represent?
  1. AAttribute
  2. BTuple
  3. CDomain
  4. DColumn
Show answerHide answer

Correct answer: (B) Tuple

Q7CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
In paging, the page table is used to:
  1. AHandle external fragmentation
  2. BMap logical pages to physical frames
  3. CStore the physical addresses of all processes
  4. DKeep track of free frames only
Show answerHide answer

Correct answer: (B) Map logical pages to physical frames

Q8CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
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.
  1. AStatement-1 is True and Statement-2 is False
  2. BStatement-1 is True and Statement-2 is True
  3. CStatement-1 is False and Statement-2 is True
  4. DStatement-1 is False and Statement-2 is False
Show answerHide answer

Correct answer: (D) Statement-1 is False and Statement-2 is False

Q9CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
Which of the following correctly describes an SQL schema?
  1. AAn SQL schema is a view that aggregates data from multiple tables.
  2. BAn SQL schema automatically enforces all foreign key constraints across the database.
  3. CAn SQL schema is a table that stores all user data and constraints.
  4. DAn SQL schema is identified by a name, includes an authorization identifier for its owner, and contains descriptors for elements.
Show answerHide answer

Correct answer: (D) An SQL schema is identified by a name, includes an authorization identifier for its owner, and contains descriptors for elements.

Q10CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
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.
  1. AStatement-1 is True and Statement-2 is True
  2. BStatement-1 is True and Statement-2 is False
  3. CStatement-1 is False and Statement-2 is False
  4. DStatement-1 is False and Statement-2 is True
Show answerHide answer

Correct answer: (A) Statement-1 is True and Statement-2 is True

Q11CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
Which of the following scenarios best describes a violation of the consistency property?
  1. ATwo transactions read and write the same record simultaneously.
  2. BData from a committed transaction is deleted after a restart.
  3. CA transaction partially runs due to a crash.
  4. DA transaction completes but leaves the database in a state where total credits ≠ total debits.
Show answerHide answer

Correct answer: (D) A transaction completes but leaves the database in a state where total credits ≠ total debits.

Q12CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
In a circular queue using arrays, the rear is at index 4, front is at index 2, and capacity = 5. Which expression checks if the queue is full?
  1. A(rear + 1 == front)
  2. B(rear == front - 1)
  3. C(rear == front)
  4. D((rear + 1) % capacity == front)
Show answerHide answer

Correct answer: (D) ((rear + 1) % capacity == front)

Q13CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
What shape is commonly used to represent an entity in an ER diagram?
  1. ADiamond
  2. BEllipse
  3. CRectangle
  4. DTriangle
Show answerHide answer

Correct answer: (C) Rectangle

Q14CIL MT Systems, 24 Aug 2026 (3:00 PM, CBT-26)
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
  1. AOnly S2 and S3
  2. BOnly S1 and S4
  3. COnly S1 and S3
  4. DOnly S1, S2 and S4
Show answerHide answer

Correct answer: (B) Only S1 and S4

Q15CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following statements is TRUE?
  1. AThe cardinality ratio for a binary relationship specifies the maximum number of relationship instances that an entity can participate in.
  2. BThe cardinality ratio for a binary relationship specifies the minimum number of relationship instances that an entity can participate in.
  3. CThe partial participation constraint is also called existence dependency.
  4. 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.

Q16CIL MT Systems, 26 Mar 2017 (12:30 PM)
Two schedules are said to be ______, if the order of any two conflicting operations is same in both the schedules.
  1. Aconflict equivalent
  2. Bschema equivalent
  3. Cresult equivalent
  4. Dview equivalent
Show answerHide answer

Correct answer: (A) conflict equivalent

Q17CIL MT Systems, 26 Mar 2017 (12:30 PM)
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)))
  1. A3
  2. B4
  3. C6
  4. D5
Show answerHide answer

Correct answer: (D) 5

Q18CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following constraints enforces that the value of the primary key cannot be Null?
  1. AKey constraint
  2. BForeign key constraint
  3. CEntity integrity constraint
  4. DDomain constraint
Show answerHide answer

Correct answer: (C) Entity integrity constraint

Q19CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following relation schema is always in BCNF?
  1. AR(A, B, C, D)
  2. BR(A, B, C)
  3. CR(A, B, C, D, E)
  4. DR(A, B)
Show answerHide answer

Correct answer: (D) R(A, B)

Q20CIL MT Systems, 26 Mar 2017 (12:30 PM)
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
  1. A<P1, P2, P3>
  2. B<P3, P1, P2>
  3. C<P1, P3, P2>
  4. D<P2, P1, P3>
Show answerHide answer

Correct answer: (B) <P3, P1, P2>

Q21CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following recurrence relation can be solved using Master theorem?
  1. AT(n) = 64T(n/8) − n
  2. BT(n) = 2T(n/2) + n/(log n)
  3. CT(n) = 2ⁿT(n/2) + n
  4. DT(n) = 2T(n/2) + 1
Show answerHide answer

Correct answer: (D) T(n) = 2T(n/2) + 1

Q22CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following is used to specify whether the existence of an entity depends on its being related to another entity via the relationship type?
  1. AEntity integrity constraint
  2. BForeign key constraint
  3. CCardinality ratio
  4. DParticipation constraint
Show answerHide answer

Correct answer: (D) Participation constraint

Q23CIL MT Systems, 26 Mar 2017 (12:30 PM)
Logical data independence is the ability to change ______ schema without having to change ______ schema.
  1. Ainternal; external
  2. Bconceptual; internal
  3. Cconceptual; external
  4. Dinternal; conceptual
Show answerHide answer

Correct answer: (C) conceptual; external

Q24CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following addressing modes is more appropriate for accessing elements of an array?
  1. AIndex mode
  2. BAuto increment mode
  3. CDisplacement mode
  4. DRegister mode
Show answerHide answer

Correct answer: (A) Index mode

Q25CIL MT Systems, 26 Mar 2017 (12:30 PM)
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?
  1. AT(B) = {b1, b3}
  2. BT(B) = {b1, b2, b4}
  3. CT(B) = {b1, b4}
  4. DT(B) = {b1, b3, b4}
Show answerHide answer

Correct answer: (C) T(B) = {b1, b4}

Q26CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following statements about the "DELETE" command is FALSE?
  1. AIt removes tuples from a relation (table).
  2. BIt removes tuples as well as the relation (table).
  3. CA missing WHERE clause specifies that all tuples in the relation are to be deleted.
  4. 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).

Q27CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following statements about "total specialization" constraint is TRUE?
  1. AEvery entity in the subclass must be a member of the superclass.
  2. BEvery entity in the superclass must be a member of at least one subclass in the specialization.
  3. CAt least one entity in the superclass must be a member of at least one subclass in the specialization.
  4. DEvery entity in the superclass must be a member of all subclasses in the specialization.
Show answerHide answer

Correct answer: (B) Every entity in the superclass must be a member of at least one subclass in the specialization.

Q28CIL MT Systems, 26 Mar 2017 (12:30 PM)
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
  1. AFCFS: P1, P2, P3 and RR: P1, P2, P3
  2. BFCFS: P3, P2, P1 and RR: P3, P1, P2
  3. CFCFS: P3, P2, P1 and RR: P3, P2, P1
  4. DFCFS: P1, P3, P2 and RR: P1, P2, P3
Show answerHide answer

Correct answer: (B) FCFS: P3, P2, P1 and RR: P3, P1, P2

Q29CIL MT Systems, 26 Mar 2017 (12:30 PM)
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);
  1. A<e3, 2500>
  2. B<e5, 8900>
  3. C<e6, 9800>
  4. D<e1, 10000>
Show answerHide answer

Correct answer: (C) <e6, 9800>

Q30CIL MT Systems, 26 Mar 2017 (12:30 PM)
The number of elements in a one-dimensional array with lowest and highest index values as −1024 and 1024 is:
  1. A2048
  2. B0
  3. C1024
  4. D2049
Show answerHide answer

Correct answer: (D) 2049

Q31CIL MT Systems, 26 Mar 2017 (12:30 PM)
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
  1. A(i) 20, (ii) 6
  2. B(i) 19, (ii) 3
  3. C(i) 19, (ii) 8
  4. D(i) 20, (ii) 7
Show answerHide answer

Correct answer: (A) (i) 20, (ii) 6

Q32CIL MT Systems, 26 Mar 2017 (12:30 PM)
In clustering index, the number of index entries is same as the number of:
  1. Aattributes in data file
  2. Brecords in data file
  3. Cblocks in data file
  4. Ddistinct index field values
Show answerHide answer

Correct answer: (D) distinct index field values

Q33CIL MT Systems, 26 Mar 2017 (12:30 PM)
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'?
  1. A11111
  2. B1110
  3. C11110
  4. D110
Show answerHide answer

Correct answer: (B) 1110

Q34CIL MT Systems, 26 Mar 2017 (12:30 PM)
Which of the following attributes can be considered as composite, single-valued and key attribute?
  1. AAge
  2. BDate of birth
  3. CGender
  4. DEnrollment number
Show answerHide answer

Correct answer: (D) Enrollment number

Q35CIL MT Systems, 27 Feb 2020 (8:00 AM)
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.
  1. Arelational query languages
  2. Brelational algebra
  3. Cflow diagram
  4. Dschema diagram
Show answerHide answer

Correct answer: (D) schema diagram

Q36CIL MT Systems, 27 Feb 2020 (8:00 AM)
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 ________.
  1. A7 seconds
  2. B4 seconds
  3. C6 seconds
  4. D5 seconds
Show answerHide answer

Correct answer: (D) 5 seconds

Q37CIL MT Systems, 27 Feb 2020 (8:00 AM)
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.
  1. Aevent, condition, actor
  2. Bentity, condition, action
  3. Cevent, question, action
  4. Devent, condition, action
Show answerHide answer

Correct answer: (D) event, condition, action

Q38CIL MT Systems, 27 Feb 2020 (8:00 AM)
________ Command is used to enable, disable, modify, or drop a constraint in SQL.
  1. AMODIFY Table
  2. BDEFINE Table
  3. CADD Column
  4. DALTER Table
Show answerHide answer

Correct answer: (D) ALTER Table

Q39CIL MT Systems, 27 Feb 2020 (8:00 AM)
A ________ of a relation is a set of one or more attributes whose values are guaranteed to identify tuples in the relation uniquely.
  1. Aforeign key
  2. Bsuper key
  3. Cscheme
  4. Dkey
Show answerHide answer

Correct answer: (B) super key

Q40CIL MT Systems, 27 Feb 2020 (8:00 AM)
Solve the following recurrence relation: T(n) = 4T(n/2) + n²
  1. AΘ(n³)
  2. BΘ(n² log n)
  3. CΘ(n²/2)
  4. DΘ(n²)
Show answerHide answer

Correct answer: (B) Θ(n² log n)

Q41CIL MT Systems, 27 Feb 2020 (8:00 AM)
_______ includes a query language and commands to insert tuples into, delete tuples from, and modify tuples in the database.
  1. AQuery Language
  2. BData-manipulation language
  3. CData-definition language
  4. DData-calculation language
Show answerHide answer

Correct answer: (B) Data-manipulation language

Q42CIL MT Systems, 27 Feb 2020 (8:00 AM)
Solve the following recurrence relation T(n) = 4T(n/2) + n
  1. AO(n²)
  2. BO(n/2)
  3. CO(n)
  4. DO(log n)
Show answerHide answer

Correct answer: (A) O(n²)

Q43CIL MT Systems, 27 Feb 2020 (8:00 AM)
A ______ is the combination of one or more column values in a table that make a row of data unique within the table.
  1. Aforeign key
  2. Bnatural key
  3. Ccandidate key
  4. Dprimary key
Show answerHide answer

Correct answer: (D) primary key

Q44CIL MT Systems, 27 Feb 2020 (8:00 AM)
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)
  1. AT T F T
  2. BF T T T
  3. CT T T F
  4. DF T T F
Show answerHide answer

Correct answer: (D) F T T F

Q45CIL MT Systems, 27 Feb 2020 (8:00 AM)
In SQL – the function – avg, min, max, sum, count are called as _______.
  1. Aaggregate function
  2. Badjunct function
  3. Cscalar operation
  4. Dset operation
Show answerHide answer

Correct answer: (A) aggregate function

Q46CIL MT Systems, 27 Feb 2020 (8:00 AM)
Relations and fields can be renamed in relational algebra using the renaming operator _______.
  1. Aρ (rho)
  2. Bσ (sigma)
  3. Cθ (theta)
  4. D⋈ (join)
Show answerHide answer

Correct answer: (A) ρ (rho)

Q47CIL MT Systems, 27 Feb 2020 (8:00 AM)
In Database management system ACID property refers to:
  1. AAuthenticity, Consistency, Isolation, and Durability
  2. BAtomicity, Confidentiality, Isolation, and Durability
  3. CAtomicity, Consistency, Isolation, and Durability
  4. DAtomicity, Consistency, Integrity, and Durability
Show answerHide answer

Correct answer: (C) Atomicity, Consistency, Isolation, and Durability

Q48CIL MT Systems, 27 Feb 2020 (8:00 AM)
A Tuple Relational Calculus query is expressed as ________.
  1. A{ T | p(T) }
  2. B{ P( ) | T }
  3. C{ p(T) | T }
  4. D{ T | P() | T }
Show answerHide answer

Correct answer: (A) { T | p(T) }

Q49CIL MT Systems, 27 Feb 2020 (8:00 AM)
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)
  1. ASELECT S.sname, S.rating FROM Sailors S, Reserves R WHERE S.sid = R.sid AND R.bid = B.bid AND B.color = 'red'
  2. BSELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE S.sid = R.sid AND R.bid = B.bid AND B.color = 'red'
  3. CSELECT S.sname FROM Sailors S, Reserves R, Boats B WHERE S.sid = R.sid AND B.color = 'red'
  4. 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'

Q50CIL MT Systems, 27 Feb 2020 (8:00 AM)
A relation is in _______ form if every field contains only atomic values, that is, not lists or sets.
  1. AFirst normal
  2. BThird normal
  3. CSecond normal
  4. 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.

More CIL MT subjects