Suppose the EMPLOYEE table is kept sorted by its primary key ssn. Draw a diagram
ID: 3832566 • Letter: S
Question
Suppose the EMPLOYEE table is kept sorted by its primary key ssn. Draw a diagram of a possible secondary index on the attribute dno. Because dno is not a key, each index entry will contain a list of either record pointers or primarykey values from the EMPLOYEE table; be sure you show how these pointers / key-values are used.
Dno
1
4
5
Fname
Lname
Ssn
Dno
John
Smith
123456789
5
Franklin
Wong
333445555
1
Joyce
English
453453453
5
Ramesh
Narayan
666884444
4
James
Borg
888665555
1
Jennifer
Wallace
987654321
5
Dno
1
4
5
Explanation / Answer
It would be similar to below..
Dno => SSN
1 => 333445555 => 888665555
4 => 666884444
5 => 123456789 => 453453453 => 987654321
It is like a array corresponding to all different vaues(HashTable) storing the first node of that index.. The nodes itself contain the reference for the next node.. Very similar to HashTables using Linked List
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.