Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Big Data Management Assignment -

Scope

This assignment includes the tasks related to conceptual, logical, and physical data warehouse design, implementation of multidimensional data model, implementation of query processing.

Tasks - Need Task 4 and 5 only.

Task 4 -

Connect to sample TPC-H benchmark database as TPCHR user. A conceptual schema of the database is included in a file tpchr.pdf available in TPCHR folder.

(1) Implement the following queries using GROUP BY clause with CUBE operator.

(a) Find the total supply costs (PS_SUPPLYCOST) per part name (P_NAME), per brand (P_BRAND), per part name and brand, and the total supply costs only for the parts with the keys 4576, 4577, 4578, 4579.

(b) Find the total number of customers per nation (N_NAME) per region (R_NAME), per nation and region and the total number of customers for the customer keys 4576, 4577, 4578, 4579.

(2) Implement the following queries using GROUP BY clause with ROLLUP operator.

(a) Find the total price of orders (O_TOTALPRICE) per year (O_ORDERDATE), per year and month (O_ORDERDATE), and total price for the orders with the keys 39044,39045,39046,39047.

(b) Find the average retail price (P_RETAILPRICE) per part name (P_NAME), per part name and brand (P_BRAND), per part name, brand, and type (P_TYPE) and the average price for all parts with the keys 4576, 4577, 4578, 4579.

(3) Implement the following queries using GROUP BY clause with GROUPING SETS operator.

(a) Find the total number of orders per year (O_ORDERDATE), per brand (P_BRAND), per order status and order clerk (O_ORDERSTATUS, O_CLERK), per customer name (C_NAME) and the total number of orders only for the customers with the keys 4576, 4577, 4578, 4579.

(b) Find the total quantity of items (L_QUANTITY) per order year (O_ORDERDATE), and per tax and discount (L_TAX, L_DISCOUNT) for the orders with the keys 39044,39045,39046,39047.

When ready, save your SELECT statements in SQL script solution4.sql. Then, process a SQL script solution4.sql and save the results in a report solution4.lst. It is explained in Cookbook, Recipe 2.4, Step 9 "How to create and to save a report ?" how to save a report from processing of SQL script in a text file.

Note, that all SQL statements processed must be included in the report. To achieve that put the following SQL*Plus commands at the beginning of your SQL script solution4.sql:

SET ECHO ON

SET FEEDBACK ON

SET LINESIZE 100

SET PAGESIZE 200

Deliverables

Submit a file solution4.lst with a report from processing of SQL script solution4.sql. The report must have no errors and the report must list all SQL statements processed. Make absolutely sure before submission, that a file solution4.lst contains the correct contents.

Task 5 -

Connect to sample TPC-H benchmark database as TPCHR user. A conceptual schema of the database is included in a file tpchr.pdf available in TPCHR folder. Implement the queries listed below as SELECT statements over TPC-HR benchmark database.

(1) Find total available quantities (PS_AVAILQTY) summarized for all suppliers located in ETHIOPIA and summarized by supplier key and supplier name, and supplier country (PS_SUPPKEY, S_NAME, C_NAME).

(2) Find total supply costs (PS_SUPPLYCOST) summarized at nation level for suppliers located in EUROPE or in ASIA and separately summarized at region level for suppliers located in EUROPE or in ASIA. List a nation name (N_NAME), region name (R_NAME), and total supply costs (PS_SUPPLYCOST).

(3) Find an average part retail price (P_RETAILPRICE) for each nation (N_NAME) of suppliers and separately for each region (R_NAME) of suppliers.

(4) Find the total value of orders (O_TOTALPRICE) submitted in a period of time between 1 January 1991 and 31 December 1999 and summarized by year (O_ORDERDATE) and by year and month number (O_ORDERDATE) and the total value of all orders. The results should be sorted in ascending order by year and for the same year in descending order by month number.

(5) Find the total values of orders (O_TOTALPRICE) summarized by the regions (R_NAME). If no orders have been submitted from a region then its name must be listed with 0 (zero).

For each one of the queries listed above find one or more indexes that significantly improve performance of each query.

To estimate performance of query processing before and after indexing use EXPLAIN PLAN statement to display the query processing plans and the cost estimations. It is explained in Cookbook, Recipe 8.1, Step 3 " How to find an execution plan of SQL statement ?" how to use EXPLAIN PLAN statement and how to list a query processing plan together with the estimations of the total number of bytes read and estimated query processing time.

For each query a testing procedure is the following.

(1) Take implementation of query (1) and execute EXPLAIN PLAN statement to find a query processing plan for query (1), estimations of the total number of bytes read and estimated query processing time.

(2) Use CREATE INDEX statement to create the indexes that suppose to speed up processing of query (1). You can implement as many indexes you like. However, please remember, that it supposed to be the smallest collection of indexes that speed up the processing of the query in the best way.

(3) Take implementation of query (1) and execute EXPLAIN PLAN statement to find a query processing plan for query (1), estimations of the total number of bytes read and estimated query processing time after the indexes have been created. Note, that ALL indexes created by you must be used for processing of the query.

(4) Drop the indexes created in Step 2.

Repeat the Steps 1, 2, 3, and 4 for the implementations of all 5 queries listed above. The indexes must be created independently for each query.

Save all SQL statements that estimate performance of queries listed above without and with the indexes (Steps 1, 2, 3, and 4 above repeated for all queries) in a file solution5.sql. When ready execute a script file solution5.sql and save a report from the execution in a file solution5.lst. It is explained in Cookbook, Recipe 2.4, Step 9 "How to create and to save a report ?" how to save a report from processing of SQL script in a text file.

Note, that all SQL statements processed must be included in the report. To achieve that put the following SQL*Plus commands at the beginning of your SQL script solution5.sql:

Deliverables

Submit a file solution5.lst with a report from processing of SQL script solution5.sql. The report must have no errors and the report must list all SQL statements processed. Make absolutely sure before submission, that a file solution5.lst contains the correct contents.

Assignment Files -

https://www.dropbox.com/s/6z9vhonc2j6biqr/Assignment%20Files.rar?dl=0

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92421944

Have any Question?


Related Questions in DBMS

The system development team at the xyz company is working

The system development team at the XYZ Company is working on developing a new customer order entry system. In the process of designing the new system, the team has identified the following data entity attributes: Invento ...

Need an expert in the fields of system design to handle

Need an expert in the fields of system design to handle this project This is a system analysis and design project, not a research project. Refer to the list of deliverables in the instructions in the assignment to make s ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Sqlquery 1 how many products have standard price less than

SQL Query 1. How many products have standard price less than 1000? Query 2: Display all attributes for products made of "Cherry" from Product table w/o referring to column names. Query 3: Display all product names having ...

Database design amp development assignment -assignment

Database Design & Development Assignment - Assignment title - Design and Implement a Relational Database for a local Print and Ink Refill Business. Learning Outcome - Use an appropriate design tool to design a relational ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Question create an erd for the following scenarioa small

Question: Create an ERD for the following scenario. A small company ABC wants a database to keep track of internal company information. Â Given the following information create an ERD. The ABC Company has several departm ...

Project outline and requirements provide a brief

Project Outline and Requirements Provide a brief description of the organization (can be hypothetical) that will be used as the basis for the projects in the course. Include company size, location(s), and other pertinent ...

A schools office of the registrar maintains data about the

A School's office of the registrar maintains data about the following entities: a) courses (including course number, title, credits, syllabus and prerequisites), b) course offerings (including course number, year, semest ...

The case study company received a detailed report from the

The case study company received a detailed report from the ECM consultant with a detailed list of data requirements, tools, and processes that are currently used to manage this data. The chief executive officer (CEO) and ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As