Database :: All Aptitude Test ::

1. Using which clause retains only one copy of such identical tuples?
A. Null
B. Unique
C. Not null
D. Null

2.Some of these insert statements will produce an error. Identify the statement.?
A. Insert into employee values (1005,Rach,0);
B. Insert into employee values (1002,Joey,335);
C. Insert into employee values (1007,Ross, );
D. Insert into employee values (1005,Rach,0);

3.The primary key must be?
A. Unique
B. Not null
C. Both A & B
D. Unique

4.Why does this statement cause an error when QUANTITY values are null?
A. The expression attempts to divide by a null value
B. The data types in the conversion function are incompatible
C. The character string none should be enclosed in single quotes (‘ ‘)
D. The expression attempts to divide by a null value

5.The result of which unknown is unknown?
A. Xor
B. Or
C. And
D. Xor

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

7.Which of the following should be used to find the mean of the salary ?
A. Mean(salary)
B. Avg(salary)
C. Sum(salary)
D. Mean(salary)

8.If we do want to eliminate duplicates, we use the keyword in the aggregate expression?
A. Distinct
B. Count
C. Avg
D. Distinct

9.All aggregate functions except ignore null values in their input collection?
A. Count(attribute)
B. Count(*)
C. Avg
D. Count(attribute)

10. A Boolean data type that can take values true, false, and?
A. 1
B. 0
C. Null
D. 1

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

12.We can test for the nonexistence of tuples in a subquery by using the construct?
A. Not exist
B. Not exists
C. Exists
D. Not exist

13.Relational Algebra is a query language that takes two relations as input and produces another relation as an output of the query?
A. Relational
B. Structural
C. Procedural
D. Relational

14.Which of the following is a fundamental operation in relational algebra?
A. Set intersection
B. Natural join
C. Assignment
D. Set intersection

15.Which of the following is used to denote the selection operation in relational algebra?
A. Pi (Greek)
B. Sigma (Greek)
C. Lambda (Greek)
D. Pi (Greek)

16.The which operation, denoted by −, allows us to find tuples that are in one relation but are not in another?
A. Union
B. Set-difference
C. Difference
D. Union

17.Which is a unary operation?
A. Selection operation
B. Primitive operation
C. Projection operation
D. Selection operation

18.Which is a join condition contains an equality operator?
A. Equijoins
B. Cartesian
C. Natural
D. Equijoins

19.In precedence of set operators, the expression is evaluated from?
A. Left to left
B. Left to right
C. Right to left
D. Left to left

20.Which of the following is not outer join?
A. Left outer join
B. Right outer join
C. Full outer join
D. Left outer join

21.The assignment operator is denoted by?
A. ->
B. <-
C. =
D. ->

22.Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000?
A. {t | t ε instructor ∧ t[salary] > 80000}
B. Э t ∈ r (Q(t))
C. {t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}
D. {t | t ε instructor ∧ t[salary] > 80000}

23.A query in the tuple relational calculus is expressed as?
A. {t | P() | t}
B. {P(t) | t }
C. {t | P(t)}
D. {t | P() | t}

24.Which of the following best describes the query?
A. Finds the names of all instructors whose department is in the Watson building
B. Finds the names of all department is in the Watson building
C. Finds the name of the dapartment whose instructor and building is Watson
D. Finds the names of all instructors whose department is in the Watson building

25.Which of the following symbol is used in the place of except?
A. ^
B. V
C. ¬
D. ^

26.“Find all students who have taken all courses offered in the Biology department.” The expressions that matches this sentence is ?
A. Э t ε r (Q(t))
B. ∀ t ε r (Q(t))
C. ¬ t ε r (Q(t))
D. Э t ε r (Q(t))

27.Which of the following is the comparison operator in tuple relational calculus?
A.
B. =
C. ε
D.

28.An expression in the domain relational calculus is of the form?
A. {P(x1, x2, . . . , xn) | < x1, x2, . . . , xn > }
B. {x1, x2, . . . , xn | < x1, x2, . . . , xn > }
C. { x1, x2, . . . , xn | x1, x2, . . . , xn}
D. {P(x1, x2, . . . , xn) | < x1, x2, . . . , xn > }

29. In domain relaional calculus “there exist” can be expressed as?
A. (P1(x))
B. (P1(x)) Э x
C. V x (P1(x))
D. (P1(x))

30.A set of possible data values is called?
A. Attribute
B. Degree
C. Tuple
D. Attribute


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