An index also stores a pointer to the table row
So, the question is if the value that we are looking for is found in an index (like
‘Jesus’) , how does it find the other values that are in the same row (like the address of
Jesus and his age)? Well, it’s quite simple – database indexes also store pointers to
the corresponding rows in the table. A pointer is just a reference to a place in memory
where the row data is stored on disk. So, in addition to the column value that is stored
in the index, a pointer to the row in the table where that value lives is also stored in
the index. This means that one of the values (or nodes) in the index for an
Employee_Name could be something like (“Jesus”, 0×82829), where 0×82829 is the
address on disk (the pointer) where the row data for “Jesus” is stored. Without that
pointer all you would have is a single value, which would be meaningless because you
would not be able to retrieve the other values in the same row – like the address and
the age of an employee.