Database :: All Aptitude Test ::

1.The phrase “greater than at least one” is represented in SQL by _____?
A. < all
B. < some
C. > all
D. < all

2.This statement is erroneous because :
A. Avg(salary) should not be selected
B. Dept_id should not be used in group by clause
C. Misplaced group by clause
D. Avg(salary) should not be selected

3.SQL applies predicates in the _______ clause after groups have been formed, so aggregate functions may be used.
A. Group by
B. With
C. Where
D. Group by

4.Aggregate functions can be used in the select list or the_______clause of a select statement or subquery. They cannot be used in a ______ clause.
A. Where, having
B. Having, where
C. Group by, having
D. Where, having

5.The ________ keyword is used to access attributes of preceding tables or subqueries in the from clause.
A. In
B. Lateral
C. Having
D. In

6.Which of the following creates temporary relation for the query on which it is defined ?
A. With
B. From
C. Where
D. With

7.In the query given above which one of the following is a temporary relation ?
A. Budget
B. Department
C. Value
D. Budget

8.Subqueries cannot:
A. Use group by or group functions
B. Retrieve data from a table different from the one in the outer query
C. Join tables
D. Use group by or group functions

9. A Delete command operates on ______ relation.
A. One
B. Two
C. Several
D. One

10.Delete from r where P; The above command :
A. Deletes a particular tuple from the relation
B. Deletes the relation
C. Clears all entries from the relation
D. Deletes a particular tuple from the relation

11.In a set, the NOT IN connective tests for the :
A. Set differences
B. Absence of set differences
C. Absence of set membership
D. Set differences

12.Users describe the kinds of operations that will be performed on the data, on the specification of :
A. Data Requirements
B. Data Gathering
C. Procedural Requirements
D. Data Requirements

13. A special case of multisets, which have only one copy of each element, is known to be :
A. Sets
B. Elements
C. Associator
D. Sets

14.In entity relationship model, the basic objects are known as :
A. Instances
B. Entries
C. Nodes
D. Instances

15.With max_budget (value) as :
A. Budget
B. Department
C. Value
D. Budget

16.Aggregate functions are functions that take a ___________ as input and return a single value.
A. Collection of values
B. Single value
C. Aggregate value
D. Collection of values

17.What does the following query do?
A. It increases the marks of all the students by 10%
B. It decreases the marks of all the students by 90%
C. It increases the marks of all the students by 110%
D. It increases the marks of all the students by 10%

18.State true or false: We cannot write a where clause under an update command :
A. True
B. False
C. May be
D. True

19.Scalar Subqueries can be used in the SQL update statement when they are used under the ____ clause :
A. where
B. with
C. set
D. where

20.Which of the following cannot be used to modify the data in a database :
A. update
B. insert
C. delete
D. update

21.What is a correlated sub-query?
A. An independent query that uses the correlation name of another independent query.
B. A sub-query that uses the correlation name of an outer query
C. A sub-query that substitutes the names of the outer query
D. An independent query that uses the correlation name of another independent query.

22.The _________ construct returns true if the argument in the sub-query is void of duplicates :
A. not null
B. not unique
C. unique
D. not null

23.What is a subquery?
A. A subquery is a select-from-where expression that is nested within another query
B. A subquery is any query that is nested within another query
C. A subquery is a relation that is externally specified which can be used to handle data in queries
D. A subquery is a select-from-where expression that is nested within another query

24.If a set is a collection of values given by the select clause, The ______ connective tests for set membership :
A. within
B. include
C. under
D. within

25.What is the result of the following query?
A. The query gives all the studnames for which marks are greater than all the students in section c
B. The query gives all the studnames for which the marks are greater than at least on student in section c
C. The query gives all the studnames for which the marks are less than all the students in section c
D. The query gives all the studnames for which marks are greater than all the students in section c

26.The ________ comparison checker is used to check “each and every” condition :
A. all
B. and
C. every
D. all

27.Using which language can a user request information from a database ?
A. Query
B. Relational
C. Structural
D. Query

28.Student(ID, name, dept name, tot_cred) : In this query which attribute form the primary key?
A. Name
B. Dept
C. Tot_cred
D. Name

29.Which one of the following is a procedural language ?
A. Domain relational calculus
B. Tuple relational calculus
C. Relational algebra
D. Domain relational calculus

30.The_____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.
A. Select
B. Join
C. Union
D. Select


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers