Skills101
← All practice quizzes

Quiz: File Organization and Hashing

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

How a database lays out records in disk blocks, and how hashing finds a record in about one block read. Blocking factor, heap, sorted and hash files, static hashing with overflow chains, and extendible hashing traced step by step.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Block size is 2,048 bytes and each record is 150 bytes (unspanned). What is the blocking factor?

  2. Question 2

    A file has 1,024 blocks sorted on roll number. At most how many block reads does binary search need to find one roll number?

  3. Question 3

    Which file organization is best for WHERE roll = 1042 but useless for WHERE marks BETWEEN 60 AND 70?

  4. Question 4

    What does this print?

    M = 5
    buckets = [[] for _ in range(M)]
    for k in [10, 21, 35, 7, 12, 40]:
        buckets[k % M].append(k)
    print([len(b) for b in buckets])
    
  5. Question 5

    What is the main weakness of static hashing for a growing table?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →