I was reading about Indexes in databases.
First, I have my original table. Then I add another table (the index table), which, every time I add a row in the first table, I make the effort of knowing where to insert it in the index table (say alphabetically). Then, when I search for some record, I use the index table, which transforms my searching problem to O(log) instead of O(n).
My question is the following: why not doing that effort in the original table?. At least if that table have only one index. If it has more, then apply the idea of tables of indexes. At least this idea is never mentioned in the literature I read, and I thought maybe there’s a good reason.
This post has some very useful links: indexes in sql server, internal working and structure of indexes
Short answer: The clustered index on your table should not be creating a separate mapping, as it sorts the original table itself. The other indices would create mappings to the row ids of the clustered one. This could be different based on the DB you are reading about.