B-Trees Section 11.4
External files
•	When the number of records is large we cannot load the entire file into memory.
•	File stays on the disk and we read part of the file.
•	Efficient retrieval
Indexed Sequential Access Method (ISAM)
•	Each block stores m records
•	Maintain an index (largest key in each block) in the memory 
•	Locate the block by looking up the index
•	Search the retrieved block for the record
•	Can be extended to files that are large enough that each file is stored on several disks
•	Problem when we have insertions and deletions
m-way Search Trees
•	m children and m-1 records per node
•	Each node may store upto m-1 records
•	number of records = p <= m-1
•	if there are p records, there are p+1 children
•	See fig. 11.24
•	Size of the node will be equal to a block size
•	Searching, insertion and deletion
•	Searching: Follow the pointer (see the board)
•	Insertion: Search (if not there, insert)
•	see if you can extend the existing block
•	else add a new block
•	Deletion (Search)
•	If it can be deleted without affecting other blocks do it
•	Otherwise, you may have to move the records from children (see the book for deleting 84, 5, 10.
•	Height of an m-way tree can be between logm(n+1) to n, where n is the number of records in the tree.
•	The worst case height is too high, we need more restrictions
•	Number of disk accesses is equal to the height of the tree. Smaller the height, fewer will be your disk accesses
B-Tree
•	Three conditions in the definition (11.4.3)
•	These restrictions make sure that the tree height is limited
•	Height of a B-Tree
•	Lemma 11.3
•	The above restrictions make sure that the height of the tree is proportional to log (n) or O(log(n))