• Keine Ergebnisse gefunden

Relational Databases 2 Exercise Sheet 4: Trees & Advanced Indexes

N/A
N/A
Protected

Academic year: 2021

Aktie "Relational Databases 2 Exercise Sheet 4: Trees & Advanced Indexes"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Relational Databases 2 Exercise Sheet 4: Trees & Advanced Indexes

Exercise 1: Binary Search Trees

a. Given is the following binary search tree. Delete the following nodes in the given order and show the tree after each deletion1: 10, 4, 30, 15

b. Tree Traversal: Access all nodes of the tree in Pre-Order, In-Order and Post-Order.

Exercise 2: AVL Trees

a. Build an AVL Tree by inserting the following keys step by step: I, D, J, F, C, A, B.

b. Considering an AVL Tree with 100 keys. What is its maximal height?

c. Show an AVL Tree which height is smaller after deleting and inserting the same key.

d. Draw an AVL Tree with a minimum number of nodes whose external nodes are on three dif- ferent levels.

Exercise 3: B-Trees

a. Build a B-Tree by inserting the keys 1 – 20 (k = 22) in ascending order. What do you recog- nize?

b. In which order must the keys be inserted in an empty B-Tree to have maximum split opera- tions. Please explain your answer.

1 Deletion if node has two children: Replace with In-Order successor

2 k: minimum number of keys allowed for one node (exception: root node). The maximum number is 2*k.

Referenzen

ÄHNLICHE DOKUMENTE

• A transaction T2 creates a new account (Kto-Nr: 180; Balance: 750) and updates the Sum of the corresponding office in the investment table?. Show a schedule where

Apply and visualize the timestamp ordering algorithm for both schedules.. Can the schedule

c) Describe briefly the 3 phases of ARIES. d) What does steal/no-steal and force/no-force mean with regard to buffer management for

Considering a large company: Would they prefer role-based access control or discretionary access control.. Please explain

Provide an example on how perturbation-based techniques can improve statistical database

If you forget to write your Matrikelnummer and/or your tutorial group number, you get automatically 0 points.. Your solutions may be in German or

• We have 2 dimensions, Products with 8 products ordered by category and group, and Time, with 4 quarters. • Cell [0][0] represents product with id 1 sold in the first quarter, and

Why are simple binary search trees unsuitable for indexing database records.. Exercise 2