In: Computer Science
1. Create a general formula for the total number of different B+ tree indexes for a k-column table, assuming that we account for ASC vs. DESC.
The step by step process for creating a formula:
create index statement:
- The creat index statement creates an index on a table( for k- column table).indexes can be one or more column in a table.
- The maximum number of columns for an index key is Derby is 16.and index name cannot exceed 128 character.
- The column must be named more than once in a single CREATE INDEX statement.
- Different indexes can name the same column however.
Information about the total number of different B++ tree indexes for k- column table:
Index name are unique within a schema. Both index and table are assume tobe in the same schema if a schame name is specified for one of the names , but not the other .
- Derby uses the ascending order of each column to create a index . Specifying ASC after the column name does not alter the default behavior.
- The DESC keyword after the column name causes Derby to use descending order for the column to create the index . Using descending order for the column can help to improve the performance of queries that required the results in mixed sort order. Select the minimum and maximum value of an indexed column.
- If a qualified index name is specified , the schema name cannot start with sys.
Syntax ( formula):
CREATE [UNIQUE] INDEX index-Name
ON table-Name ( simple-column-Name [ASC | DESC [ , simple-column -Name [ASC | DESC]] *)
This is the answer for creating formula for assuming the account for ASC vs DESC.