adb homework
different pieces of information for a student: name (25 bytes), idnumber (15 byes), gpa (10 bytes) and address (90 bytes). There are five hundred thousand students (it is a large university!). Each block can store 2000 bytes of information. A block pointer requires 10 bytes. The data file is sorted by the primary key, the student name. The idnumber is a secondary key. How many disk accesses are required if:
(a) access is through student name and there is a primary index on student name (similar to the index in Figure 18.1). You can assume that the index is small enough to be kept in RAM, and is already in RAM.
(b) access is through student name and there is a primary index on student name (similar to the index in Figure 18.1) which also has to be kept on disk.
(c) access is through student name and there is no index
(d) access is through student id and there is a secondary index on the student id (similar to the index in Figure 18.4) which also has to be kept on disk.
(e) access is through student name and there is a 2-level primary index on student name (similar to the index in Figure 18.6) in which the second level of the index is in memory, while the first level of the index is on disk. This is somewhat different from the way the Figure 18.6 index is organized in the sense that we have only 2 levels; the second level already in RAM, and the first level on the disk.
|
· · الشروط · الخصوصية وملفات تعريف الارتباط · العربية |
Figure 18.1 below: