5 votes 5 votes How many different secondary indices are possible for a table with n attributes(Not necessarily at the same time)? Databases databases indexing + – resilientknight asked Sep 20, 2016 resilientknight 731 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Aboveallplayer commented Sep 21, 2016 reply Follow Share i think N 0 votes 0 votes resilientknight commented Sep 21, 2016 reply Follow Share nope this answer not given 0 votes 0 votes cse7 commented Nov 30, 2016 reply Follow Share n! ??? 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes you can choose any number of attributes out of remaining (n-1) attributes(assumed primary index is built using only single attribute) for secondary index. Hence 2n-1 Sushant Gokhale answered Sep 21, 2016 Sushant Gokhale comment Share Follow See all 4 Comments See all 4 4 Comments reply resilientknight commented Sep 21, 2016 reply Follow Share actually this isnot the answer given 0 votes 0 votes Sushant Gokhale commented Sep 22, 2016 reply Follow Share @resilient. Whats the answer given? 0 votes 0 votes Sushant Gokhale commented Sep 22, 2016 reply Follow Share Is the answer 1 ? 0 votes 0 votes akash.dinkar12 commented Oct 21, 2018 reply Follow Share how r u getting in the powers of 2, u mean we should try to form secondary index on more than one attribute which will unnecessarily increase the size of index entries in the index table I think it should be N-1 because we can form a secondary index on any key remaining(n-1) because 1 key is used for primary index, it is like this, when in a relation like emp_no is already unique and we have made already primary index on it but there is some need, we want to fetch some data based on emp_name than we can make a secondary index on it.. 0 votes 0 votes Please log in or register to add a comment.