Write a program to implement the inverted file shown in the slides (Simple Index file, LabelID file and Data file). Use the Avail_List to point at the deleted Label IDs so that their spaces can be re-used for new records. Insert the example data in the slides in the three files (see below).
Data file:
Simple Index:
LabelID file:
Q2. Draw a B-tree and show its content after every operation. The nodes in the B-tree can store maximum of 4 keys and minimum 2 keys.
• Insert: A,G,F,B,K,D,H,M,
• Insert: J,
• Delete: A, D,
• Insert: E,S,I,R,X,
• Delete: M,
• Insert: A,C,D,
• Delete: S,
• Insert: L,N,T,U,
• Delete: R