School of Software SUN YAT-SEN UNIVERSITY Mar, 27, 2011.

Slides:



Advertisements
Similar presentations
Microsoft Dynamics® AX 2012
Advertisements

Working with Tables 1 of 5. Working with Tables 2 of 5.
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
Anindya Datta Debra VanderMeer Krithi Ramamritham Presented by –
Data Warehouse Tuning. 7 - Datawarehouse2 Datawarehouse Tuning Aggregate (strategic) targeting: –Aggregates flow up from a wide selection of data, and.
5.1Database System Concepts - 6 th Edition Chapter 5: Advanced SQL Advanced Aggregation Features OLAP.
Set operators (UNION, UNION ALL, MINUS, INTERSECT) [SQL]
Chapter 11 Group Functions
C-Store: Introduction to TPC-H Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY Mar 20, 2009.
Polaris: A System for Query, Analysis and Visualization of Multi-dimensional Relational Databases Presented by Darren Gates for ICS 280.
Lecture Microsoft Access and Relational Database Basics.
Data Cube and OLAP Server
DbFit for FitNesse with Data Warehouse worked examples
Inner join, self join and Outer join Sen Zhang. Joining data together is one of the most significant strengths of a relational database. A join is a query.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
SQL Server Management Studio Introduction
Online Analytical Processing (OLAP) Hweichao Lu CS157B-02 Spring 2007.
SQL Server 2008 Basmah AlQadheeb-213 MIS What is a Database ? A database is a collection of Data that is organized so that it can easily be accessed,
Computer Science 101 Web Access to Databases SQL – Extended Form.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Overview of SQL Server Alka Arora.
DATA WAREHOUSING IN SQL SERVER 2005/2008 BUSINESS INTELLIGENCE.
Rationale Aspiring Database Developers should be able to efficiently query and maintain databases. This module will help students learn the Structured.
IST722 Data Warehousing Business Intelligence Development with SQL Server Analysis Services and Excel 2013 Michael A. Fudge, Jr.
ASP.NET Programming with C# and SQL Server First Edition
Introduction to Structured Query Language (SQL) COM S Fall Instructor: Ying Cai Iowa State University 1.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Python MySQL Database Access
DBSQL 14-1 Copyright © Genetic Computer School 2009 Chapter 14 Microsoft SQL Server.
Chapter 6 SAS ® OLAP Cube Studio. Section 6.1 SAS OLAP Cube Studio Architecture.
TSQL Improvements & Data Types SQL Server 2008 TSQL Improvements & Data Types Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server MVP,
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
CSC 405: Web Application And Engineering II7.1 Database Programming with SQL Aggregation and grouping with GROUP BY Aggregation and grouping with GROUP.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
Reports 5.02 Understand database queries, forms, and reports used in business.
BI Terminologies.
CS1100: Microsoft Access Managing Data in Relational Databases Created By Martin Schedlbauer CS11001Microsoft Access - Introduction.
Navigating SQL Server Lesson 3. Skills Matrix Graphical User Interface (GUI) Management Tools SQL Server Management Studio SQL Server Configuration Manager.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Creating and Populating a MS SQLServer Database Presented By: Dr. Adam P. Anthony.
What is OLAP?.
Module 4: Grouping and Summarizing Data. Overview Listing the TOP n Values Using Aggregate Functions GROUP BY Fundamentals Generating Aggregate Values.
Introduction to MySQL Ullman Chapter 4. Introduction MySQL most popular open-source database application Is commonly used with PHP We will learn basics.
QUERY CONSTRUCTION CS1100: Data, Databases, and Queries CS1100Microsoft Access1.
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
SQL Server Analysis Services Understanding Unified Dimension Model (UDM)
1 Database Systems, 8 th Edition Star Schema Data modeling technique –Maps multidimensional decision support data into relational database Creates.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
Or How I Learned to Love the Cube…. Alexander P. Nykolaiszyn BLOG:
Business Intelligence Environment Integration with Dynamics NAV Rogers Family Company Matthew McGinley Devraj Ghosh Dominic Miller.
1 Copyright © 2008, Oracle. All rights reserved. Repository Basics.
Review DATA VISUALIZATION WITH TABLEAU ONLINE TUTORIAL Training Guide Fundamentals.
Extending and Creating Dynamics AX OLAP Cubes
How to Start SQL Server and SSDT BI in Local
Presented by: Teererai Marange
Pass4itsure Microsoft Dumps
Chapter 5: Advanced SQL Database System concepts,6th Ed.
Database Management  .
Data warehouse Design Using Oracle
Populating a Data Warehouse
Aggregations Various Aggregation Functions GROUP BY HAVING.
Chapter 7 Most important: 7.2
Data Definition Language
Data Definition Language
Topic 12 Lesson 1 – Data and databases
Building Queries using the Principle of Simplest Query (POSQ)
Slides based on those originally by : Parminder Jeet Kaur
Presentation transcript:

School of Software SUN YAT-SEN UNIVERSITY Mar, 27, 2011

The Procedure of Installing SQL Server 2005 Microsoft SQL Server 2005 Express Microsoft SQL Server Management Studio Express Introduction of TPC-H and Generate lineitem.tbl Import Lineitem.tbl into SQL Server Experiment about the Efficiency between Croup By and Group By With Cube

Configuration demands

Install procedure for SQL server 2005 Express

This situation only for installing VS2005 already

Install procedure for SQL server 2005 Express

Connect to SQL Server

The interface of SQL Server

The TPC Benchmark™H (TPC-H) is a decision support benchmark. The components of the TPC-H database are defined to consist of eight separate and individual tables.

Get the tpch_2_14_0 The DBGEN program can be downloaded at the following URL: The schema of LINEITEM can be found at page 12 in the tpch doc, which can be downloaded at the following URL:

Create lineitem.tbl (Linux)

Create a new query

Create database dbTPC

Use graphical interfaces

Create the table use SQL use dbTPC create table lineitem ( orderkey int, partkey int, suppkey int, linenumber int, quantity int, extendedprice decimal, discount decimal, tax decimal, returnflag nchar(1), linestatus nchar(1), shipdate datetime, commitdate datetime, receiptdate datetime, shipinstruct nchar(25), shipmode nchar(10), comment varchar(44) )

Create the table use interface

Step 1 Import file into SQL Server Using Bulk Insert. BULK INSERT Tablename FROM 'D: \lineitem.tbl' WITH ( FIELDTERMINATOR = '|', ROWTERMINATOR = '|\r' )

When GROUP BY and Aggregate Functions are used together, the practical meaning is significant. The Aggregate Functions generate a value for each group when used together with GROUP BY, other than for the whole table.

Example : Display the how many lineitems are at each returning status. SQL: SELECT returnflag, COUNT(*) FROM lineitem GROUP BY returnflag

Example : Display the quantity of lineitems which come from the same order and at the same returning status. order and they. SQL: SELECT returnflag, orderkey, SUM(quantity) FROM lineitem GROUP BY returnflag, orderkey

The CUBE operator generates a result set that is a multidimensional cube. A multidimensional cube is an expansion of fact data, The expansion is based on columns that the user wants to analyze The cube is a result set that contains all the possible combinations of the dimensions.

SELECT Item, Color, SUM(Quantity) AS QtySum FROM Inventory GROUP BY Item, Color WITH CUBE

SELECT Item, Color, SUM(Quantity) AS QtySum FROM Inventory GROUP BY Item, Color WITH CUBE

These four rows report the the original sum, in another words this time we get four groups with their sum value. SELECT Item, Color, SUM(Quantity) AS QtySum FROM Inventory GROUP BY Item,Color

These two rows report the subtotals for the Item dimension. both have null in the Color dimension to show that aggregate date came from rows having any value for the Color dimension. SELECT Item, SUM(Quantity) AS QtySum FROM Inventory GROUP BY Item

These two rows report the subtotals for the Color dimension. both have null in the Item dimension to show that aggregate date came from rows having any value for the item dimension. SELECT Color, SUM(Quantity) AS QtySum FROM Inventory GROUP BY Color

This row reports the grand total for the cube. All values of both dimensions are summarized in the row. SELECT SUM(Quantity) AS QtySum FROM Inventory Then we can extend this situation to n dimensions. 2 n different combinations of the dimensions should be considered.

Analysis the column orderkey, partkey, suppkey, linenumber of Table LineItem using WITH CUBE.

Using 16 GROUP BY clauses simulate the result set of GROUP BY WITH CUBE.

GROUP BYmillisecond No grouping(1)16 Group with 4 column(1)orderkey, partkey, suppkey, linenumber31 Group with 3 column(4)orderkey, partkey, suppkey31 orderkey, partkey,linenumber16 orderkey, suppkey, linenumber31 partkey, suppkey, linenumber16 Group with 2 column(6)orderkey, partkey16 orderkey, linenumber15 orderkey, suppkey16 suppkey, linenumber15 partkey, suppkey15 partkey, linenumber15 Group with 1 column(4)orderkey16 partkey16 suppkey31 linenumber16 Total302 GROUP BY WITH CUBEorderkey,partkey,suppkey,linenumber140

A.Use the DBGEN program of the TPC-H Benchmark to generate all the eight tables of the TPC-H schema, with the Scale Factor set to 1. B. Create a database with eight tables including possible constrains(You can refer to tpch doc), and then import the generated data. Submit all the nine queries and the time cost for importing data.

THANK YOU!