edited by
19,633 views
39 votes
39 votes

Which of the following is/are correct?

  1. An SQL query automatically eliminates duplicates
  2. An SQL query will not work if there are no indexes on the relations
  3. SQL permits attribute names to be repeated in the same relation
  4. None of the above
edited by

2 Answers

Best answer
55 votes
55 votes

(D)

SQL wont remove duplicates like relational algebra projection, we have to remove it explicitly by distinct.

If there are no indexes on the relation SQL will either chose one/more on its own or simply work without any index. No index would just slow the query but it will surely work.

SQL does not permit 2 attributes to have same name in a relation.

edited by
0 votes
0 votes
here in this question

sql does not remove duplicate. we have to use distinct word to remove duplicate

and  in sql also  we cant repeat the names of attribute

and without index also we can work just the work will be slow. index just  speed up the searches in the database. index cant be seen by the  user.
Answer:

Related questions

3 votes
3 votes
3 answers
1
go_editor asked Feb 8, 2018
1,793 views
Consider the set of relationsEMP (Employee-no. Dept-no, Employee-name, Salary)DEPT (Dept-no. Dept-name, Location)Write an SQL query to:Calculate, for each department numb...
25 votes
25 votes
1 answer
3
Kathleen asked Sep 23, 2014
4,009 views
Let $R = (A, B, C, D, E, F)$ be a relation scheme with the following dependencies $C \rightarrow F, E \rightarrow A, EC \rightarrow D, A \rightarrow B $. Which one of the...
38 votes
38 votes
1 answer
4
Kathleen asked Sep 23, 2014
16,787 views
Consider the join of a relation $R$ with a relation $S$. If $R$ has $m$ tuples and $S$ has $n$ tuples then the maximum and minimum sizes of the join respectively are$m+n$...