Question
Which of the following best describes the primary
function of a database index?Solution
A database index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional space and maintenance overhead. The index works similarly to an index in a book, which allows you to quickly locate a specific entry without scanning the entire content.
- Performance Boost : By providing fast access paths to data, an index improves query performance, especially for SELECT queries that involve searching, sorting, or joining large tables.
- Structure : Indexes typically use structures like B-trees or hash tables to allow rapid lookups. When a query is executed, the database system uses the index to quickly locate the relevant rows, rather than scanning every record in the table.
- Use Case Example : For a table with a large number of records, such as a customer database, creating an index on the customerID column allows the database to find a specific customer much faster than searching through all the rows.
- A retailer sold a gadget for Rs. 90 after giving a discount of ‘p%’ on its marked price. If the marked price of the gadget is Rs. 120, then find ‘p�...
Anu sells articles A and B for ₹4,000 each, with no loss or profit in the entire transaction. If A is sold at a 25% profit, then B is sold at a loss of:
A sold a watch to B at a profit of 20%. B sold it to C at 30% profit. C sold it to D at 10% loss. If B's profit is ₹.80 more than that of A, then D bo...
A merchant bought two items: a mixer and a juicer for Rs. 9,500. He sold the mixer at a profit of 30% and the juicer at a loss of 20%. Determine the cos...
A shopkeeper claims to incur a loss of 20% but uses a weight of 640 grams in place of 1kg  If the CP of the rice is Rs 80/kg , what will be the % of a...
The ratio of cost prices of two articles ‘A’ and ‘B’ is 1:3 respectively and the average cost price of articles ‘A’ and ‘B’ is Rs. 1200....
Two goods, R and S, are sold at 30% profit and 15% loss respectively. If the cost price of S is Rs. 240 and the overall profit is Rs. 24, find the cost ...
A sold an article at 62% profit. If the profit earned had been 260% more, then the profit percentage would have been numerically equal to CP. Find the a...
- The selling price of a product when it is sold at a profit of 10% is Rs. 40 more than its selling price when it is sold at a loss of 25%. What would be the...
P purchased a book from registered store and gets 14% discount while Q purchased the same book from a roadside stall and got 19% discount. If Q paid Rs....