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

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

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 ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

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 ...

  • 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