CMU-SCS 15-415/615 DB Applications C. Faloutsos - Spring'13 Practice questions tuning: select * from EMPLOYEES where name like '%Mike%'; select * from EMPLOYEES where name like 'Mike%'; select * from EMPLOYEES where name like '%Jr'; Assume 1GB - 1sec 10GB of records, no index - speeds? 10GB of records, hash index on name - speeds? ..............., B-tree ........... - speeds? normalization: R( A, B, C, D) A->B candidate key(s)? S( E, F, G) = { (123, smith, main-street), (123, johnson, forbes) } can you say if E->F ? can you say if F->G ? CC Give the simplest serializable schedule, that is NOT serial T/F with 2PL, we may have deadlocks T/F with 2PL, we may have non-serializable schedules T/F with 2PLC, we may have deadlocks T/F with 2PLC, we may have non-serializable schedules T/F with wound-wait, we may have deadlocks T/F with optimistic CC, we may have deadlocks T/F with multi-granularity CC, we may have deadlocks Recovery: given after a power-failure, indicate which steps will ARIES do Spatial DB: in a 8x8 grid, what is the z-value of (0,0); of (7,7); of (2,2) Distributed DB consider R(A,B) ={ (a,1), (b,1), (b,2) } and S(A,C) ={ (a, xx), (a, yy), (c, zz) } What is the table R-semijoin-S Data Mining consider SALES( c-id, p-id, color, size, branch-id, $amount) consider the SQL statement that creates a datacube select branch-id, color, size, sum(amount) from SALES cube by branch-id, color, size a) what is the 'measure' b) which attribute(s) is/are the dimension(s)? c) without using 'cube by', how many sql statements do you need to write to collect the same info