U.G.C. NET Exam. 24 June, 2019 Paper–II (COMPUTER SCIENCE & APPLICATIONS)

Total Questions: 100

31. Which of the following has same expressive power with regard to relational query language?

(A) Relational algebra and domain relational calculus
(B) Relational algebra and tuples relational calculus
(C) Relational algebra and domain relational calculus restricted to safe expression
(D) Relational algebra and tuples relational calculus restricted to safe expression

Correct Answer: (b) (C) and (D) only
Solution:

* Relational algebra is a procedural query language, which takes instances of relations as input and yields instances of relations as output. It uses operation (selection, projection, union etc) to perform queries
* Relational calculus consists of two calculi, the tuple relational calculus and the domain relational calculus, that are part of the relational model for databases and provide a declarative way to specify database queries.
* Relational algebra, Domain relational calculus restricted to safe expression and tuple relational calculus restricted to safe expression have the same expressive power.
Relation algebra's expressive power is not equal to Domain relational calculus or Tuple relational calculus unless they are restricted to safe operation.

32. Which of the following features is supported in the relational database model?

Correct Answer: (c) Associations with multiplicities
Solution:

RDBMS (Relational database management system) is structured in database tables. It stores the data into collection of tables which are related by some fields. Goal of RDBMS is to generate a set of relation scheme that allows as to store information without unnecessary redundancy and to retrieve information easily.
Composite data types : Those data types that are composed of other existing data types such as date, images, time etc. They are used as objects. Complex data types are not allowed in RDBMS. These are stored in LOB, they cannot be accessed directly in RDBMS.
Multivalued attributed : An attribute that contains more than one value for with it. It is not allowed in RDBMS. An attribute can contain only one value at one time.
Association with multiplicities : → Multiplicity means the cardinality of a particular entity which can be associated with other entities. In terms of data base, it means participation and cardinality of the relation. It is allowed in RDBMS. Generalization Relationship : Generalization means combination of lower entities to form a higher entity Entities are combined which have common attribute.

33. With respect to relational algebra, which of the following operations are included from mathematical set theory?

(A) Join
(B) Intersection
(C) Cartisian product
(D)Project

Correct Answer: (b) (B) and (C)
Solution:

Relational Algebra :→ It is a procedure oriented language. In this, we use relation as values instead of numbers. It works on relational model. Main work is to retrieve data, perform operations such as insert, delete, update etc.
* Basic operation in relational algebra are select, Project, union, set difference, Cartesian product, rename.
* other operations are natural join, intersection division.
* from the above options, operator that are included from mathematical set theory are intersection and Cartesian product.
* In mathematical set theory, intersection is used to find the common elements between two sets. It works same in relational algebra.
* Cartesian product is used to find the multiplication of two sets by including common element only once.

34. In relational databases, if relation R is in BCNF, then which of the following is true about relation R?

Correct Answer: (d) R is in 2NF and 3NF
Solution:

relation is in 'N' Normal form it means it must be in 1NF, 2NF, ............... N-1 NF.
standard Normal form hierarchy :→
1NF → 2NF → 3NF → BCNF
So Relation is in BCNF then it must be in 1NF, 2NF, & 3NF Hence option 4 is correct.

35. Which of the following key constraints is required for functioning of foreign key in the context of relational data bases?

Correct Answer: (b) Primary key
Solution:

36. In relational database management, which of the following is/are property/properties of candidate key?

P : Uniqueness
Q : Irreducibility

Correct Answer: (c) Both P and Q
Solution:

candidate key : It uniquely identifies the tuples in a relation. A candidate key is a super key with no redundant attribute. In a relation, there can be more than one candidate key.
As, candidate uniquely identifies the tuples in a relation. So, first property of the candidate key is its uniqueness. second, candidate key does not contain redundant attribute. We cannot further reduce a candidate key. If a candidate key is reduced, then it can cause partial dependency. second property is its irreducibility.
Example : A relation with four attributes : R(A,B,C,D).
functional dependencies are :
A → C
B → D
In this, AB is the candidate key.
AB uniquely tuples in relation R also AB cannot be reduced further.

37. Which of the following statements are DML statements?

(A) Update [tablename] Set [columnname] = VALUE
(B) Delete [tablename]
(C) Select * from [tablename]

Correct Answer: (c) (A), (B), and (C)
Solution:

A data manipulation language (DML) is a language that enables users to access or manipulate data as organized by the appropriate model. Example of DML commands : select, insert, delete, update etc.
therefore a, b and c are DML statements.
A database system provides a data-definition language (DDL) to specify the database schema example of DDL commands : Create, drop, alter, rename, truncate etc.
A data control language (DCL) is used to control access (Authorization) to data stored in a database example of DCL commands : grant and revoke.

38. Hadoop (a big data tool) works with number of related tools, Choose from the following, the common tools included into Hadoop :

Correct Answer: (c) Map reduce, H Base and Hive
Solution:

Hadoop is an open source platform providing highly reliable, scalable, distributed processing of large data sets using simple programming models. Hadoop provides a reliable shared storage and analysis system. In this, storage, is provide by HDFS (Hadoop distributed file system) and analysis by map reduce.

HDFS breaks a file into chunks and distributed them across the nodes of the cluster. It stores large amount of data on local disk across a distributed cluster of computers. It is written in Java. Hadoop work with the tools : Map Reduce, H base, hive.

Map Reduce A distributed data processing model and execution environment that runs on large clusters of commodity machines.

Hbase → It is a distributed, column-oriented database. HBase uses HDFS for its underlying storage and supports both batch style computations using map reduce and point queries. HIVE → It is a distributed data ware house. Hive manages data stored in HDFS and provides a query language based on SQL.

39. Following table has two attributes Employee id and Manager id, where Employee is is a primary key and manager id is a foreign key referencing Employee id with on delete cascade:

Correct Answer: (b) (30, 35) and (35, 20) only
Solution:

40. K-mean clustering algorithm has clustered the given 8 observations into 3 clusters after Ist iteration as follows:

C1 : {(3, 3), (5, 5), (7, 7)}
C2 : {(0, 6), (6, 0), (3, 0)}
C3 : {(8, 8), (4, 4)}
What will be the Manhattan distance for observation (4, 4) from cluster centroid C1 in second iteration?

Correct Answer: (a) 2
Solution:

Manhattan distance is the distance betweentwo points measured at right angle along both the Xaxis and Y-axis.