Course Hero Logo

Netid in optimizing join queries we choose to assume

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 3 - 6 out of 16 pages.

NetID:In optimizing join queries, we choose to assume only left-deep join trees, because such treesare most efficient.Explain:Not necessarily. Bush trees can sometimes be more efficient. We use left-deeponly for the easiness of plan selection.(8)TrueWhen we program a database transaction, we can use the “Abort” command to rollback atransaction that cannot be successfully completed.Explain:True. “Abort” would rollback the operations to make it as if the transaction didnot take place.(9)FalseGrouping (i.e., group-by) must be processed in a two-pass algorithm.Explain:False.It could be processed in one-pass algorithm as well, if there is enoughresource.(10)TrueFor logging, we prefer the UNDO+REDO scheme, so that we can be more flexible in whento write out dirty data to disk.Explain:True. UNDO plus REDO gives us more flexibility.(11)TrueOne particular motivation for uncertain database research is that data may be inherentlyuncertain,e.g., weather forecast gives probabilistic predictions.Explain:True. This reflects the real world, where many things are uncertain.3
NetID:Problem 2(16 points)Short Answer QuestionsFor each of the following questions, write your answer in the given space. You will get2 pointsforeach correct answer.(1) Answer: Yes.We can use the hash index to speed up the join between R and S. For eachvalue of a in R, we can directly use the hash index to see if there is a match in S.Consider relationsR(a, b) andS(a, c), for the following query. Would a hash index onS.ahelp in query processing? Briefly explain.SELECTaFROMR,SWHEREb<10 andR.a=S.a
Consider the following two tablesR(A, B, C, D) andS(D, E).Identify one functionaldependency (that is not violated in this example) that involves three attributes.Table R:Table SABCDDE=========================================1322131324223136413116624
NetID:(Problem 2, cont.)(4) Answer: There are two tuples<1,3,2,2,2>and<1,3,2,4,1>for schema (A,B,C,D,E).For the above tables, what is the result of this query:σA<2(RonS)? Show the result table.(5) Answer: There are many differences.For instance, uncertain database adopts the possibleworlds semantics, where a probabilistic database is viewed as a set of possible instances(worlds) associated with their probabilities.

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 16 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
Winslett
Tags
Computer Science, Relational model, Query language, NetId

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture