Get in touch with us
Send us an e-mail
Question
_ The file has 20,000 pages and the buffer has 7 available frames.
_ The file has 2,000,000 pages and buffer has 15 available frames.
For each of the above scenario, answer the following questions assuming the best use of the
(a) How many initial runs will be produced?
(b) How many passes would be needed to complete the sorting?
(c) How many page I/Os would be required to sort the file?
(d) If we want to sort the file in 2 passes, how many buffer frames would be required?
2. Consider the join R 1R:a=S:b S of relations R and S with the following information.
R has 10,000 tuples and a blocking factor of 10.
S has 2,000 tuples and a blocking factor of 10.
S.b is the primary key of S.
Both R and S are stored in simple heap files and neither relation has any index.
Up to 52 buffer frames available.
For each of the three join algorithms: (a) Blocked nested-loop join, (b) Sort-merge join, and
(c) Hash join, answer the following questions. Unless stated otherwise, the join cost should
be the number of page I/Os excluding the cost for writing the join result.
(a) Estimate the I/O cost and the number of buffer frames that is needed to obtain that cost.
(b) What is the best cost of the join algorithm if additional buffer is available? How many
buffer frames are required to obtain that cost?
(c) How many blocks does the join result contain?
(d) If R:a is a foreign key referencing S:b, how would the answers to the previous questions
change?
Computer Science 5443 Assignment 3 August 15, 2015
3. Consider relation Executives(ename, title, dname, address), where all attributes have
the same length and ename is a candidate key. The relation contains 12; 000 pages and the
buffer has 10 pages. Assume that 10% tuples satisfy the following query.
Select E.title, Count(*)
From Executives E
Where E.dname > ’W%’
Group by E.title
For each of the following scenarios, describe the most efficient evaluation plan for the query
and estimate its cost in pages.
(a) Only a clustering B+ tree index on title is available.
(b) Only an unclustered B+ tree index on title is available.
(c) Only a clustered B+ tree index on dname is available.
(d) Only a clustering B+ tree index on (dname, title) is available.
(e) Only a clustering B+ tree index on (title, dname) is available.
4. Consider the database schema
emp(eid, did, sal, hobby)
dept(did, dname, floor, phone)
finance(did, budget, sales, expenses)
and the following query.
Select D.dname, F.budget
From emp E, dept D, finance F
Where E.did=D.did and D.did=F.did and D.floor=1
and E.sal>=49000 and E.hobby=’tennis’
(a) Draw the initial query tree and an optimized query tree produced by a decent query
(b) Assume that the optimizer will not consider any evaluation plan involving a cross product,
list join orders that the optimizer will consider.
(c) Consider the following scenario. The attributes that have unclustered B+ tree indexes
are emp.did, emp.sal, dept.floor, dept.did, and finance.did. The data in emp.sal ranges
between 10,000 and 60,000. Employees have 200 different hobbies. The building of
the company has 5 floors. The company has 50,000 employees and 2,500 departments,
each of which has some financial information. The DBMS uses only the indexed nested
loop join methods including possible pipelining. Assume that all B+ tree indexes have
3 levels.
i. For each base relation (i.e., emp, dept, and finance), estimate the number of tuples
that will satisfy all non-join conditions relevant to that relation.
ii. Which join order considered by the optimizer has the lowest estimated cost?
Summary
This question belongs to computer science and discusses about join algorithm and drawing query trees.
Word count: NA
Download Full Solution
The object oriented programming languages like C++ and Java were a nightmare for me and my professor rushed off with her lectures so fast that I couldn’t catch up with the syllabus. Then once HwA started helped me out with my computer science assignments I got more time to understand how the things summed up. They did not only just write the codes on my behalf but when I enquired explained to me every step individually. The experts here are really helpful and I will always remain grateful to HwA for all the nice grades I have got in my graduation and post graduation in computer science and technology.
The opportunity to talk to your online network security tutor anytime during the day is a great help. It is extremely helpful when you want to clarify any point in your assignment. The tutors are extremely professional and they have great knowledge on practically any topic under the sun in IT security. Would definitely recommend to all.
Our professors were piling up one assignment after the other and the pressure was too much to bear. I was thinking of how to tackle the situation when one of my friends suggested this website. I sceptical at the beginning and thought they will flunk me in the assignment. Honestly I was too scared but had no choice as I was dealing with like 10 assignments in a week. However, to my pleasant surprise I got brilliant feedback from my professor. He also had posed a certain query and that too was answered by the electronics engineering assignment expert from HwA.
The first year of my taxation course was full of disappointments as I often used to get the answers wrong and also my conception regarding the subject was not that clear. Then luckily while browsing for help in the internet I landed on this page of HwA and availed their services. The experience was wonderful and since I started to perform better in class with the help of the Australia taxation experts here in HwA.
1.: I had used another online accounting assignment help provider earlier for one of my accounting assignments and my professor immediately found out that it was not my work. But with TheReliableTutor and their assignment help experts who are from Singapore itself I have never faced this problem and have been happily using their services for the past two semesters.
Comments
this is a very good website
I have 50 questions for the same test your page is showing only 28
hi can you please help or guide me to answer my assignments. thanks
hi can anyone help or guide me to my assignments. thanks
This solution is perfect ...thanks
Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes
Perfect bank of solution.
great !
thanks for the quick response. the solution looks good. :)
thnx for the answer. it was perfect. just the way i wanted it.
works fine.