Wednesday, June 03, 2020

Algorithm design quiz

There are ______steps to solve the problem
A. Seven
B. Four
C. Six
D. Two
ANSWER: C

______is the first step in solving the problem
A. Understanding the Problem
B. Identify the Problem
C. Evaluate the Solution
D. None of these
ANSWER: B

______is the last step in solving the problem
A. Understanding the Problem
B. Identify the Problem
C. Evaluate the Solution
D. None of these
ANSWER: C

Following is true for understanding of a problem
A. Knowing the knowledgebase
B. Understanding the subject on which the problem is based
C. Communication with the client
D. All of the above
ANSWER: D

The six-step solution for the problem can be applied to I. Problems with Algorithmic Solution II. Problems with Heuristic Solution
A. Only I
B. Only II
C. Both I and II
D. Neither I nor II
ANSWER: C

______ solution requires reasoning built on knowledge and experience
A. Algorithmic Solution
B. Heuristic Solution
C. Random Solution
D. None of these
ANSWER: B

While solving the problem with computer the most difficult step is __________.
A. describing the problem
B. finding out the cost of the software
C. writing the computer instructions
D. testing the solution
ANSWER: C

The correctness and appropriateness of ___________solution can be checked very easily.
A. algorithmic solution
B. heuristic solution
C. random solution
D. none of these
ANSWER: A


The main measure for efficiency algorithm are-
A. Processor and Memory
B. Complexity and Capacity
C. Data and Space
D. Time and space
ANSWER: D

What does the algorithmic analysis count?
A. The number of arithmetic and the operations that are required to run the program
B. The number of lines required by the program
C. The number of seconds required by the program to execute
D. None of these
ANSWER: A

Examples of O(1) algorithms are______________.
A. Multiplying two numbers.
B. assigning some value to a variable
C. displaying some integer on console
D. All of the above
ANSWER: D

Examples of O(n2) algorithms are______________.
A. Adding of two Matrices
B. Initializing all elements of matrix by zero
C. Both A and B
D. Neither A nor B
ANSWER: C

The complexity of three algorithms is given as: O(n), O(n2) and O(n3). Which should execute slowest for large value of n?
A. O(n)
B. O(n2)
C. O(n3)
D. All will execute in same time.
ANSWER: C

There are four algorithms A1, A2, A3, A4 to solve the given problem with the order log(n), nlog(n), log(log(n))n/log(n), Which is the best algorithm.
A. A1
B. A2
C. A3
D. A4
ANSWER: C

Express the formula (n-1)*(n-5) in terms of big Oh notation
A. O(1)
B. O(log n)
C. O(n)
D. O(n2)
ANSWER: D

The time complexity of binary search is________.
A. O(1)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: B

The time complexity of linear search is________.
A. O(1)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: C

In quick sort, the number of partitions into which the file of size n is divided by a selected record is
A. n
B. n - 1
C. 2
D. n/2
ANSWER: C

A sort technique is said to be stable when the original relative order of records with equal keys are retained after sorting.
A. True
B. False
ANSWER: A

The three factors contributing to the sort efficiency considerations are the efficiency in coding, machine run time and the space requirement for running the procedure.
A. True
B. False
ANSWER: A

How many passes are required to sort a file of size n by bubble sort method?
A. N2
B. N
C. N-1
D. N/2
ANSWER: C

How many number of comparisons are required in insertion sort to sort a file if the file is sorted in reverse order?
A. N2
B. N
C. N-1
D. N/2
ANSWER: A

How many number of comparisons are required in insertion sort to sort a file if the file is already sorted?
A. N2
B. N
C. N-1
D. N/2
ANSWER: C

The worst-case time complexity of Quick Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: A

The worst-case time complexity of Bubble Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: A

The worst-case time complexity of Selection Exchange Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: A

The worst-case time complexity of Merge Sort is________.
A. O(n2)
B. O(log n)
C. O(n)
D. O(n logn)
ANSWER: D

The algorithm like Quick sort does not require extra memory for carrying out the sorting procedure. This technique is called __________.
A. in-place
B. stable
C. unstable
D. in-partition
ANSWER: A

Which of the following sorting procedures is the slowest?
A. Quick sort
B. Heap sort
C. Shell sort
D. Bubble sort
ANSWER: D

Two main measures for the efficiency of an algorithm are
A. Processor and memory
B. Complexity and capacity
C. Time and space
D. Data and space
ANSWER: C

The space factor when determining the efficiency of algorithm is measured by
A. Counting the maximum memory needed by the algorithm
B. Counting the minimum memory needed by the algorithm
C. Counting the average memory needed by the algorithm
D. Counting the maximum disk space needed by the algorithm
ANSWER: A

The time factor when determining the efficiency of algorithm is measured by
A. Counting microseconds
B. Counting the number of key operations
C. Counting the number of statements
D. Counting the kilobytes of algorithm
ANSWER: B

A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
A. O (n log n)
B. O (n2 log n)
C. O (n2 + log n)
D. O (n2)
ANSWER: A

Which of the following case does not exist in complexity theory?
A. Best case
B. Worst case
C. Average case
D. Null case
ANSWER: D

The concept of order Big O is important because
A. It can be used to decide the best algorithm that solves a given problem
B. It determines the maximum size of a problem that can be solved in a given amount of time
C. It is the lower bound of the growth rate of algorithm
D. Both A and B
ANSWER: A

The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with n discs is
A. T(n) = 2T(n - 2) + 2
B. T(n) = 2T(n - 1) + n
C. T(n) = 2T(n/2) + 1
D. T(n) = 2T(n - 1) + 1
ANSWER: D

Which of the following sorting methods would be most suitable for sorting a list which is almost sorted?
A. Bubble Sort
B. Insertion Sort
C. Selection Sort
D. Quick Sort
ANSWER: B

The running time of insertion sort is
A. O(n^2)
B. O(n)
C. O(log n)
D. O(n log n)
ANSWER: A

A sort which compares adjacent elements in a list and switches where necessary is ____.
A. insertion sort
B. heap sort
C. quick sort
D. bubble sort
ANSWER: A

A sort which iteratively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
A. insertion sort
B. selection sort
C. heap sort
D. quick sort
ANSWER: A

The way a card game player arranges his cards as he picks them one by one can be compared to
A. Quick sort
B. Merge sort
C. Insertion sort
D. Bubble sort
ANSWER: C

Which among the following is the best when the list is already sorted?
A. Insertion sort
B. Bubble sort
C. Merge sort
D. Selection sort
ANSWER: A

As part of the maintenance work, you are entrusted with the work of rearranging the library books in a shelf in proper order, at the end of each day. The ideal choice will be
A. Bubble sort
B. Insertion sort
C. Selection sort
D. Merge sort
ANSWER : B

In quick sort, the number of partitions into which the file of size n is divided by a selected record is
A. n
B. n - 1
C. 2
D. None of the above
ANSWER: C

The total number of comparisons made in quick sort for sorting a file of size n, is
A. O(n log n)
B. O(n2)
C. n(log n)
D. None of the above
ANSWER: A

Quick sort efficiency can be improved by adopting
A. non-recursive method
B. insertion method
C. tree search method
D. None of the above
ANSWER: A

For the improvement of efficiency of quick sort the pivot can be
A. the first element
B. the mean element
C. the last element
D. None of the above
ANSWER: B

Quick sort is the fastest available method of sorting because of
A. low over head
B. O(n log n) comparisons
C. low overhead and also O(n log n) comparisons
D. None of the above
ANSWER: C

Straight selection sort is basically a method of repeated
A. interchange
B. searching
C. position adjustment
D. None of the above
ANSWER: C

Number of selections required to sort a file of size N by straight selection requires
A. N - 1
B. log N
C. O(N2)
D. None of the above
ANSWER: A

For sorting a file of size n by straight selection sort, the number of comparisons made in the first pass is
A. n
B. n - 1
C. n(n - 1)/2
D. None of the above
ANSWER: B

Consider the following function f:
int f(int n)
{
int s = 0;
while(n > 1)
{
n = n/2;
s++;
}
return s;
}
What is the asymptotic complexity in terms of n? (Pick the smallest correct ANSWER)
A. O(nlog n)
B. O(n)
C. O( n)
D. O(log n)
E. O(n^2 )
ANSWER: D

What is the asymptotic runtime for traversing all nodes in a binary search tree with n nodes and printing them in order?
A. O(n · log(n))
B. O(n)
C. O( n)
D. O(log(n))
E. O(n^2 )
ANSWER: B

Assuming that the hash function for a table works well, and the size of the hash table is reasonably large compared to the number of items in the table, the expected (average) time needed to find an item in a hash table containing n items is
A. O(1)
B. O(log n)
C. O(nlog n)
D. O(n)
E. O( n)
ANSWER: A

Two main measures for the efficiency of an algorithm are 
A. Processor and memory
B. Complexity and capacity
C. Time and space
D. Data and space
ANSWER: B

The time factor when determining the efficiency of algorithm is measured by
A. Counting microseconds 
B. Counting the number of key operations
C. Counting the number of statements
D. Counting the kilobytes of algorithm
ANSWER: B

The space factor when determining the efficiency of algorithm is measured by
A. Counting the maximum memory needed by the algorithm
B. Counting the minimum memory needed by the algorithm
C. Counting the average memory needed by the algorithm
D. Counting the maximum disk space needed by the algorithm
ANSWER: A

Which of the following case does not exist in complexity theory
A. Best case
B. Worst case
C. Average case
D. Null case
ANSWER: D

The Worst case occur in linear search algorithm when 
A. Item is somewhere in the middle of the array
B. Item is not in the array at all
C. Item is the last element in the array
D. Item is the last element in the array or is not there at all
ANSWER: D

The Average case occur in linear search algorithm
A. When Item is somewhere in the middle of the array 
B. When Item is not in the array at all
C. When Item is the last element in the array
D. When Item is the last element in the array or is not there at all
ANSWER: A

The complexity of the average case of an algorithm is 
A. Much more complicated to analyze than that of worst case
B. Much more simpler to analyze than that of worst case
C. Sometimes more complicated and some other times simpler than that of worst case 
D. None or above
ANSWER: B

The complexity of linear search algorithm is
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
ANSWER: A

The complexity of Binary search algorithm is 
A. O(n)
B. O(logn)
C. O(n2)
D. O(n log n)
ANSWER: B

The complexity of merge sort algorithm is
A. O(n)
B. O(log n)
C. O(n2)
D. O(n log n)
ANSWER: D

Which of the following sorting algorithm is of divide-and-conquer type?
A. Bubble sort
B. Insertion sort
C. Quick sort
D. All of above
ANSWER: C

An algorithm that calls itself directly or indirectly is known as
A. Sub algorithm
B. Recursion
C. Polish notation
D. Traversal algorithm
ANSWER: B

Which one is the correct equation for Fibonacci sequence by Dynamic Programming?
A. F[n]=F[n-1]+F[n-2]
B. Fn=Fn-1+Fn-2
C. F(n)=F(n-1)+F(n-2)
D. All of these
ANSWER: A

Which equation is correct when a character is matched in Longest Common Subsequence problem?
A. c[i,j]=c[i,j-1]
B. c[i,j]=c[i-1,j-1]
C. c[i,j]=c[i-1,j]
D. None of these
ANSWER: B

Which equation is correct to multiply matrix in Matrix Chain Multiplication problem?
A. m[i,j]=min(m[i,k+1]+m[k+1,j]+pi-1pkpj)
B. m[i,j]=min(m[i,k]+m[k+1,j+1]+pi-1pkpj+1)
C. m[i,j]=min(m[i,k]+m[k+1,j]+pi-1pkpj)
D. m[i,j]=min(m[i,k]+m[k+1,j]+pi-1pk-1pj)
ANSWER: C

Dynamic Programming uses_____________
A. Store-and-forward
B. greedy method
C. brute-force
D. none
ANSWER: A

How many spanning tree T can be designed for the graph G with ‘n’ node?
A. 2n
B. n
C. n2-n
D. 2n-n
ANSWER: C

In this algorithm the edges has to be considered to make minimal spanning tree.
A. Prim’s algorithm
B. Kruskal’s algorithm
C. Dijikstra’s algorithm
D. none
ANSWER: B

In this algorithm the vertices has to be considered to make minimal spanning tree.
A. Prim’s algorithm
B. Kruskal’s algorithm
C. Dijikstra’s algorithm
D. none
ANSWER:  A

Huffman coding is an example of 
A. Greedy algorithm
B. variable length coding
C. both a and b
D. none
ANSWER: A

LCS stands for_________________________
A. Longest common subsequence
B. longest common substring
C. longest common string
D. longest common sequence
ANSWER: A

What is recurrence for worst case of QuickSort and what is the time complexity in Worst case?
A. Recurrence is T(n) = T(n-2) + O(n) and time complexity is O(n^2)
B. Recurrence is T(n) = T(n-1) + O(n) and time complexity is O(n^2)
C. Recurrence is T(n) = 2T(n/2) + O(n) and time complexity is O(nLogn)
D. Recurrence is T(n) = T(n/10) + T(9n/10) + O(n) and time complexity is O(nLogn)
ANSWER: B

Suppose we have a O(n) time algorithm that finds median of an unsorted array. Now consider a QuickSort implementation where we first find median using the above algorithm, then use median as pivot. What will be the worst case time complexity of this modified QuickSort.
A. O(n^2 Logn)
B. O(n^2)
C. O(n Logn Logn)
D. O(nLogn)
ANSWER: D

Given an unsorted array. The array has this property that every element in array is at most k distance from its position in sorted array where k is a positive integer smaller than size of array. Which sorting algorithm can be easily modified for sorting this array and what is the obtainable time complexity?
A. Insertion Sort with time complexity O(kn)
B. Heap Sort with time complexity O(nLogk)
C. Quick Sort with time complexity O(kLogk)
D. Merge Sort with time complexity O(kLogk)
ANSWER: D

Which of the following is not true about comparison based sorting algorithms?
A. The minimum possible time complexity of a comparison based sorting algorithm is O(nLogn) for a random input array
B. Any comparison based sorting algorithm can be made stable by using position as a criteria when two elements are compared
C. Counting Sort is not a comparison based sorting algortihm
D. Heap Sort is not a comparison based sorting algorithm.
ANSWER: A

The recurrence relation capturing the optimal time of the Tower of Hanoi problem with n discs is
A. T(n) = 2T(n – 2) + 2
B. T(n) = 2T(n – 1) + n
C. T(n) = 2T(n/2) + 1
D. T(n) = 2T(n – 1) + 1
ANSWER: D

Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then
A. T(n) <= 2T(n/5) + n
B. T(n) <= T(n/5) + T(4n/5) + n
C. T(n) <= 2T(4n/5) + n
D. T(n) <= 2T(n/2) + n
ANSWER: D

Which of the following sorting algorithms has the lowest worst-case complexity?
A. Merge Sort
B. Bubble Sort
C. Quick Sort
D. Selection Sort
ANSWER: A

Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n(= 2) numbers? In the recurrence equations given in the options below, c is a constant.
A. T(n) = 2T (n/2) + cn
B. T(n) = T(n – 1) + T(0) + cn
C. T(n) = 2T (n – 2) + cn
D. T(n) = T(n/2) + cn
ANSWER: D

An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is
A. T(nlogn)
B. T(n)
C. T(logn)
D. T(1)
ANSWER: B

Let T(n) be a function defined by the recurrence T(n) = 2T(n/2) + vn for n = 2 and T(1) = 1 Which of the following statements is TRUE?  
A. T(n) = ?(log n)
B. T(n) = ?(vn)
C. T(n) = ?(n)
D. T(n) = ?(n log n)
ANSWER: B

The worst case running times of Insertion sort, Merge sort and Quick sort, respectively, are:
A. T(n log n), T(n log n) and T(n2)
B. T(n2), T(n2) and T(n Log n)
C. T(n2), T(n log n) and T(n log n)
D. T(n2), T(n log n) and T(n2)
ANSWER: D

Database management quiz

In the relational model, cardinality is termed as:
A) A number of tuples. 
B) A number of attributes.
C) A number of tables. 
D) A number of constraints.
ANSWER: A

Relational calculus is a
A) Procedural language. 
B) Non- Procedural language.
C) Data definition language. 
D) High-level language.
ANSWER: B

The view of total database content is
A) Conceptual view. 
B) Internal view.
C) External view. 
D) Physical View.
ANSWER: A

Cartesian product in relational algebra is
A) a Unary operator. 
B) a Binary operator.
C) a Ternary operator. 
D) not defined.
ANSWER: B 

DML is provided for
A) Description of the logical structure of a database.
B) The addition of new structures in the database system.
C) Manipulation & processing of the database.
D) Definition of a physical structure of the database system.
ANSWER: C
 
‘AS’ clause is used in SQL for
A) Selection operation. 
B) Rename operation.
C) Join operation. 
D) Projection operation.
ANSWER: B

ODBC stands for
A) Object Database Connectivity.
B) Oral Database Connectivity.
C) Oracle Database Connectivity.
D) Open Database Connectivity.
ANSWER: D

Architecture of the database can be viewed as
A) two levels. 
B) four levels.
C) three levels. 
D) one level.
ANSWER: C

In a relational model, relations are termed as
A) Tuples. 
B) Attributes
C) Tables. 
D) Rows.
ANSWER: c

The database schema is written in
A) HLL 
B) DML
C) DDL 
D) DCL
ANSWER: C

In the architecture of a database system external level is the
A) physical level. 
B) logical level.
C) conceptual level 
D) view level.
ANSWER: D

An entity set that does not have sufficient attributes to form a primary key is a
A) strong entity set. 
B) weak entity set.
C) simple entity set. 
D) primary entity set.
ANSWER: B

In an E-R diagram attributes are represented by
A) rectangle. 
B) square.
C) ellipse. 
D) triangle.
ANSWER: C

In case of entity integrity, the primary key maybe
A) not Null 
B) Null
C) both Null & not Null. 
D) any value.
ANSWER: A

The language used in application programs to request data from the DBMS is referred to as the
A) DML 
B) DDL
C) VDL 
D) SDL
ANSWER: A

A logical schema
A) is the entire database.
B) is a standard way of organising information into accessible parts.
C) describes how data is actually stored on disk.
D) both (A) and (C)
ANSWER: A

Related fields in a database are grouped to form a
A) data file. 
B) data record.
C) menu. 
D) bank.
ANSWER: B

The database environment has all of the following components except:
A) users.
B) separate files.
C) database. 
D) database administrator.
ANSWER: A.

The language which has recently become the defacto standard for interfacing application programs with relational database system is
A) Oracle. 
B) SQL.
C) DBase. 
D) 4GL.
ANSWER: B

The way a particular application views the data from the database that the application uses is a
A) module. 
B) relational model.
C) schema. 
D) subschema.
ANSWER: D

In an E-R diagram an entity set is represent by a
A) rectangle. 
B) ellipse.
C) diamond box. 
D) circle.
ANSWER: A

A report generator is used to
A) update files. 
B) print files on paper.
C) data entry. 
D) delete files.
ANSWER: B

The property/properties of a database is/are:
A) It is an integrated collection of logically related records.
B) It consolidates separate files into a common pool of data records.
C) Data stored in a database is independent of the application programs using it.
D) All of the above.
ANSWER: D

The DBMS language component which can be embedded in a program is
A) The data definition language (DDL).
B) The data manipulation language (DML).
C) The database administrator (DBA).
D) A query language.
ANSWER: B

A relational database developer refers to a record as
A) Criteria.
B) a relation.
C) a tuple. 
D) an attribute.
ANSWER: C

The relational model feature is that there
A) is no need for primary key data.
B) is much more data independence than some other database models.
C) are explicit relationships among records.
D) are tables with many dimensions.
ANSWER: B

Conceptual design
A) is a documentation technique.
B) needs data volume and processing frequencies to determine the size of the database.
C) involves modelling independent of the DBMS.
D) is designing the relational model.
ANSWER: C

The method in which records are physically stored in a specified order according to a key field in each record is
A) hash. 
B) direct.
C) sequential. 
D) all of the above.
ANSWER: A

A subschema expresses
A) the logical view. 
B) the physical view.
C) the external view.
D) all of the above.
ANSWER: C

Count function in SQL returns the number of
A) values. 
B) distinct values.
C) groups. 
D) columns.
ANSWER: A

Which one of the following statements is false?
A) The data dictionary is normally maintained by the database administrator.
B) Data elements in the database can be modified by changing the data dictionary.
C) The data dictionary contains the name and description of each data element.
D) A data dictionary is a tool used exclusively by the database administrator.
ANSWER: B

An advantage of the database management approach is
A) data is dependent on programs.
B) data redundancy increases.
C) data is integrated and can be accessed by multiple programs.
D) none of the above.
ANSWER: C

A DBMS query language is designed to
A) support end users who use English-like commands.
B) support in the development of complex applications software.
C) specify the structure of a database.
D) all of the above.
ANSWER: D

Transaction processing is associated with everything below except
A) producing detail, summary, or exception reports.
B) recording a business activity.
C) confirming an action or triggering a response.
D) maintaining data.
ANSWER: C

It is possible to define a schema completely using
A) VDL and DDL. 
B) DDL and DML.
C) SDL and DDL. 
D) VDL and DML.
ANSWER: B

The method of access which uses key transformation is known as
A) direct.
B) hash.
C) random. 
D) sequential.
ANSWER: B

Data independence 
A) data is defined separately and not included in programs.
B) programs are not dependent on the physical attributes of data.
C) programs are not dependent on the logical attributes of data.
D) both (B) and (C).
ANSWER: D both (B) and (C)

The statement in SQL which allows changing the definition of a table is
A) Alter. 
B) Update.
C) Create. 
D) select.
ANSWER: A.

E-R model uses this symbol to represent a weak entity set?
A) Dotted rectangle.
B) Diamond
C) Doubly outlined rectangle
D) None of these
ANSWER: C

Relational Algebra is
A) Data Definition Language.
B) Meta Language
C) Procedural query Language
D) None of the above
ANSWER: C

Key to represent the relationship between tables is called
A) Primary key
B) Secondary Key
C) Foreign Key
D) None of these
ANSWER: C

_______ produces the relation that has attributes of R1 and R2
A) Cartesian product 
B) Difference
C) Intersection 
D) Product
ANSWER: A

The file organisation that provides very fast access to any arbitrary record of a file is
A) Ordered file 
B) Unordered file
C) Hashed file 
D) B-tree
ANSWER: C

DBMS helps achieve
A) Data independence
B) Centralised control of data
C) Neither (A) or (B)
D) both (A) and (B)
ANSWER: D

Which of the following are the properties of entities?
A) Groups 
B) Table
C) Attributes 
D) Switchboards
ANSWER: C

In a relation
A) Ordering of rows is immaterial
B) No two rows are identical
C) (A) and (B) both are true
D) None of these.
ANSWER: C

Which of the following is correct:
A) a SQL query automatically eliminates duplicates.
B) SQL permits attribute names to be repeated in the same relation.
C) a SQL query will not work if there are no indexes on the relations
D) None of these
ANSWER: D

It is better to use files than a DBMS when there are
A) Stringent real-time requirements.
B) Multiple users wish to access the data.
C) Complex relationships among data.
D) All of the above.
ANSWER: B

The conceptual model is
A) dependent on hardware.
B) dependent on software.
C) dependent on both hardware and software.
D) independent of both hardware and software.
ANSWER: D

What is a relationship called when it is maintained between two entities?
A) Unary 
B) Binary
C) Ternary 
D) Quaternary
ANSWER: B


Which of the following is a valid SQL type?
A) CHARACTER 
B) NUMERIC
C) FLOAT 
D) All of the above
ANSWER: D

The RDBMS terminology for a row is
A) tuple. 
B) relation.
C) attribute.
 D) degree.
ANSWER: A

The full form of DDL is
A) Dynamic Data Language 
B) Detailed Data Language
C) Data Definition Language 
D) Data Derivation Language
ANSWER: C

Which of the following is an advantage of view?
A) Data security 
B) Derived columns
C) Hiding of complex queries 
D) All of the above
ANSWER: D

Which of the following is a legal expression in SQL?
A) SELECT NULL FROM EMPLOYEE;
B) SELECT NAME FROM EMPLOYEE;
C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
D) None of the above
ANSWER: B

The users who use the easy-to-use menu are called
A) Sophisticated end users. 
B) Naïve users.
C) Stand-alone users. 
D) Casual end users.
ANSWER: B

Which are the two ways in which entities can participate in a relationship?
A) Passive and active 
B) Total and partial
C) Simple and Complex 
D) All of the above
ANSWER: B

The result of the UNION operation between R1 and R2 is a relation that includes
A) all the tuples of R1
B) all the tuples of R2
C) all the tuples of R1 and R2
D) all the tuples of R1 and R2 which have common columns
ANSWER: D

Which of the following is a comparison operator in SQL?
A) = 
B) LIKE
C) BETWEEN 
D) All of the above
ANSWER: D

A set of possible data values is called
A) attribute. 
B) degree.
C) tuple. 
D) domain.
ANSWER: D

Which of the operations constitute a basic set of operations for manipulating relational data?
A) Predicate calculus 
B) Relational calculus
C) Relational algebra 
D) None of the above
ANSWER: C

Which of the following is another name for the weak entity?
A) Child 
B) Owner
C) Dominant 
D) All of the above
ANSWER: A

Which of the following database object does not physically exist?
A) base table 
B) index
C) view
D) none of the above
ANSWER: C

NULL is
A) the same as 0 for integer
B) the same as blank for character
C) the same as 0 for integer and blank for character
D) not a value
ANSWER: D

Which of the following is a record based logical model?
A) Network Model 
B) Object-oriented model
C) E-R Model 
D) None of these
ANSWER: A

A data dictionary is a special file that contains:
A) The name of all fields in all files.
B) The width of all fields in all files.
C) The data type of all fields in all files.
D) All of the above.
ANSWER: D

A file manipulation command that extracts some of the records from a file is called
A) SELECT 
B) PROJECT
C) JOIN 
D) PRODUCT
ANSWER: A

The physical location of a record is determined by a mathematical formula that transforms a file key into a record location is:
A) B-Tree File 
B) Hashed File
C) Indexed File
D) Sequential file.
ANSWER: B


A primary key is combined with a foreign key creates
A) Parent-Child relationship between the tables that connect them.
B) Many to many relationships between the tables that connect them.
C) Network model between the tables that connect them.
D) None of the above.
ANSWER: A

In E-R Diagram derived attribute is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Triangle
ANSWER: B

An instance of relational schema R (A, B, C) has distinct values of A, including NULL values. Which one of the following is true?
A) A is a candidate key 
B) A is not a candidate key
C) A is a primary Key 
D) Both (A) and (C)
ANSWER: B

The natural join is equal to:
A) Cartesian Product
B) Combination of Union and Cartesian product
C) Combination of selection and Cartesian product
D) Combination of projection and Cartesian product
ANSWER: D

Which one of the following is not true for a view:
A) A view is derived from other tables.
B) A view is a virtual table.
C) A view definition is permanently stored as part of the database.
D) The view never contains derived columns.
ANSWER: C

A primary key, if combined with a foreign key, creates
A) Parent-Child relationship between the tables that connect them.
B) Many to many relationships between the tables that connect them.
C) Network model between the tables that connect them.
D) None of the above.
ANSWER: A

In E-R Diagram relationship type is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Diamond
ANSWER: D

Hierarchical model is also called
A) Tree structure 
B) Plex Structure
C) Normalise Structure 
D) Table Structure
ANSWER: A

To delete a particular column in a relation the command used is:
A) UPDATE 
B) DROP
C) ALTER 
D) DELETE
ANSWER: C

The ______ operator is used to compare a value to a list of literals values that have been specified.
A) BETWEEN 
B) ANY
C) IN 
D) ALL
ANSWER: A

A logical schema
A) is the entire database
B) is a standard way of organising information into an accessible part
C) describe how data is actually stored on disk
D) none of these
ANSWER: D

_____________ function divides one numeric expression by another and returns the remainder.
A) POWER 
B) MOD
C) ROUND 
D) REMAINDER
ANSWER: B

A data manipulation command the combines the records from one or more tables is called
A) SELECT 
B) PROJECT
C) JOIN 
D) PRODUCT
ANSWER: C

In E-R diagram generalisation is represented by
A) Ellipse 
B) Dashed ellipse
C) Rectangle 
D) Triangle
ANSWER: D

_________ is a virtual table that draws its data from the result of an SQL SELECT statement.
A) View 
B) Synonym
C) Sequence 
D) Transaction
ANSWER: A

A table joined with itself is called
A) Join 
B) Self Join
C) Outer Join 
D) Equi Join
ANSWER: B

_________ data type can store unstructured data
A) RAW 
B) CHAR
C) NUMERIC 
D) VARCHAR
ANSWER: A

A relational database consists of a collection of
A) Tables
B) Fields
C) Records
D) Keys
ANSWER: A

The term _______ is used to refer to a row.
A) Attribute
B) Tuple
C) Field
D) Instance
ANSWER: B

Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.
A) Instance, Schema
B) Relation, Schema
C) Relation, Domain
D) Schema, Instance
ANSWER: D

A domain is atomic if elements of the domain are considered to be ____________ units.
A) Different
B) Indivisbile
C) Constant
D) Divisible
ANSWER: B

The tuples of the relations can be of ________ order.
A) Any
B) Same
C) Sorted
D) Constant
ANSWER: A

Entity is a
A) Object of relation
B) Present working model
C) Thing in real world
D) Model of relation
ANSWER: C

The descriptive property possessed by each entity set is _________ .
A) Entity
B) Attribute
C) Relation
D) Model
ANSWER: B

The attribute AGE is calculated from DATE_OF_BIRTH . The attribute AGE is
A) Single valued
B) Multi valued
C) Composite
D) Derived
ANSWER: D

Which of the following is a single valued attribute
A) Register_number
B) Address
C) SUBJECT_TAKEN
D) Reference
ANSWER:A

A relational database system needs to maintain data about the relations, such as the schema of the relations. This is called
A) Metadata
B) Catalog
C) Log
D) Dictionary
ANSWER: A

If a piece of data is stored in two places in the database, then
A) Storage space is wasted
B) Changing the data in one spot will cause data inconsistency
C) In can be more easily accessed
D) Both a and b
ANSWER: D

Large collection of files are called ____________ .
A) Fields
B) Records
C) Database
D) Sectors
ANSWER:  C

Which of these data models is an extension of relational data model?
A) Object-oriented data model
B) Object-relational data model
C) Semi structured data model
D) None of the mentioned
ANSWER: B

The information about data in a database is called _______.
A) Metadata
B) Hyper data
C) Tera data
D) None of the mentioned
ANSWER: A

A data dictionary is a special file that contains?
A) The names of all fields in all files
B) The data types of all fields in all files
C) The widths of all fields in all files
D) All of the mentioned
ANSWER: D

The DBMS acts as an interface between what two components of an enterprise-class database system?
A) Database application and the database
B) Data and the database
C) The user and the database application
D) Database application and SQL
ANSWER: A

A data dictionary is created when a __________ created.
A) Instance
B) Segment
C) Database
D) Dictionary
ANSWER: C

________ is the smallest unit of allocation in an Oracle database.
A) Database
B) Instance
C) Tablespace
D) Database Block
ANSWER: D

A tablespace is further broken down into ________
A) Tablespace
B) Segments
C) Extents
D) Blocks
ANSWER: B

Which of the following gives a logical structure of the database graphically ?
A) Entity-relationship diagram
B) Entity diagram
C) Database diagram
D) Architectural representation
ANSWER: A

The entity relationship set is represented in E-R diagram as
A) Double diamonds
B) Undivided rectangles
C) Dashed lines
D) Diamond
ANSWER: D

Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?
A) Candidate key
B) Sub key
C) Super key
D) Foreign key
ANSWER: C

A _____ is a property of the entire relation, rather than of the individual tuples in which each tuple is unique.
A) Rows
B) Key
C) Attribute
D) Fields
ANSWER: B

Which one of the following cannot be taken as a primary key ?
A) Id
B) Register number
C) Dept_id
D) Street
ANSWER: D

A attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that relation .
A) Candidate
B) Primary
C) Super
D) Sub
ANSWER: B

The ______ is the one in which the primary key of one relation is used as a normal attribute in another relation .
A) Referential relation
B) Referencing relation
C) Referenced relation
D) Referred relation
ANSWER: C

For each attribute of a relation, there is a set of permitted values, called the ________ of that attribute.
A) Domain
B) Relation
C) Set
D) Schema
ANSWER: A

The tuples of the relations can be of ________ order.
A) Any
B) Same
C) Sorted
D) Constant
ANSWER: A

Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.
A) Instance, Schema
B) Relation, Schema
C) Relation, Domain
D) Schema, Instance
ANSWER: D

Search Aptipedia