Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Consider the join R ▷◁ S where the join predicate is R.a = S.b, given the following metadata about R and S:
- Relation R contains 2,000 tuples and has 10 tuples per block
- Relation S contains 10,000 tuples and has 10 tuples per block
- Attribute a of relation R is the primary key for R, and every tuple in R matches 5 tuples in S
- There exists a primary index on S.b with height 3
- There exists a secondary index on R.a with height 2
- The buffer can hold 5 blocks
What is the cost of a plan that evaluates this query using sort-merge join. Show the details of your cost analysis.
Please show detailed explaination.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- For these questions, there exists 4 relations: R(A, B,C), S(C,D), T(D,E,F), and U(B,G). The size of attributes A to D are 10 bytes each, attributes E and F have size 100 bytes, and attribute G has size 1000 bytes. The blocks size is 16,384 bytes with no spanning. Relation R has 100,000 tuples, relation S has 20,000 typles, T has 5,000 tuples, and relation U has 150,000 tuples. Other statistics: V(R,C)=10,000, V(S,D)=500, V(R,B)=1000. Assume that attributes with the same name can be joined across relations (and duplicates are eliminated during a join), and the fırst attribute is the primary key of the relation. Answer the following questions about calculating intermediate result sizes. Answer the question in terms of the # of tuples and the # of blocks. Question 3 What is the size of op=10(S)? Tuples: Blocks: Question 4 What is the size of oc>10(S)? Tuples: Blocks: Question 5 What is the size of og=5(R)? Tuples: Blocks:arrow_forwardSuppose a single relation (table) is used to record the information about students’ enrollment in courses. We assume that each student may enroll in more than one course and one course is assigned to one instructor. All questions below are based on the following ENROLLMENT unnormalized table. ENROLLMENT StudentID StuName CourseCode CourseName Grade CreditHr Instructor InstrOffice 1021234 Ali 1102 1201 Database Internet A B 3 3 Zaid Sumaiya 5.01 5.05 1024131 Amina 1201 1401 Internet Operating System C B 3 3 Sumaiya Abdullah 5.05 5.10 1. What would be the First Normal Form (1NF) relation? Identify the primary key. 2. Identify the functional dependencies represented by the attributes shown in the ENROLLMENT table. Label partial or transitive dependency where applicable.arrow_forwardThe following two relations R and S have one attribute storing integers. Assume that a join is performed on this attribute. R = { 4, 3, 1, 6, 2, 9, 0, 5, 8, 7 } S = { 3, 4, 5, 8, 0, 2, 1, 6, 7, 9} Show the order of tuples output for the following join algorithms: (for example Sort Join would give (0,0), (1,1),...,(9,9) ) 1.One pass join where M=12 and R is put in memory: 2.Merge-sort-join with M=5: 3.Hash Join with three buckets and M=4. Assume R is the build relation and S is the probe relation. Also assume bucket 0 is output first. Output:arrow_forward
- Consider that a database contains the following relations PARENT(X, Y), and a relation BIRTH(X, B), where B is the birthdate of a person X. The following information is used for question (b), (c) that we have the following family treearrow_forwardLet R(A, B, C) be arelational schema with the following functional dependencies :{A— >B,B—>C,C— >A}The decomposition of Rinto (A, B), (B, C).A. Gives a lossless join, and is dependency preservingB. Gives a lossless join, but is not dependency preservingC. Does not give a lossless join, but is dependency preservingD. Does not give a lossless join and is not dependency preservingarrow_forwardCourse: Principles of Database please solve it within 30 minutes. please please, pleaseThank you Single Choice Questions 11. Given a relation R and a condition f for selecting from relation R, the correct relational algebraic expression is ( ). A、R X R B、 R ⋈ R C、sf(R) D、 ∏f(R) 12. If relations R and S have a common attribute set Y, when executing , tuples that do not have matching values on attribute Y will be discarded. To avoid discarding those tuples, which operation should be used? ( ) A. Aggregation. B. Grouping. C. Outer union. D. Outer join. 13. To address the "lost update" problem, a transaction must obtain ( ) before updating a data set. A. Shared lock (S-lock). B. Exclusive lock (X-lock). C. Shared lock (S-lock) and exclusive lock (X-lock). D. Shared lock (S-lock) or exclusive lock (X-lock). 14. If, during the system operation, data stored on external storage is…arrow_forward
- QUESTION 7 Consider the following database schema for University Library database. A student can borrow many books and a given book can be borrowed by any student if it is available in the library. For each borrowing, the borrowing and return dates are registered in the database. Student (SID: long, CPR:long (unique), Name:string, tel:number, major:String, gender:Character {"F' or M'}) Book (ISBN:long, Title:string (unique), Author:string) Borrowedltems(stSID:long, booklSBN:long, serialNo.int (unique), BorrowingDate:date, RetumDate:date) Write SQL statements to: 1. List ISBN, Title, Author of all books that include the word 'Database' in their titles in a descending order of ISBN. 2. List SID, Name, and Major of all female students doing major in 'CS' and their name starts with 'S'.arrow_forwardConsider the following relational databasearrow_forwardRead Scnerio carefully : Make a Propose and optimal database design in RDBMS for a super store. In which clients came and can purchase products according to their likes and dislikes. Super store have same products of different companies. In the end client received a receipt of their purchase from counter he/she go for bill. Database also save records of stock according to FIFO system. Required to define Entities and their attributes Attributes Types Each Attribute Required Define keys of each entity Define relationship between the entities.arrow_forward
- Let R and K be two relations under a join operation. Assume that m = |R| and n = IKI, then the maximum and minimum sizes of the join, respectively, are: 1. m+n and 0 II. mn and 0 III. m+n and m-n IV. mn and m+n III O IV =arrow_forwardMake a hybrid merge-join variant that works in scenarios where neither relation is physically sorted but has a sorted secondary index on the joined attributes.arrow_forwardA column in a relation (table) has a type. Consider implementing a date as CHAR(10) in the format YYYY-MM-DD. The lecture material states that attributes (column values) come from a domain. Using date explain the differenc between a domain and a type.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education