• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE-IT-2004

Question 81

A relation Empdtl 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, Empdtl is a relation in
  • 1NF only
  • 2NF and hence also in 1NF
  • 3NF and hence also in 2NF and 1NF
  • BCNF and hence also in 3NF, 2NF an 1NF

Question 82

A table T1 in a relational database has the following rows and columns:
 roll no.  marks
 1  10
 2  20
 3  30
 4  Null
The following sequence of SQL statements was successfully executed on table T1.
Update T1 set marks = marks + 5
Select avg(marks) from T1
What is the output of the select statement?
  • 18.75
  • 20
  • 25
  • NULL

Question 83

Consider the following schedule S of transactions T1 and T2:
T1 T2
Read(A)A = A - 10 Read (A)Temp = 0.2*A Write(A) Read(B)
Write(A)Read(B) B = B + 10 Write(B) B = B + TempWrite(B)
  • S is serializable only as T1, T2
  • S is serializable only as T2, T1
  • S is serializable both as T1, T2 and T2, T1
  • S is serializable either as T1 or as T2
  • None of these

Question 84

Consider two tables in a relational database with columns and rows as follows:
Table: Student
Roll_no Name Dept_id
1 ABC 1
2 DEF 1
3 GHI 2
4 JKL 3
Table: Department
Dept_id Dept_name
1 A
2 B
3 C
Roll_no is the primary key of the Student table, Dept_id is the primary key of the Department table and Student.Dept_id is a foreign key from Department.Dept_id What will happen if we try to execute the following two SQL statements?
  1. update Student set Dept_id = Null where Roll_on = 1
  2. update Department set Dept_id = Null where Dept_id = 1
  • Both (i) and (ii) will fail
  • B) (i) will fail but (ii) will succeed
  • (i) will succeed but (ii) will fail
  • Both (i) and (ii) will succeed

Question 85

Consider a table T in a relational database with a key field K. A B-tree of order p is used as an access structure on K, where p denotes the maximum number of tree pointers in a B-tree index node. Assume that K is 10 bytes long; disk block size is 512 bytes; each data pointer PD is 8 bytes long and each block pointer PB is 5 bytes long. In order for each B-tree node to fit in a single disk block, the maximum value of p is    
  • 20
  • 22
  • 23
  • 32

Question 86

In a data link protocol, the frame delimiter flag is given by 0111. Assuming that bit stuffing is employed, the transmitter sends the data sequence 01110110 as  
  • 01101011
  • 011010110
  • 011101100
  • 0110101100

Question 87

Given below are several usages of the anchor tag in HTML.
  1. <A HREF = "http://www.gate.ac.in/HTML/BASIC/testpage.html">Test Me</A>
  2. <A HREF = "/BASIC/testpage.html">Test Me</A>
  3. <A HREF = "testpage.html">Test Me</A>
  4. <A HREF = "testpage.html#test">Test Me</A>
Which of the above are valid?
  • I and II only
  • I and III only
  • I, II and III only
  • I, II, III and IV

Question 88

Let P be a singly linked list. Let Q be the pointer to an intermediate node x in the list. What is the worst-case time complexity of the best known algorithm to delete the node Q from the list?

  • O(n)

  • O(log2 n)

  • O(logn)

  • O(1)

There are 88 questions to complete.

Last Updated :
Take a part in the ongoing discussion