CS4482tut1-10q - CS4482/6492 Advanced Database Systems Tutorial 1 Are you ready to take this course on Advanced Database Systems Test yourself 1 Do

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CS4482/6492 Advanced Database Systems Tutorial 1 Are you ready to take this course on Advanced Database Systems? Test yourself 1. Do you know the meaning and difference between primary key , candidate key and superkey ? 2. Do you know the relationship between database , file , record , and disk block ? 3. In a sequential file , why is it difficult to maintain physical sequential order (e.g., records are stored physically in sorted order of the primary key)? 4. a) Translate the following query into a relational-algebra expression. select salary from instructor where salary < 75000 b) What is the meaning of the following relational-algebra expression? r r.A = s.B s 5. What are the ACID properties of the transactions? Whose responsibility to ensure these properties?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS4482/6492 Advanced Database Systems Tutorial 2 1. Suppose that we have an ordered file with 30,000 records stored on a disk with block size 1024 bytes. File records are of fixed size with record length 100 bytes. a) Find the number of block accesses required to search for a record using a binary search. b) Suppose that the search key field of the file is 9 bytes long, a pointer is 6 bytes long, and a primary index is constructed for the file with one index entry per data block. Find the number of block accesses required to search for a record using the index. c) Suppose that the sizes of search key field and pointer are the same as those stated in b). Construct a B + -tree index and a node of the B + -tree is made to be the same size as a disk block. i) What is the largest integer value of n for the B + -tree? ii) Using the value of n found in i), what is the maximum number of block accesses required to search for a record using the B + -tree? 2. Consider a B + -tree and a given function find , which returns leaf node C and index i such that C.P i points to the record with search key value V , if such a record exists. Write a pseudocode for a procedure printRange(L,U) to find and print all records with search key values in a specified range ( L , U ). Such queries are called range queries . 3. Given the following B + -tree with n =4, show the form of the tree after each of the following series of operations. a) Insert 10 b) Insert 8 c) Delete 23 d) Delete 19 e) Delete 17
Background image of page 2
CS4482/6492 Advanced Database Systems Tutorial 3 1. Suppose that we are using extendable hashing on a file that contains records with the following search-key values: 2, 3, 5, 7, 11, 17, 19, 23, 29, 31 (a) Show the extendable hash structure for this file if the hash function is h ( x ) = x mod 8 and buckets can hold three records. (b) Show how the extendable hash structure in (a) changes as the result of deleting 11. Coalesce buckets if possible. 2.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/11/2012 for the course CS CS4482 taught by Professor Drlee during the Winter '11 term at City University of Hong Kong.

Page1 / 10

CS4482tut1-10q - CS4482/6492 Advanced Database Systems Tutorial 1 Are you ready to take this course on Advanced Database Systems Test yourself 1 Do

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online