02Chapter 2: Records, blocking factor and number of blocksThis chapter assumes you know that a disk is read and written in fixed-size blocks, and that you are comfortable with floor and ceiling arithmetic. It turns a file of records into a count of blocks. Every later cost formula, from heap-file scans to B+ tree heights, starts from that count.5 min read
03Chapter 3: File organisation: the options and what they trade offThis chapter assumes you know how a file of fixed-length records maps onto disk blocks. That means the blocking factor bfr = floor(B / R) and the block count b = ceil(r / bfr). You should also know binary search and the idea that the cost of an operation is the number of block accesses. Later ch5 min read
04Chapter 4: Heap files: cheap insertion, linear searchA heap file (also called a pile file) stores records in no particular order. A new record goes wherever there is room, usually at the end. This chapter derives the block-access cost of each operation on a heap file. Those costs are the baseline that sorted files and indexes try to beat.5 min read
05Chapter 5: Sorted files: binary search and costly updatesThis chapter assumes you know binary search, ceiling and floor arithmetic, and the blocking factor from the earlier chapters. It also assumes you know that a disk is read one block at a time, so the cost of an operation is counted in block accesses.6 min read
06Chapter 6: Hashed files: equality lookups and their limitsThis chapter assumes you know blocking factor and block counts (from the earlier chapters on records and blocks) and the costs of heap and sorted files. It also assumes you can read basic modular arithmetic and a short Python class. Cost is always counted in block accesses.5 min read
07Chapter 7: Index basics: dense versus sparseThis chapter assumes you know how to compute the blocking factor and the number of data blocks for a file, and that you are comfortable with binary search and ceiling and floor arithmetic. It builds on the sorted-file chapter, where binary search costs about log2(b) block accesses.5 min read
08Chapter 8: Primary and clustering indexesThis chapter assumes you know how records are packed into blocks, how to compute the blocking factor and the number of data blocks, and the difference between dense and sparse indexes. Everything here is measured in block accesses, the cost unit from the earlier chapters.6 min read
09Chapter 9: Secondary indexes on key and non-key fieldsThis chapter assumes you can compute the blocking factor and the number of data blocks for a file. It also assumes you know how a sparse primary index is searched. Both appear in the earlier chapters on blocking and on primary and clustering indexes.5 min read
10Chapter 10: Multilevel indexes and why they lead to treesThis chapter assumes you can compute a blocking factor and the number of data blocks. It also assumes you know the difference between dense and sparse indexes, and between primary, clustering and secondary indexes. You also need ceiling arithmetic and logarithms. Here we ask what to do when the inde6 min read
11Chapter 11: B-tree structure, order and balance rulesThis chapter defines the B-tree, its order, and the rules that keep it balanced. It assumes you know the multilevel index idea from the previous chapter, binary search trees, and ceiling and floor arithmetic. It does not cover insertion or deletion, which come in the next chapter.6 min read
12Chapter 12: B-tree search, insertion with splits, and deletionThis chapter assumes you know the B-tree structure from the previous chapter. That means the order p (the maximum number of tree pointers per node), sorted keys inside nodes, and all leaves at the same level. It also assumes you can do ceiling and floor arithmetic.5 min read
13Chapter 13: B+ tree structure: internal nodes, linked leavesThis chapter assumes you know what a block is, how blocking factor works, what a sparse index is, and how a multilevel index lets you reach a record in a few block reads. If any of that is unclear, review the earlier chapters on blocking and multilevel indexes first. Here we fix the exact shape of a6 min read
14Chapter 14: Computing node order and tree height from block sizeThis chapter turns block size and field sizes into the order of a B+ tree node. It then turns the order into a range of possible tree heights and a block-access cost. I assume you know what a B+ tree is (internal nodes with separator keys, linked leaves holding record pointers) and how to compute a 4 min read
15Chapter 15: B+ tree search, range queries, insertion and deletionThis chapter assumes you know the B+ tree layout from the previous chapter. Internal nodes hold only separator keys and tree pointers. Leaves hold every key with its record pointer and are chained by next-leaf pointers. You should also be comfortable with ceiling and floor arithmetic and with the bl5 min read
16Chapter 16: B-tree versus B+ tree: fan-out, range scans, storageThis chapter assumes you know how both trees are built: node order, the balance rules, and how insertion splits a node. You should also be comfortable with block-access cost and ceiling and floor arithmetic. Here we compare the two trees on the three axes GATE questions and database designers care a5 min read
17Chapter 17: GATE problem patterns and worked strategiesThis chapter assumes you know blocking factor, sparse and dense indexes, multilevel indexes, and B and B+ tree structure from the earlier chapters. It covers how GATE questions on this topic are built, what to write down first, and which conventions cause lost marks.5 min read