You are on page 1of 11
Database Systems I (1S312) - Midterm Exam ey) Exam Date: Thursday 25/11/2021 Exam Time: 09:00 - 09:30 Assoc. Prof. Doaa Saad Elzanfaly Ql. Choose the Right Answer: 2. Incase of linear search algorithm, if the equality condition is on a key, the search can retrieve: A Single record. b. Multiple records. c. Norecords. d._ None of the above 2. Ifthere are no records (tuples) that satisfy the selection condition a, The selectivity will be one. Mf The selectivity will be zero. c. The selectivity will be less than one. d. None of the above. 2 thera le anigdavian ana nf the Ininad tahlar which ic hattar in tha race nf wtinn Inetav.hacad nacted.Innn ‘Scanned with CamSeanner If there are no records (tuples) that satisfy the selection condition a. The selectivity will be one. W. The selectivity will be zero. ¢. The selectivity will be less than one. d. None of the above. If there is an index on one of the joined tables, which is better in the case of using Index-based neste join: #@ The indexed file will be the inner-loop file. b. The indexed file will be the outer-loop fi There will be no difference. d. Better not to use the index. In a B+ Tree index, all pointers to data records exists at the a. Internal nodes. b. External nodes. & leaf-level notes. d. All the mentioned. Relational Algebra is a query language that takes relation(s) as input and produces anott ealntinn ae aa nnbnut nf tha memes ‘Scanned with CamSeanner I query language that takes relation(s) as input and Relational Algebra is a relation as an output of the query. a. Relational. 4 Procedural. produces anothe b. Structural. d. Declarative. Which of the following is a binary operation? a. Selection operation b. Projection operation & Join operation d. None of the mentioned The select operation's function in relational algebra is identical to the clause in SQL. FF Where b. From c. Select 4 d. None of the mentioned The most used operation in relational algebra for returning a set of tuples from a relation is the: a. Join operation. b. Projection operation. ‘Scanned with CamSeanner 8. 10. St iL © amen amcor Aatibe AaBb uence AaB «» b. From d. None of the mentioned The most used operation in relational algebra for returning a set of tuples from a relation is the: a. Join operation. b. Projection operation. 9% Selection operation. d. Union operation. The_____ operation combines two relations by merging pairs of tuples, one from each relation, into single tuple. a. Select F doin ¢. Union d. Intersection a Which level of RAID refers to disk mirroring with block striping? a, RAIDlevel1 — b. RAID level 2 ‘Scanned with CamSeanner #7 RAID level 1 b. RAID level 2 ¢. RAID level O d. RAID level 3 11. A unit of storage that can store one or more records is denoted as a. Buckets b. Disk pages Se Blocks d. Nodes Page 1 of 2 ‘Scanned with CamSeanner tote Aas — s&s 12. Ifa piece of data is stored in two places in the database, then a. Storage space is wasted. b. Changing the data in one spot will cause data inconsistency, c. It can be difficult to accessed. 97 Storage space is wasted & changing the data in one spot will cause data inconsistency 13. The information about data in a database is called a0 Metadata b. Myper data Teradata 4. None of the mentioned 14, The DBMS acts at an interface between the following two components of an enterprise-clians databan system: a. Database application and the database ® Data and the database nanfentinn mad £99, ‘Scanned with CamScanner 14, The DBMS acts as an interface between the following two components of an enterprise-class databast system: 27 Database application and the database b. Data and the database c. The user and the database application d. Database application and SQL 15. A technique for direct search is: a. Binary Search b. Linear Search c. Tree Search Se Hashing 16. Consider a hash table of size seven, with starting index zero. Given the following keys and their corresponding hash values: ‘Scanned with CamSeanner A Hashing c. Tree Search 16. Consider a hash table of size seven, with starting index zero. Given the following keys and their corresponding hash values: which of the following is the contents of the table when using progressive overflow? a. A,C,F,H,M,G,Z. b. A,C,F,G,H, M,Z. —— Z,A,C,F,G,H,M. d. None of the mentioned. Q2. For each of the following statements, state whether if it is true (a) or false (e): ‘Scanned with CamSeanner 17. 18. 19. 20. 21, 22. 23. 24, 25. 26. jige In case of using Primary index in Selection, the condition must be on search-key of index. T The Join Selection Factor does not depend on the equijoin condition with another file. Union, intersection, and set difference operations can be implemented using sort-merge techniquc Linear search is better than B+ tree index in implementing an aggregate query especially if the inde on the aggregate attribute. [= The average access times for sequentially scanning a heap file of b blocks is b/2 [ For any relation R, RUR#R. The search length in the chained progressive overflow is better than the progressive overflow. J The Join operation is commutative while the Set Difference operation is not. There could be more than one primary index for the same file but there must be one and only one secondary index for the file. Because a single-level index is an ordered file, we can create a primary index to the index itself. T ‘Scanned with CamSeanner 26. Because a single-level index is an ordered file, we can create a primary index to the index itself. 27. The parser in the query processing checks only the syntax of the SQL statement. 28. Collision occuts when a new record hashes to a bucket that is already full. T 29. An SQL Statement has many equivalent relational algebra expressions that have the same performe with different results. F ‘Scanned with CamSeanner with different results. 30. The default for SQL queries is to eliminate duplicates tuples from the query result End of ‘Scanned with CamSeanner

You might also like