Question

4. (15 points) Consider a situation in which reports are often generated for each value of a column with only a few possible values, (such as a M F gender column or a State column (a) Are these columns usually good candidates for indexes? Why or why not? gender column or a State column (b) What if the tuples in these tables could be stored on disk in order (lexically, numerically, whatever is appropriate) would queries benefit from this? Why or why not?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a) Indexes will be useful if:

  • The column or columns have a high degree of uniqueness
  • You frequently need to look for a certain value or range of values for the column.

They will not be useful if:

  • You are selecting a large % (>10-20%) of the rows in the table
  • The additional space usage is an issue
  • You want to maximize insert performance. Every index on a table reduces insert and update performance because they must be updated each time the data changes.

Hence in our case, we are generating reports from Gender Column (which consists of two values, Male and Female) and State column, of which only a few values are selected for our querying purpose. These columns either dont have a high degree of randomness (eg Gender) or dont have any range of values (ie State). So, it will not be useful to create indexes on "Gender" and "State" columns.

(b) Even if we store these tuples of a given Table on a disk, queries will not benefit us as filtering out the data (ie. based on Gender or State wise) will be too difficult to perform for a Disk based system and thus report generation will become much harder. If we store them in Database we can filter out the reports based on WHERE Clause and select only those data sets that we want to view as a part of the report.

PLease let me know in case of any clarifications required. Thanks!

Add a comment
Know the answer?
Add Answer to:
4. (15 points) Consider a situation in which reports are often generated for each value of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hello! Could you please write your own four paragraph (5-6 sentences per paragraph) take away or...

    Hello! Could you please write your own four paragraph (5-6 sentences per paragraph) take away or reflection of the below information? Please complete in 24 hours if possible. Thank you! RIS BOHNET THINKS firms are wasting their money on diversity training. The problem is, most programs just don’t work. Rather than run more workshops or try to eradicate the biases that cause discrimination, she says, companies need to redesign their processes to prevent biased choices in the first place. Bohnet...

  • write a detailed summary in an organized format. It must include 3-4 key points of the...

    write a detailed summary in an organized format. It must include 3-4 key points of the controversy. Break up your summary in 3-4 paragraphs. Must include specific reasons as to why a vegetarian diet can be better and or worse than the meat heavy diets? Explain briefly using examples how reading this controversy has helped you in making better dietary choices in future? CONTROVERSY 6 Table of Contents Vegetarian and Meat-Containing Diets: What Are the Benefits and Pitfalls? Notebook LO...

  • In not more than twenty (20) words, state the theses of the following passages. Each thesis...

    In not more than twenty (20) words, state the theses of the following passages. Each thesis should be strong, precise and researchable. Question 3 (a) We wish to interrogate the effects of societal polarization – albeit negatively – the unending demand of citizens for probity and accountability from political leadership in Ghana. Encapsulating the political culture or attitude of the Ghanaian since the introduction of multi-party democracy in the 1950s are the elements of societal polarization, contestations and overtly partisan...

  • please help Question 23 (1 point) Which observation is NOT explained by the intermediate disturbance hypothesis...

    please help Question 23 (1 point) Which observation is NOT explained by the intermediate disturbance hypothesis In the interior of an old forest a low number of K-type species dominate the community Species evenness is larger when disturbances are extremely frequent Species richness increases immediately after a disturbance such as a fire, but may decrease later In beach dune environments, a low number of r-type species dominate the community Question 24 (1 point) Some birds follow moving swarms of army...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • Read the attached article. Do you feel one style of banking control is more stable than...

    Read the attached article. Do you feel one style of banking control is more stable than the other? Why? Does one banking method minimize market volatility and risk better or is it just packaged differently? Do you feel the US (Western) Banking system can better control the patterns of behavior going forward that have caused economic damage in the past? Should the Fed continue its stimulus policy, reduce it or abandon it entirely (Google some recent articles to research this)?  (Please...

  • Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You...

    Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You are the senior accounting faculty member in the business school and your dean, Dean Weller, is asking for help. She is very discouraged after a midyear budget meeting with the Vice President of Finance. The college's Department of Social Work has a large budget deficit, and because of this the VP is inclined towards closing the department entirely or closing its bachelor's program. The...

  • Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between...

    Chapter overview 1. Reasons for international trade Resources reasons Economic reasons Other reasons 2. Difference between international trade and domestic trade More complex context More difficult and risky Higher management skills required 3. Basic concept s relating to international trade Visible trade & invisible trade Favorable trade & unfavorable trade General trade system & special trade system Volume of international trade & quantum of international trade Commodity composition of international trade Geographical composition of international trade Degree / ratio of...

  • Question 1 (40 marks) Refer to Table 1. Write the Excel formula for each cell marked...

    Question 1 (40 marks) Refer to Table 1. Write the Excel formula for each cell marked with "" in column C such that formula could be copied and pasted into columns D, and E using Microsoft Excel without further editing, There is no need to explicitly write the Excel formula for cells marked with "Copy & paste". Label each formula clearly with cell reference position. In many country towns of China, there is no western coffee shop such as Starbucks...

  • Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of...

    Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of physician-centered and collaborative communication. How is the caregiver’s role different in each model? How is the patient’s role different? Answer: Physical-centered communication involves the specialists taking control of the conversation. They decide on the topics of discussion and when to end the process. The patient responds to the issues raised by the caregiver and acts accordingly. On the other hand, Collaborative communication involves a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT