WorksheetsIT Test 11 May Slot2
Total questions: 40
Worksheet time: 40mins
If every non-key attribute is functionally dependent on the primary key, then the relation will be in :
1NF
2NF
3NF
4NF
The data model which describes how the data is actually stored is
internal model
external model
logical model
none of these
CREATE TABLE employee (name VARCHAR, id INTEGER)
What type of statement is this?
DML
DDL
View
Integrity constraint
How do we select all rows for the "Designer" table?
SELECT * FROM Designer
SELECT [All] FROM Designer
SELECT Designer.*
SELECT FROM Designer
What is the meaning of DCL?
Data Count Language
Database Control Language
Data Calculation Language
Data Control Language
Match SQL language with SQL commands
1)DDL i)Revok, Grant
2)DML ii)rename a table
3)TCL iii)insert, update
4)DCL iv)rollback , commit
1-iii,2-i,3-ii,4-iv
1-iii,2-ii,3-iv,4-i
1-ii,2-iii,3-iv,4-i
1-i,2-iii,3-ii,4-iv
How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?
MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?
SELECT * FROM Persons SORT 'FirstName' DESC
SELECT * FROM Persons ORDER BY FirstName DESC
SELECT * FROM Persons SORT BY 'FirstName' DESC
SELECT * FROM Persons ORDER FirstName DESC
With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?
SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter'
SELECT [all] FROM Persons WHERE FirstName='Peter'
SELECT * FROM Persons WHERE FirstName='Peter'
SELECT * FROM Persons WHERE FirstName<>'Peter'
Which of the following statements about MongoDB collections is true?
A) Collections are equivalent to tables in relational databases.
B) Collections store documents with a fixed schema.
C) Collections can be nested within other collections.
D) None of the mentioned above.
How does MongoDB handle schema flexibility compared to traditional relational databases?
MongoDB enforces a rigid schema
MongoDB has a dynamic schema
MongoDB does not support schemas
MongoDB requires explicit schema definitions for each collection
Which normal form allows for a dependency on a candidate key, as well as on other non-key attributes?
First Normal Form (1NF)
Second Normal Form (2NF)
Third Normal Form (3NF)
Boyce-Codd Normal Form (BCNF)
_________ operation returns the value of the topmost element of the stack.
push
pop
peep
update
In ___________ data structure data items are not in sequence.
non linear
linear
non-homogeneous
all of above
In a min-heap:
parent nodes have values greater than or equal to their Childs
parent nodes have values less than or equal to their Childs
both statements are true
both statements are wrong
A Binary Tree can have
Can have 2 children
Can have 1 children
Can have 0 children
All of the above
The disadvantage in using a circular linked list is __________
it is possible to get into infinite loop
last node points to fist node.
time consuming
requires more memory space.
There is an extra element at the head of the list called a ________
Antinel
Sentinel
List header
List head
A binary search tree whose left subtree and right subtree differ in height by at most 1 unit is called
AVL tree
Red-black tree
Lemma tree
None of the above
In a stack, if a user tries to remove an element from empty stack it is called _________
Underflow
Empty collection
Overflow
Garbage Collection
What is the value of the postfix expression 6 3 2 4 + – *
1
40
74
-18
The following postfix expression with single digit operands is evaluated using a stack:
8 2 3 ^ / 2 3 * + 5 1 * -
6,1
5,7
3,2
1,5
What data structure is used for breadth first traversal of a graph?
queue
stack
list
none of the above
What is the path for an image located in same folder as the current page?
<img src= “pic.jpg”>
<img src= “../pic.jpg”>
<img src= “images/pic.jpg”>
<img src= “/images/pic.jpg”>
What is JavaScript?
JavaScript is a scripting language used to make the website interactive
JavaScript is an assembly language used to make the website interactive
JavaScript is a compiled language used to make the website interactive
None of the mentioned
Which of the following are the advantages of React.js?
React.js can increase the application's performance with Virtual DOM
React.js is easy to integrate with other frameworks such as Angular, BackboneJS since it is only a view library
React.js can render both on client and server side
All of the above
The process by which objects of one class acquire the properties of objects of another class is known as
Polymorphism
Inheritance
Data Hiding
Association
-Entries are organized as key/value pairs.
-Duplicate entries replace old entries.
-Entries are sorted using a Comparator or the Comparable interface.
Which interface of the java.util package offers the specified behavior?
List
Map
Set
SortedSet
SortedMap
{null=null, a=null, b=JavaSE, c=PHP, d=Python}
{a=null, b=JavaSE, c=PHP, d=Python}
{b=JavaSE, c=PHP, d=Python}
Compilation Fails
{1=C, 2=JavaEE, 4=Python, 3=PHP}
{1=C, 2=JavaSE, 3=Python, 4=PHP}
{1=C, 2=JavaEE, 3=Python, 4=PHP}
{1=C, 2=JavaSE,2=JavaEE, 3=Python, 4=PHP}
NullPointerException
List listNames = new ArrayList();
listNames.add("Tom");
listNames.add("Mary");
listNames.add("Peter");
String name2 = (String) listNames.get(1);
System.out.println(name2);
What is the output of the above code
Tom
Mary
Peter
raises Exception
Which of these statements is incorrect about tread ?
Start() method is used to begin execution of the thread
Run () method is used to begin execution of a thread before start() method in special cases
A thread can be formed by implementing runnable interface only
A thread can be formed by a class that extends thread class
Which statement is true about java ?
Java is a sequence-depended programming language
Java is a code dependent programming language
Java is a platform-dependent programming language
Java is a platform-independent programming language
Choose the correct syntax of include directive?
<% include file="file.jsp" %>
<%@ include page="file.jsp" %>
<%! include page="file.jsp" %>
<%@ include file="file.jsp" %>
Select valid declaration in JSP
<% int data=50; %>
<%!-- int data=50; --%>
<%@ int data=50; %>
<%! int data=50; %>
The code inside scriplet will be placed in _____ method of jsp life cycle?
jsp_init()
jsp_service()
httpService()
_jspService()
times is ________________ type of argument.
default arguments
keyword arguments
positional arguments
arbitrary positional arguments
arbitrary keyword arguments
What is the output of the given code?
10 20 10 20
10 20 10
10 20 20
Error
The output of the code above is
Key Error
4
Math
