Create a secondary index

Assignment Help Database Management System
Reference no: EM131426768

Advanced Database Topics Assignment

This will give you a chance to apply everything you learned in the class. We will use two different databases (Postgres and Oracle are easiest because you have access to them already and you even have the data loaded). You can use MySQL, but that would require additional guess regarding the estimated cost or using real runtime. Of course, you are welcome to install or use your own (relational) database engine if you want.

In the interest of finishing quickly, we will not run "real" runtimes for the queries and focus on explain costs.

Baseline results -

Start this part by collecting the baseline performance (estimated query runtimes with no additional structures in the database) for all 13 queries in the SSBM workload - we will use these numbers as are reference point to estimate improvement. If you have any indexes from previous assignments, drop them first.

You should have estimated numbers (for MySQL you can use real runtime or your own estimate) for all 13 queries for two different databases. You need to submit all 26 estimated cost numbers - but only have to submit one query screenshot from each database showing the EXPLAIN plan output.

Please be sure to specify which database / version / computer hardware you are using.

You should provide an answer for each database you chose. That answer can be the same for both databases, but only if you verified that it works in the second database. Your index/MV should improve the query cost (that's the point, after all). However, if your suggested index/MV does not get picked up, do not worry about it. If that happens, be sure to describe what you have attempted and why you think your index was appropriate.

Please do not forget to include the SQL code for index creation (and query rewrite for MVs in Postgres) for any of your answers.

1: Indexes

A. Create a secondary index for Q1.2

B. Create a secondary index for Q2.2

C. Create a secondary index for Q3.2

D. Create a secondary index for Q4.3 (Include a screenshot of EXPLAIN here for both databases in addition to the estimate number)

E. Create a secondary index for Flight3 (Q3.1, Q3.2, Q3.3, Q3.4). Report the explain costs for all 3 queries.

F. Create a clustered index for Q3.2. Remember that in Oracle you have to create an IOT (Index Organized Table) and cannot re-cluster an existing table like you can in Postgres. Include a screenshot here in addition to reporting the estimate EXPLAIN cost.

G. Create a clustered index for Flight2 (Q2.1, Q2.2, Q2.3).

2: Materialized Views

A. Create a materialized view (no pre-filtering, that is only GROUP BY and JOIN is allowed, but no predicates in the MV) for Q1.3

B. Create a materialized view (no pre-filtering, that is only GROUP BY and JOIN is allowed, but no filter predicates may be used) for Q3.4

C. Create a materialized view for Flight4 (Q4.1, Q4.2, Q4.3)

D. Add an index to your MV answer in 2-C and re-evaluate all three queries (submit a screenshot of explain for one of the three queries for each database you are using)

3: Database Physical Design

Using the structures you have already created, put together a physical design, specifying the size of the combined structures and the estimated cost for all 13 queries. For example, if you choose an index from 1-A and an MV from 2-C, you would report the size of these structures and the (estimated EXPLAIN) runtimes that can be achieved if both of them were used. Do this for each database -- you do not need to re-run anything for this.

Which DBMS achieved a better (size-to-improvement) ratio?

4: Further database optimization

For one database, evaluate the benefits of compression for any one previous structure. I.e., compress a structure and check for cost difference that results. In Oracle, it is as simple as rightclick on the structure (table/mv/etc), then choose "Storage -> Compress..."

5:

Use your code from previous homework assignments, create an automatic index builder. That is, given a query such as what you parsed in HW1, generate the CREATE INDEX AutoIndex ON TABLE ... SQL code that can be pasted into a database. I suggest assuming simplified queries (simple equality or range predicates only) but using your query parser and statistics to estimate selectivity. You can assume that all selectivities are independent, so you would create an index for columns as long as product of their selectivies is low enough (e.g., lo_discount 0.1, lo_quantity 0.05, is 0.005 which is low enough and would produce CREATE INDEX AutoIndex on Lineorder(lo_quantity, lo_discount);).

Attachment:- Assignment File.rar

Reference no: EM131426768

Questions Cloud

Entrepreneurial strategies apply : When we think of entrepreneurship, we often think of small, start-up firms. Describe how a large corporation in an established industry can be "entrepreneurial" and discuss how Peng's entrepreneurial strategies apply in this situation.
What is probability that the dentist will see the patient : Find the probability that the patient will have to wait at least 30 minutes past the appointment time.- Find the probability that the dentist will see the patient between 10 and 20 minutes after the appointment time.
Assess segways chosen distribution channels and methods : Identify and assess Segway's chosen distribution channels and methods. Is it the best choice, or what would you recommend? How would you organize and manage the sales staff at Segway to best reach its target markets?
Understanding and analyzing business communication situation : Create a communication strategy that fosters change and innovation. What am I trying to achieve and how will my audience react to what I am trying to achieve and will my message be resisted?
Create a secondary index : CSC 553: Advanced Database Topics Assignment. This will give you a chance to apply everything you learned in the class. We will use two different databases (Postgres and Oracle are easiest because you have access to them already and you even have t..
Calculating the true gdp deflator : 1. Explain how uncertainty in calculating the true GDP deflator makes it uncertain how much the production of goods and services has increased.
What additional services do my target customers want : Who are my Target Customers? How can I best reach them? What additional services do my Target Customers want? What quality of service of product does my customer desire?
Probability that the next call will occur after given time : If a 911 call is taken at 10:07 p.m., what is the probability that the next call will occur before 10:30 p.m.?- If a 911 call is taken at 11:30 p.m., what is the probability that the next call will occur after 11:45 p.m.?
Bang-for-the-buck effect on the economy : 1. Give 2 reasons why increasing government spending could have a stronger bang-for-the-buck effect on the economy than an equivalent-sized tax cut. (2-3 sentences)

Reviews

len1426768

3/14/2017 5:09:18 AM

In the interest of finishing quickly, we will not run "real" runtimes for the queries and focus on explain costs. Submit a single document containing your project solutions. Be sure that this document contains your name and “CSC 553 Take-home final” at the top. You should provide an answer for each database you chose. That answer can be the same for both databases, but only if you verified that it works in the second database.

Write a Review

Database Management System Questions & Answers

  What is difference between data warehousing and data mining

What is Data Warehousing? How is it different from operational/ production databases? Explain the difference between Data Warehousing and Business Intelligence and the difference between Data Warehousing and Data Mining?

  Document flowchart for the order processing system

document flowchart for the order processing system, and data flow diagram DFD at Level 0 for the order processing system.

  Write a query or queries to print the table description

Write a query or queries to print the table description and the contents of each table, and copy and paste the results to a file called sales. Write a 1- to 2-page paper describing each constraint you created and why it is necessary.

  Generate a database diagram

For each of these statements, include a screenshot of the SQL. Make sure to include the statement execution, including the resulting data. Display all columns and all rows from the Employees table.

  Design an information system for grades, review &management

Design an information system for grades, review and management to be used by faculty, department administration and students.

  Difference between manufacturing and service industries

Discuss whether the ERP software is mostly suitable for manufacturing companies or whether it can be used in service industries also.

  Describe the different lobs that oracle supports

Describe the different LOBs that Oracle supports. What are they used for? How can they be stored in the database

  Converting from sql server database to the oracle database

Assignment: The Stevens Company is converting from the SQL Server database to the Oracle database

  Demonstrate academic and professional literacy

Demonstrate academic and professional literacy by collating theoretical and practical course material into a workable application through understanding concepts and their practical application using .NET.

  What are advantages of storing data in a dbms like access

Some people like to store their information in Excel files. What are the advantages of storing data in a database management system like Access over Excel? Name 3.

  Write a statement of work to present to wild wood management

Wild Wood Apartments owns 20 different apartment complexes in Washington, Oregon, California, and Idaho. Write a statement of work to present to the Wild Wood management

  Design an entity-relationship diagram for a database

Identify clients who regularly make appointments that they do not keep and to provide reports and make ad hoc queries from all the data stored in the database of the hospital registration system - design an Entity-Relationship diagram for a databas..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd