5 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 1.4k views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply Aboveallplayer commented Sep 21, 2016 reply Follow flag i think N 0 0 replyShare resilientknight commented Sep 21, 2016 reply Follow flag nope this answer not given 0 0 replyShare cse7 commented Nov 30, 2016 reply Follow flag n! ??? 0 0 replyShare Please log in or register to add a comment.
0 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 4 4 Comments reply resilientknight commented Sep 21, 2016 reply Follow flag actually this isnot the answer given 0 0 replyShare Sushant Gokhale commented Sep 22, 2016 reply Follow flag @resilient. Whats the answer given? 0 0 replyShare Sushant Gokhale commented Sep 22, 2016 reply Follow flag Is the answer 1 ? 0 0 replyShare akash.dinkar12 commented Oct 21, 2018 reply Follow flag 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 0 replyShare Please log in or register to add a comment.