0% found this document useful (0 votes)
24 views15 pages

Chapter 2 - File Structures - Attempt Review

Uploaded by

thanhhai.2723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views15 pages

Chapter 2 - File Structures - Attempt Review

Uploaded by

thanhhai.2723
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Đã bắt đầu vào Thứ năm, 22 Tháng chín 2022, 10:26 PM


lúc
Tình trạng Đã hoàn thành
Hoàn thành vào Thứ năm, 22 Tháng chín 2022, 10:31 PM
lúc
Thời gian thực 4 phút 48 giây
hiện
Điểm 11,00/15,00
Điểm 7,33 của 10,00 (73,33%)

Câu hỏi 1
Chính xác

Điểm 1,00 của 1,00

Characterize each file structure in terms of storage space

Unordered file (Heap file) A file of data blocks 

Ordered file (Sequential file) A main file of data blocks and an extra overflow file of unordered data blocks 

Hash file with chaining for collisions A file of data blocks and extra overflow blocks 

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


Unordered file (Heap file) → A file of data blocks,

Ordered file (Sequential file) → A main file of data blocks and an extra overflow file of unordered data blocks,
Hash file with chaining for collisions → A file of data blocks and extra overflow blocks

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 1/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 2
Không chính xác

Điểm 0,00 của 1,00

It’s supposed that employee’s data are stored in a hash file of 10 blocks. ID is a hash key. A hash function h(ID) = ID mod 10 is used for this
data file. Each bucket contains 1 block. Collisions are handled with overflow buckets using chaining. How many block accesses are needed to
retrieve every record whose Department is D3 on average?

a. 1

b. 4

c. 3

d. 11
e. 10
f. 2

g. 5 

h. None of the given results

Câu trả lời của bạn không chính xác.


Câu trả lời đúng là: 10

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 2/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 3
Chính xác

Điểm 1,00 của 1,00

It’s supposed that employee’s data are stored in an unordered file of 7 blocks. How many block accesses are needed to retrieve a record
whose ID is 3 on average?

a. 3

b. 7

c. 6

d. 4

e. 5

f. None of the given results

g. 2

h. 1

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


4

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 3/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 4
Chính xác

Điểm 1,00 của 1,00

Unordered files (Heap files) are efficient for ...

a. Update of existing records

b. Retrieval of some records according to a given condition

c. Retrieval of all records in a specific order of a given field

d. Insertion of new records

e. Deletion of existing records

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


Insertion of new records

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 4/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 5
Chính xác

Điểm 1,00 của 1,00

It’s supposed that employee’s data are stored in an ordered file of 7 blocks. ID is the ordering key field. What happens if we insert a new record
whose ID is 8?

a. The new record is inserted into the last block (36, _).

b. A new block is created between block (2,5) and block (9,10) to store the new record.

c. The new record is ignored because there is no empty space to insert and maintain the new record in a correct order.

d. The new record waits for empty space in either block (2, 5) or block (9, 10).

e. The new record is inserted into the end of the overflow file while the existing file which is the main file is kept unchanged.

Câu trả lời của bạn là chính xác.


Câu trả lời đúng là:

The new record is inserted into the end of the overflow file while the existing file which is the main file is kept unchanged.

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 5/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 6
Chính xác

Điểm 1,00 của 1,00

It’s supposed that employee’s data are stored in an ordered file of 7 blocks. ID is the ordering key field. How many block accesses are needed
to retrieve a record whose ID is 3 on average?

a. 4

b. 5

c. 6

d. 7

e. 2

f. None of the given results

g. 3

h. 1

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


3

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 6/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 7
Chính xác

Điểm 1,00 của 1,00

It’s supposed that employee’s data are stored in a hash file of 10 blocks. ID is a hash key. A hash function h(ID) = ID mod 10 is used for this
data file. Each bucket contains 1 block. Collisions are handled with overflow buckets using chaining. How many block accesses are needed to
retrieve a record whose ID is 3 on average?

a. 2

b. 3

c. 11

d. None of the results

e. 5

f. 10

g. 1

h. 4

Câu trả lời của bạn là chính xác.

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 7/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review
Câu trả lời đúng là:
1

Câu hỏi 8
Chính xác

Điểm 1,00 của 1,00

Hash files are efficient for ...

a. Deletion of the existing records that satisfy any given condition on the hash field

b. Update of the existing records that satisfy any given condition on the hash field

c. Retrieval of the existing records that satisfy an equality condition on the hash field

d. Retrieval of the existing records that satisfy any given condition on the hash field

e. Deletion of the existing records that satisfy an ordering condition on the hash field

Câu trả lời của bạn là chính xác.


Câu trả lời đúng là:
Retrieval of the existing records that satisfy an equality condition on the hash field

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 8/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 9
Không chính xác

Điểm 0,00 của 1,00

It’s supposed that employee’s data are stored in an unordered file of 7 blocks. How many block accesses are needed to retrieve every record
whose Department is D3 on average?

a. 6

b. 7

c. None of the given results

d. 2

e. 4 

f. 3

g. 1

h. 5

Câu trả lời của bạn không chính xác.

Câu trả lời đúng là:


7

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 9/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 10
Không chính xác

Điểm 0,00 của 1,00

It’s supposed that employee’s data are stored in an unordered file of 7 blocks. Reorganization is done to permanently remove each deleted
record whose Deletion_marker is 1. How many block accesses are needed to complete reorganization on this data file on average?

a. 7

b. 14 

c. 6

d. 4

e. 2

f. 13

g. 15

h. None of the given results

Câu trả lời của bạn không chính xác.

Câu trả lời đúng là:


13

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 10/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 11
Chính xác

Điểm 1,00 của 1,00

Ordered files (Sequential files) are efficient for ...

a. Retrieval of the existing records that satisfy a given condition on any field

b. Update of the existing records that satisfy a given condition on any field

c. Retrieval of the existing records that satisfy a given ordering condition on the ordering field

d. Deletion of the existing records that satisfy a given condition on any field

e. Insertion of new records

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


Retrieval of the existing records that satisfy a given ordering condition on the ordering field

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 11/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 12
Không chính xác

Điểm 0,00 của 1,00

It’s supposed that employee’s data are stored in an ordered file of 7 blocks. ID is the ordering key field. How many block accesses are needed
to retrieve every record whose Department is D3 on average?

a. 1

b. 4 

c. 2

d. None of the given results

e. 5

f. 7

g. 3

h. 6

Câu trả lời của bạn không chính xác.

Câu trả lời đúng là:


7

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 12/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 13
Chính xác

Điểm 1,00 của 1,00

Given Employee file with fields: SSN, Lname, Fname, Dnumber. This file is a hash file with the hash field SSN. How is this file processed to
retrieve all the records with Dnumber = 5?

a. Hash search on Dnumber values

b. Hash search on SSN values

c. Linear search

d. Binary search on SSN values

e. Binary search on Dnumber values

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


Linear search

Câu hỏi 14
Chính xác

Điểm 1,00 của 1,00

Given Employee file with fields: SSN, Lname, Fname, Dnumber. This file is ordered in ascending order of Dnumber values. How is this file
processed to retrieve all the records with Dnumber = 5?

a. Binary search on SSN values

b. Binary search on Dnumber values

c. Hash search on SSN values

d. Hash search on Dnumber values

e. Linear search

Câu trả lời của bạn là chính xác.


Câu trả lời đúng là:
Binary search on Dnumber values

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 13/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review

Câu hỏi 15
Chính xác

Điểm 1,00 của 1,00

Given Employee file which is a heap file with fields: SSN, Lname, Fname, Dnumber. How is this file processed to retrieve all the records with
Dnumber = 5?

a. Hash search on Dnumber values

b. Binary search on SSN values

c. Linear search

d. Binary search on Dnumber values

e. Hash search on SSN values

Câu trả lời của bạn là chính xác.

Câu trả lời đúng là:


Linear search

Á
https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 14/15
9/30/22, 7:46 PM Chapter 2 - File Structures: Attempt review
BÁCH KHOA E-LEARNING

WEBSITE

HCMUT
MyBK
BKSI

LIÊN HỆ
 268 Lý Thường Kiệt, P.14, Q.10, TP.HCM

 (028) 38 651 670 - (028) 38 647 256 (Ext: 5258, 5234)

 elearning@hcmut.edu.vn

Copyright 2007-2022 BKEL - Phát triển dựa trên Moodle

https://e-learning.hcmut.edu.vn/mod/quiz/review.php?attempt=41026&cmid=28974 15/15

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy