One-to-One relationship - In this scenario both sides of the relationship have - unique values for every row.

Size: px
Start display at page:

Download "One-to-One relationship - In this scenario both sides of the relationship have - unique values for every row."

Transcription

1 MANY-TO-MANY RELATIONSHIPS Many-to-Many relationships exist when the value in each field used to create a relationship between tables is contained multiple times in each table. For example a hotel may have a table with reservation data and a table with payments data. In both tables the name of the guest is stored. A guest can have multiple reservations under their name as well as multiple payments for their stay recorded in their name. If a relationship between the reservation and payments table was created based on the guests name a many-to-many relationship would be created, as the guests name appears multiple times in each table. In general when a field from two or more tables contains the same value, and these values are duplicated in both tables a connection created based on this field will result in a manyto-many relationship. The problem with this kind of relationship is that it can create complex data sets which do not return the correct results or use excessive computing resources and do not return any results. Another clear symptom one could recognize for this situation would be that the Elasticube's ecdata file will inflate to volumes much larger than expected. There are several methods to resolve and bypass a many-to-many relationship; the solution depends on the business model and the logic of the business questions at hand. The following solutions differ by business logic and the schema at hand, each solution can be applied to each schema respectively. Below the following factors are examined: Testing for a many-to-many relationship.1 Understanding which scenario best fits your current schema According to the schema logic, apply the respective solution.2.3 There can be 3 types of relationships: One-to-One relationship - In this scenario both sides of the relationship have - unique values for every row. - In this scenario one side of the relationship will hold One-to-Many relationship unique values for every row, but the other side of the relationship will hold duplicate values for any or all of the corresponding values in the first table. Many-to-Many relationship - In this scenario, both sides of the relationship will hold duplicated values, causing excessive calculations for every query run against it. Testing if a relationship is a Many-to-Many - - We can easily determine if a relationship is Many-to-Many. In order to do so, we'll need to check the cardinality of the relationship. We'll need to determine the number of unique and duplicate values on each side of the relationship. If we get the same value for both the unique and duplicate values, then there are no duplications, and this will either be a One-to- Many or a One-to-One relationship. If the number of duplicate values are larger than the

2 number of unique values, then this side of the relationship has duplicated values, and we'll need to investigate the other side of the relationship. If the other side of the relationship yields unique values, this is a one-to-many relationship. If not, we've got a many-to-many relationship on our hands. It is important to identify and manage Many-to-Many (M2M) relationships as they can either cause queries to respond extremely slowly or even return incorrect results. Many-to-Many relationships occur when two tables are joined on a field containing duplicate values in both tables. For example the same guest may have multiple reservations and multiple payments at a hotel, thus joining on the guest between the reservation and payment table would result in a M2M relationship. We have written a simple SQL statement you can use to check for potential M2M relationships. Steps: 1. Open up the ecube file containing the schema of the ElastiCube 2. Click Add Data> Custom SQL Expression 3. Enter and adjust the SQL statement below. See the image below for the necessary changes. SELECT [Do I have duplications?] FROM ( SELECT distinct_count(t1.col1)<>count(t1.col1) AS [Do I have duplications?] FROM [Table1] t1 UNION all SELECT distinct_count(t2.col2)<>count(t2.col2) FROM [Table2] t2) AS temp GROUP BY [Do I have duplications?] 4. In the top right of the expression editor window click the 'Parse SQL Expression' button.if the expression parses successfully click the 'Preview result table' button in the top right.

3 5. If the result returned is 'True' in both lines a many-to-many relationship exists and will need to be considered in the ElastiCube design. Image 1: Many-to-Many relationship prior to resolution If the two values are equal, all guest ids appear only once, making all values unique. We can stop investigating at this stage, given that even if the other side of the relationship has duplicate values for guest id, we'll still be dealing with a One-To-Many relationship, where the unique values are the reservations side, and the duplicate values are on the Payments side. For more on One-to-Many relationships. If there are more than two tables connected to this relationship, that is, if there are more than two tables merged on the same field, we'll have a few more options. The solution for the single many-to-many relationship will be a sub-problem of this scenario. In this case, we'll need to run the test on every table to see the uniqueness or duplication of the merged fields. Possible Resolutions for 2 tables, one relationship: The direct solution for such a problem would be to break this relationship into two.1

4 separate one-to-many relationships, as seen in image 2. The logic behind testing this issue can be visualized in the decision tree below. Create a custom SQL expression in the Elasticube. In the expression of this table.a select all the individual values for the identifier column from both sides, the expression should look like this: SELECT * FROM (SELECT DISTINCT r.guestid, r.guestname FROM [Reservations] r UNION SELECT DISTINCT p.guestid, p.guestname FROM [Payments] p) AS G This query will take all Guest Id values from both tables, and using the UNION statement, will bring in only the unique values from both tables, making this a complete list of all distinct Guest Id values. We can now merge the Guest Id field from the new 'linking' table to the other two Guest Id fields from the other two tables, thus creating two One-To-Many relationships. We can now use this Guest Id field as the rows or axes elements of a widget, pulling the unique values from the new Guest Dimension, with measures from the two other tables..b Image 2: Two O-to-M relationships Create Aggregated Table.2 In situations where we have more than one fact table (A Fact table is a primary table containing the measures or fields used for calculations in the dashboard) in our Elasticube, there are several situations when an aggregated table can resolve a many-tomany relationship.

5 Image 3: Two Fact tables Assuming we'd like to segment our data according to a few different dimensions, creating relationships directly between these fields can and will create many-to-many relationships in one of two ways, according to the schema: Both tables don't hold unique values, and all values from one table are held 2.1 in the second table. In this scenario either a linked dimension (as described in solution 1) or an aggregated table can be created which will hold all the unique values and the desired calculations for one of the tables. In order to create an aggregative table, one can create a custom SQL expression and aggregate values from the table which holds all values; its' own, and the subset present in the other table with the following expression: SELECT i.orderdatekey, i.productkey, sum(i.discountamount), sum(i.salesamount), avg(i.unitpricediscountpct) FROM [FactInternetSales] i GROUP BY i.orderdatekey, i.productkey This custom SQL expression will select the distinct OrderDateKeys and their corresponding ProductKeys from the FactInternetSales, grouped by these fields, together with single value aggregations for the different fields, in this case, Discount Amount, Sales Amount and the average unit Price discount. After merging the OrderDateKey and Product Key to the two other tables, one will be able to pull the values from this new table into the rows or axes panel of a widget in the BiStudio with measures and additional aggregations

6 from the two other tables. *Note the non-aggregated table needs to be a subset in terms of the primary fields from the aggregated table. Both tables don't hold unique values, and there are different values for 2.2 several fields in both the tables. Resolving this scenario would incorporate both solutions from notes 2.1 and 1. In this scenario one should create an aggregated table as stated in 2.1, and a dimension table as stated in 1. The final resolution should look like this: Image 4: Two Fact tables with a date dimension table and an aggregative Products table Possible resolutions for more than 2 tables, more than 1 relationship: Using the Lookup Function.3 In most scenarios we'll aggregate values according to a given id, from the unique side of the relationship to the duplicate side. However in specific cases it'll be vice versa.

7 For example in the following scenario, in which we have 3 tables, and between them two one-to-many relationships, this can potentially create a many-to-many relationship, if we were to query the two leaf tables. This means that the query result table will have multiple rows which won't be distinguishable one from another. Image 5: Two consecutive M-to-M relationships Using the Lookup Function, one can import values from a remote table by matching values in a different column. This will create a new column in the table we'd like to perform an aggregation of a given field(s), with the matching value of the identifying field from the other table. Taking the following example of tables T1, T2 and T3, we'd like to run a query which will display aggregations from the duplicate id's from T1, with a measure from T3. If we would run the query as is, we'd get multiple values for the query's result set, and we won't be able to run this aggregation. In order to resolve this, we'll use the Lookup function in order to import the values from T3 into T2 and then rerun the query only on tables T1 and T2. Using the lookup function, available in the 'Miscellaneous Functions' in the custom SQL editor, we can import the values of 'M3' from the 'T3' table into the 'T2' table. Create a new custom column, and use the Lookup function to import the values of attribute, In this case, the Lookup function should look like this: Lookup([T3],[T3].[M3], [T2].id2,[T3].id2) Running this statement in table T2 will import the matching values of M3 from T3 according to the matching results in id2 between the two tables. **LOOKUP(remote_table,remote_result_column,current_match_column, remote_match_column) Matches the current value with another value from a remote table. The result will be the value in remote_result_column for which the corresponding remote_match_column equals the current_match_column. Image 6: Two consecutive M-to-O relationships after Lookup fix Concatenate the two tables into one:.4 Assuming we have 2 separate tables with duplicate id values in each, and each holding different columns for each id, we can create a new table which will hold all values for every id, and pull the aggregations from this new table.

8 Notice that the two original tables; Table_1, Table_2 have different columns. Image 7: Concatenating tables Using the following SQL statement, we can import the data from both tables, with the id's and the columns respectively: SELECT s.id AS id, s.m1, s.m2, ToInt( NULL ) m3, ToInt( NULL ) m4 FROM [Table 1] s UNION SELECT t.id, ToInt( NULL ), ToInt( NULL ), t.m3, t.m4 FROM [Table 2] t This will create a table with 5 columns: Id.1 M1 (from table_1).2 M2 (from table_1).3 M3 (from table_2).4 M4 (from table_2).5 The values missing from each table respectively will be NULL's which will result in the following table: -

9 Image 8: Concatenated table; result set

10 Image 9: Determining a Many-to-Many relationship; decision tree. This is based on the first example with the Payments and Reservations tables. One-to-Many Relationships In most scenarios we'll aggregate values according to a given id, from the unique side of the relationship to the duplicate side. A One-to-Many relationship occurs when one side has individual, unique values for all records on the id field, while the other side holds duplicate values for the identifying field. For instance, in the following scenario a relationship exists between the 'Categories' table and the 'Products' table. The CategoryID is a unique identifier for the different categories in this table, and each record will hold additional information for each category, i.e. CategoryName, Description, Picture and so on. We'll distinguish between the different categories by their ID. On the other side of the relationship, in our Products table, we'd like to know which category each product belongs to, i.e. juice, milk and beer will belong to the beverages category while bananas, kiwi and, mango will belong to the fruits category. In addition to the unique Product id for each product In the Products table we'll hold the CategoryID. This will create multiple values for the CategoryID in the Products table because many products can belong to the same category. This means that the CategoryID in the Products table will not be unique, making this relationship a One-to-Many. Placing the CategoryID in the rows or series element of a widget and a measure from the Products table, we'll be able to aggregate values from the products table, with the unique CategoryID's from the Category table. In the following scenario, a possible aggregation would be to count the

11 number of Products in each Category, or to sum the QuantityPerUnit for each Category. Image 8: One-to-Many Relationship

Temporal Data Warehouses: Logical Models and Querying

Temporal Data Warehouses: Logical Models and Querying Temporal Data Warehouses: Logical Models and Querying Waqas Ahmed, Esteban Zimányi, Robert Wrembel waqas.ahmed@ulb.ac.be Université Libre de Bruxelles Poznan University of Technology April 2, 2015 ITBI

More information

QMF: Query Management Facility

QMF: Query Management Facility A A Report - Figure 7... 1:26 ADD Sessions - Ending a Table Editor... 5:5 Adding Rows to a Table... 5:1 Adding Comments to an SQL Query... 3:5 ALIGN... 4:16 Arithmetic in Queries... 3:17 Available Tables

More information

Querying Data with Transact SQL

Querying Data with Transact SQL Course 20761A: Querying Data with Transact SQL Course details Course Outline Module 1: Introduction to Microsoft SQL Server 2016 This module introduces SQL Server, the versions of SQL Server, including

More information

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations Chapter 3B Objectives Relational Set Operators Learn About relational database operators SELECT & DIFFERENCE PROJECT & JOIN UNION PRODUCT INTERSECT DIVIDE The Database Meta Objects the data dictionary

More information

Database Management Systems,

Database Management Systems, Database Management Systems SQL Query Language (3) 1 Topics Aggregate Functions in Queries count sum max min avg Group by queries Set Operations in SQL Queries Views 2 Aggregate Functions Tables are collections

More information

INTERMEDIATE SQL GOING BEYOND THE SELECT. Created by Brian Duffey

INTERMEDIATE SQL GOING BEYOND THE SELECT. Created by Brian Duffey INTERMEDIATE SQL GOING BEYOND THE SELECT Created by Brian Duffey WHO I AM Brian Duffey 3 years consultant at michaels, ross, and cole 9+ years SQL user What have I used SQL for? ROADMAP Introduction 1.

More information

1. Attempt any two of the following: 10 a. State and justify the characteristics of a Data Warehouse with suitable examples.

1. Attempt any two of the following: 10 a. State and justify the characteristics of a Data Warehouse with suitable examples. Instructions to the Examiners: 1. May the Examiners not look for exact words from the text book in the Answers. 2. May any valid example be accepted - example may or may not be from the text book 1. Attempt

More information

Workbooks (File) and Worksheet Handling

Workbooks (File) and Worksheet Handling Workbooks (File) and Worksheet Handling Excel Limitation Excel shortcut use and benefits Excel setting and custom list creation Excel Template and File location system Advanced Paste Special Calculation

More information

Chapter 12: Query Processing

Chapter 12: Query Processing Chapter 12: Query Processing Overview Catalog Information for Cost Estimation $ Measures of Query Cost Selection Operation Sorting Join Operation Other Operations Evaluation of Expressions Transformation

More information

Query Processing & Optimization

Query Processing & Optimization Query Processing & Optimization 1 Roadmap of This Lecture Overview of query processing Measures of Query Cost Selection Operation Sorting Join Operation Other Operations Evaluation of Expressions Introduction

More information

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe

Introduction to Query Processing and Query Optimization Techniques. Copyright 2011 Ramez Elmasri and Shamkant Navathe Introduction to Query Processing and Query Optimization Techniques Outline Translating SQL Queries into Relational Algebra Algorithms for External Sorting Algorithms for SELECT and JOIN Operations Algorithms

More information

Welcome to the topic of SAP HANA modeling views.

Welcome to the topic of SAP HANA modeling views. Welcome to the topic of SAP HANA modeling views. 1 At the end of this topic, you will be able to describe the three types of SAP HANA modeling views and use the SAP HANA Studio to work with views in the

More information

Relational Database: The Relational Data Model; Operations on Database Relations

Relational Database: The Relational Data Model; Operations on Database Relations Relational Database: The Relational Data Model; Operations on Database Relations Greg Plaxton Theory in Programming Practice, Spring 2005 Department of Computer Science University of Texas at Austin Overview

More information

Microsoft Power Tools for Data Analysis #7 Power Query 6 Types of Merges/ Joins 9 Examples Notes from Video:

Microsoft Power Tools for Data Analysis #7 Power Query 6 Types of Merges/ Joins 9 Examples Notes from Video: Table of Contents: Microsoft Power Tools for Data Analysis #7 Power Query 6 Types of Merges/ Joins 9 Examples Notes from Video: 1. Power Query Has Six Types of Merges / Joins... 2 2. What is a Merge /

More information

Basics of Dimensional Modeling

Basics of Dimensional Modeling Basics of Dimensional Modeling Data warehouse and OLAP tools are based on a dimensional data model. A dimensional model is based on dimensions, facts, cubes, and schemas such as star and snowflake. Dimension

More information

Chapter 4. The Relational Model

Chapter 4. The Relational Model Chapter 4 The Relational Model Chapter 4 - Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations and relations in the relational model.

More information

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques 376a. Database Design Dept. of Computer Science Vassar College http://www.cs.vassar.edu/~cs376 Class 16 Query optimization What happens Database is given a query Query is scanned - scanner creates a list

More information

Normalization in DBMS

Normalization in DBMS Unit 4: Normalization 4.1. Need of Normalization (Consequences of Bad Design-Insert, Update & Delete Anomalies) 4.2. Normalization 4.2.1. First Normal Form 4.2.2. Second Normal Form 4.2.3. Third Normal

More information

Applying Best Practices, QA, and Tips and Tricks to Our Reports

Applying Best Practices, QA, and Tips and Tricks to Our Reports Applying Best Practices, QA, and Tips and Tricks to Our Reports If we had to summarize all we have learned so far, put it into a nutshell, and squeeze in just the very best of everything, this is how that

More information

Concepts of Database Management Eighth Edition. Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra

Concepts of Database Management Eighth Edition. Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra Concepts of Database Management Eighth Edition Chapter 2 The Relational Model 1: Introduction, QBE, and Relational Algebra Relational Databases A relational database is a collection of tables Each entity

More information

Chapter 3: Introduction to SQL. Chapter 3: Introduction to SQL

Chapter 3: Introduction to SQL. Chapter 3: Introduction to SQL Chapter 3: Introduction to SQL Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 3: Introduction to SQL Overview of The SQL Query Language Data Definition Basic Query

More information

SIT772 Database and Information Retrieval WEEK 6. RELATIONAL ALGEBRAS. The foundation of good database design

SIT772 Database and Information Retrieval WEEK 6. RELATIONAL ALGEBRAS. The foundation of good database design SIT772 Database and Information Retrieval WEEK 6. RELATIONAL ALGEBRAS The foundation of good database design Outline 1. Relational Algebra 2. Join 3. Updating/ Copy Table or Parts of Rows 4. Views (Virtual

More information

T-SQL Training: T-SQL for SQL Server for Developers

T-SQL Training: T-SQL for SQL Server for Developers Duration: 3 days T-SQL Training Overview T-SQL for SQL Server for Developers training teaches developers all the Transact-SQL skills they need to develop queries and views, and manipulate data in a SQL

More information

Database System Concepts

Database System Concepts Chapter 13: Query Processing s Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2008/2009 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth

More information

Statistics. Duplicate Elimination

Statistics. Duplicate Elimination Query Execution 1. Parse query into a relational algebra expression tree. 2. Optimize relational algebra expression tree and select implementations for the relational algebra operators. (This step involves

More information

COGNOS (R) 8 GUIDELINES FOR MODELING METADATA FRAMEWORK MANAGER. Cognos(R) 8 Business Intelligence Readme Guidelines for Modeling Metadata

COGNOS (R) 8 GUIDELINES FOR MODELING METADATA FRAMEWORK MANAGER. Cognos(R) 8 Business Intelligence Readme Guidelines for Modeling Metadata COGNOS (R) 8 FRAMEWORK MANAGER GUIDELINES FOR MODELING METADATA Cognos(R) 8 Business Intelligence Readme Guidelines for Modeling Metadata GUIDELINES FOR MODELING METADATA THE NEXT LEVEL OF PERFORMANCE

More information

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language

Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations. SQL: Structured Query Language Implementing Table Operations Using Structured Query Language (SQL) Using Multiple Operations Show Only certain columns and rows from the join of Table A with Table B The implementation of table operations

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Course 20761A: Querying Data with Transact-SQL Page 1 of 5 Querying Data with Transact-SQL Course 20761A: 2 days; Instructor-Led Introduction The main purpose of this 2 day instructor led course is to

More information

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity

Relational Model History. COSC 416 NoSQL Databases. Relational Model (Review) Relation Example. Relational Model Definitions. Relational Integrity COSC 416 NoSQL Databases Relational Model (Review) Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Relational Model History The relational model was proposed by E. F. Codd

More information

THE RELATIONAL DATABASE MODEL

THE RELATIONAL DATABASE MODEL THE RELATIONAL DATABASE MODEL Introduction to relational DB Basic Objects of relational model Properties of relation Representation of ER model to relation Keys Relational Integrity Rules Functional Dependencies

More information

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:

Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the

More information

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761)

Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Querying Data with Transact SQL Microsoft Official Curriculum (MOC 20761) Course Length: 3 days Course Delivery: Traditional Classroom Online Live MOC on Demand Course Overview The main purpose of this

More information

Release Summary Notes Maestro Version

Release Summary Notes Maestro Version Incident # Type Description Version Module 55135 SW AR Statements Skipping Folios 5.1.103 AR If a folio in A/R is settled the folio is closed automatically. Should the folio then be re-opened, to reverse

More information

Microsoft Power Tools for Data Analysis #10 Power BI M Code: Helper Table to Calculate MAT By Month & Product. Notes from Video:

Microsoft Power Tools for Data Analysis #10 Power BI M Code: Helper Table to Calculate MAT By Month & Product. Notes from Video: Microsoft Power Tools for Data Analysis #10 Power BI M Code: Helper Table to Calculate MAT By Month & Product Table of Contents: Notes from Video: 1. Intermediate Fact Table / Helper Table:... 1 2. Goal

More information

Advanced Database Systems

Advanced Database Systems Lecture IV Query Processing Kyumars Sheykh Esmaili Basic Steps in Query Processing 2 Query Optimization Many equivalent execution plans Choosing the best one Based on Heuristics, Cost Will be discussed

More information

Relational Algebra and SQL. Basic Operations Algebra of Bags

Relational Algebra and SQL. Basic Operations Algebra of Bags Relational Algebra and SQL Basic Operations Algebra of Bags 1 What is an Algebra Mathematical system consisting of: Operands --- variables or values from which new values can be constructed. Operators

More information

E2 Shop System Beta Release Notes

E2 Shop System Beta Release Notes The purpose of this document is to provide licensed users of the E2 Shop System with the most up to date information regarding changes made in this release. If you have any questions about this update,

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database

More information

20761 Querying Data with Transact SQL

20761 Querying Data with Transact SQL Course Overview The main purpose of this course is to give students a good understanding of the Transact-SQL language which is used by all SQL Server-related disciplines; namely, Database Administration,

More information

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set:

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set: Data Analysis & Business Intelligence Made Easy with Excel Power Tools Excel Data Analysis Basics = E-DAB Notes for Video: E-DAB 07: Excel Data Analysis & BI Basics: Data Modeling: Excel Formulas, Power

More information

Module 1.Introduction to Business Objects. Vasundhara Sector 14-A, Plot No , Near Vaishali Metro Station,Ghaziabad

Module 1.Introduction to Business Objects. Vasundhara Sector 14-A, Plot No , Near Vaishali Metro Station,Ghaziabad Module 1.Introduction to Business Objects New features in SAP BO BI 4.0. Data Warehousing Architecture. Business Objects Architecture. SAP BO Data Modelling SAP BO ER Modelling SAP BO Dimensional Modelling

More information

Algorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1)

Algorithms for Query Processing and Optimization. 0. Introduction to Query Processing (1) Chapter 19 Algorithms for Query Processing and Optimization 0. Introduction to Query Processing (1) Query optimization: The process of choosing a suitable execution strategy for processing a query. Two

More information

Course Details Duration: 3 days Starting time: 9.00 am Finishing time: 4.30 pm Lunch and refreshments are provided.

Course Details Duration: 3 days Starting time: 9.00 am Finishing time: 4.30 pm Lunch and refreshments are provided. Database Administration with PostgreSQL Introduction This is a 3 day intensive course in skills and methods for PostgreSQL. Course Details Duration: 3 days Starting time: 9.00 am Finishing time: 4.30 pm

More information

Midterm Examination CS 265 Spring 2015 Name: KEY Total on any question cannot exceed 5 and cannot be less than 0 JPK, CK, JDK

Midterm Examination CS 265 Spring 2015 Name: KEY Total on any question cannot exceed 5 and cannot be less than 0 JPK, CK, JDK Midterm Examination CS 265 Spring 2015 Name: KEY Total on any question cannot exceed 5 and cannot be less than 0 I will not use notes, other exams, or any source other than my own brain on this exam: (please

More information

HKTA TANG HIN MEMORIAL SECONDARY SCHOOL SECONDARY 3 COMPUTER LITERACY. Name: ( ) Class: Date: Databases and Microsoft Access

HKTA TANG HIN MEMORIAL SECONDARY SCHOOL SECONDARY 3 COMPUTER LITERACY. Name: ( ) Class: Date: Databases and Microsoft Access Databases and Microsoft Access Introduction to Databases A well-designed database enables huge data storage and efficient data retrieval. Term Database Table Record Field Primary key Index Meaning A organized

More information

SQL and Incomp?ete Data

SQL and Incomp?ete Data SQL and Incomp?ete Data A not so happy marriage Dr Paolo Guagliardo Applied Databases, Guest Lecture 31 March 2016 SQL is efficient, correct and reliable 1 / 25 SQL is efficient, correct and reliable...

More information

Analytics: Server Architect (Siebel 7.7)

Analytics: Server Architect (Siebel 7.7) Analytics: Server Architect (Siebel 7.7) Student Guide June 2005 Part # 10PO2-ASAS-07710 D44608GC10 Edition 1.0 D44917 Copyright 2005, 2006, Oracle. All rights reserved. Disclaimer This document contains

More information

Relational Model, Relational Algebra, and SQL

Relational Model, Relational Algebra, and SQL Relational Model, Relational Algebra, and SQL August 29, 2007 1 Relational Model Data model. constraints. Set of conceptual tools for describing of data, data semantics, data relationships, and data integrity

More information

Chapter 12: Query Processing

Chapter 12: Query Processing Chapter 12: Query Processing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Overview Chapter 12: Query Processing Measures of Query Cost Selection Operation Sorting Join

More information

SQL Server 2016 gives 40% improved performance over SQL Server 2014

SQL Server 2016 gives 40% improved performance over SQL Server 2014 Overview World Record Breaking Performance (TPC-H) SQL Server 06 gives 40% improved performance over SQL Server 04 SSAS 06 Query Exec Multi-Dimensional (MOLAP) Tabular (VertiPaq) Query Exec ETL SSAS 06

More information

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure

Introduction to Relational Databases. Introduction to Relational Databases cont: Introduction to Relational Databases cont: Relational Data structure Databases databases Terminology of relational model Properties of database relations. Relational Keys. Meaning of entity integrity and referential integrity. Purpose and advantages of views. The relational

More information

CMP-3440 Database Systems

CMP-3440 Database Systems CMP-3440 Database Systems Relational DB Languages Relational Algebra, Calculus, SQL Lecture 05 zain 1 Introduction Relational algebra & relational calculus are formal languages associated with the relational

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL Course: 20761 Course Details Audience(s): IT Professional(s) Technology: Microsoft SQL Server 2016 Duration: 24 HRs. ABOUT THIS COURSE This course is designed to introduce

More information

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases

Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Microsoft Office Access 2007: Intermediate Course 01 Relational Databases Slide 1 Relational Databases Course objectives Normalize tables Set relationships between tables Implement referential integrity

More information

Database Usage (and Construction)

Database Usage (and Construction) Lecture 7 Database Usage (and Construction) More SQL Queries and Relational Algebra Previously Capacity per campus? name capacity campus HB2 186 Johanneberg HC1 105 Johanneberg HC2 115 Johanneberg Jupiter44

More information

Announcements. Outline UNIQUE. (Inner) joins. (Inner) Joins. Database Systems CSE 414. WQ1 is posted to gradebook double check scores

Announcements. Outline UNIQUE. (Inner) joins. (Inner) Joins. Database Systems CSE 414. WQ1 is posted to gradebook double check scores Announcements Database Systems CSE 414 Lectures 4: Joins & Aggregation (Ch. 6.1-6.4) WQ1 is posted to gradebook double check scores WQ2 is out due next Sunday HW1 is due Tuesday (tomorrow), 11pm HW2 is

More information

Oracle BI 11g R1: Build Repositories

Oracle BI 11g R1: Build Repositories Oracle University Contact Us: 02 6968000 Oracle BI 11g R1: Build Repositories Duration: 5 Days What you will learn This course provides step-by-step procedures for building and verifying the three layers

More information

Corticon Rule Modeling Challenge Jan 2018 Order Promotions

Corticon Rule Modeling Challenge Jan 2018 Order Promotions Corticon Rule Modeling Challenge Jan 2018 Order Promotions Mike Parish The Problem The objective of this challenge is to help merchants to define various promotions for their sales orders and to automatically

More information

DB2 SQL Class Outline

DB2 SQL Class Outline DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or

More information

Lecture 03. Spring 2018 Borough of Manhattan Community College

Lecture 03. Spring 2018 Borough of Manhattan Community College Lecture 03 Spring 2018 Borough of Manhattan Community College 1 2 Outline 1. Brief History of the Relational Model 2. Terminology 3. Integrity Constraints 4. Views 3 History of the Relational Model The

More information

Chapter 12: Query Processing. Chapter 12: Query Processing

Chapter 12: Query Processing. Chapter 12: Query Processing Chapter 12: Query Processing Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 12: Query Processing Overview Measures of Query Cost Selection Operation Sorting Join

More information

Unit Assessment Guide

Unit Assessment Guide Unit Assessment Guide Unit Details Unit code Unit name Unit purpose/application ICTWEB425 Apply structured query language to extract and manipulate data This unit describes the skills and knowledge required

More information

SQL grouping, views & modifying data

SQL grouping, views & modifying data SQL grouping, views & modifying data Grouping (GROUP BY) Views INSERT UPDATE DELETE Steen Jensen, autumn 2017 SQL query - grouping Grouping makes it possible to show information listed in groups Conditions

More information

Operator Implementation Wrap-Up Query Optimization

Operator Implementation Wrap-Up Query Optimization Operator Implementation Wrap-Up Query Optimization 1 Last time: Nested loop join algorithms: TNLJ PNLJ BNLJ INLJ Sort Merge Join Hash Join 2 General Join Conditions Equalities over several attributes (e.g.,

More information

Chapter 6 - Part II The Relational Algebra and Calculus

Chapter 6 - Part II The Relational Algebra and Calculus Chapter 6 - Part II The Relational Algebra and Calculus Copyright 2004 Ramez Elmasri and Shamkant Navathe Division operation DIVISION Operation The division operation is applied to two relations R(Z) S(X),

More information

20461: Querying Microsoft SQL Server

20461: Querying Microsoft SQL Server 20461: Querying Microsoft SQL Server Length: 5 days Audience: IT Professionals Level: 300 OVERVIEW This 5 day instructor led course provides students with the technical skills required to write basic Transact

More information

Database performance becomes an important issue in the presence of

Database performance becomes an important issue in the presence of Database tuning is the process of improving database performance by minimizing response time (the time it takes a statement to complete) and maximizing throughput the number of statements a database can

More information

Course Outline. Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led

Course Outline. Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led Querying Data with Transact-SQL Course 20761B: 5 days Instructor Led About this course This course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days

More information

Chapter 3. Algorithms for Query Processing and Optimization

Chapter 3. Algorithms for Query Processing and Optimization Chapter 3 Algorithms for Query Processing and Optimization Chapter Outline 1. Introduction to Query Processing 2. Translating SQL Queries into Relational Algebra 3. Algorithms for External Sorting 4. Algorithms

More information

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17 Announcement CompSci 516 Database Systems Lecture 10 Query Evaluation and Join Algorithms Project proposal pdf due on sakai by 5 pm, tomorrow, Thursday 09/27 One per group by any member Instructor: Sudeepa

More information

Querying Microsoft SQL Server (MOC 20461C)

Querying Microsoft SQL Server (MOC 20461C) Querying Microsoft SQL Server 2012-2014 (MOC 20461C) Course 21461 40 Hours This 5-day instructor led course provides students with the technical skills required to write basic Transact-SQL queries for

More information

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation Automated SQL Ownage Techniques October 30 th, 2009 Sebastian Cufre Developer Core Security Technologies sebastian.cufre@coresecurity.com Copyright The Foundation Permission is granted to copy, distribute

More information

20761C: Querying Data with Transact-SQL

20761C: Querying Data with Transact-SQL 20761C: Querying Data with Transact-SQL Course Details Course Code: Duration: Notes: 20761C 5 days This course syllabus should be used to determine whether the course is appropriate for the students, based

More information

Querying Data with Transact-SQL

Querying Data with Transact-SQL Querying Data with Transact-SQL 20761B; 5 Days; Instructor-led Course Description This course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days can

More information

WebIntelligence. Creating Documents

WebIntelligence. Creating Documents Creating Documents This page is intentionally left blank. 2 WIC110904 Table of Contents Lesson Objective... 5 For Assistance...6 Introduction... 7 Document Editor... 7 Designing a Query Flowchart... 9

More information

Chapter 3: Introduction to SQL

Chapter 3: Introduction to SQL Chapter 3: Introduction to SQL Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 3: Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query

More information

After completing this course, participants will be able to:

After completing this course, participants will be able to: Querying SQL Server T h i s f i v e - d a y i n s t r u c t o r - l e d c o u r s e p r o v i d e s p a r t i c i p a n t s w i t h t h e t e c h n i c a l s k i l l s r e q u i r e d t o w r i t e b a

More information

Chapter 1 SQL and Data

Chapter 1 SQL and Data Chapter 1 SQL and Data What is SQL? Structured Query Language An industry-standard language used to access & manipulate data stored in a relational database E. F. Codd, 1970 s IBM 2 What is Oracle? A relational

More information

CS6302 DBMS 2MARK & 16 MARK UNIT II SQL & QUERY ORTIMIZATION 1. Define Aggregate Functions in SQL? Aggregate function are functions that take a collection of values as input and return a single value.

More information

Exam /Course 20767B: Implementing a SQL Data Warehouse

Exam /Course 20767B: Implementing a SQL Data Warehouse Exam 70-767/Course 20767B: Implementing a SQL Data Warehouse Course Outline Module 1: Introduction to Data Warehousing This module describes data warehouse concepts and architecture consideration. Overview

More information

Intellicus Enterprise Reporting and BI Platform

Intellicus Enterprise Reporting and BI Platform Designing Adhoc Reports Intellicus Enterprise Reporting and BI Platform Intellicus Technologies info@intellicus.com www.intellicus.com Designing Adhoc Reports i Copyright 2012 Intellicus Technologies This

More information

2.3 Algorithms Using Map-Reduce

2.3 Algorithms Using Map-Reduce 28 CHAPTER 2. MAP-REDUCE AND THE NEW SOFTWARE STACK one becomes available. The Master must also inform each Reduce task that the location of its input from that Map task has changed. Dealing with a failure

More information

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your

More information

Designing a Database -- Understanding Relational Design

Designing a Database -- Understanding Relational Design Designing a Database -- Understanding Relational Design Contents Overview The Database Design Process Steps in Designing a Database Common Design Problems Determining the Purpose Determining the Tables

More information

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints SQL KEREM GURBEY WHAT IS SQL Database query language, which can also: Define structure of data Modify data Specify security constraints DATA DEFINITION Data-definition language (DDL) provides commands

More information

20761B: QUERYING DATA WITH TRANSACT-SQL

20761B: QUERYING DATA WITH TRANSACT-SQL ABOUT THIS COURSE This 5 day course is designed to introduce students to Transact-SQL. It is designed in such a way that the first three days can be taught as a course to students requiring the knowledge

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 6 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

INFORMATICS PRACTICES

INFORMATICS PRACTICES SET-4 Series SSO Code No. 90 Roll No. Candidates must write the Code on the title page of the answer-book. Please check that this question paper contains 8 printed pages. Code number given on the right

More information

Database Management Systems Paper Solution

Database Management Systems Paper Solution Database Management Systems Paper Solution Following questions have been asked in GATE CS exam. 1. Given the relations employee (name, salary, deptno) and department (deptno, deptname, address) Which of

More information

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence What s a database system? Review of Basic Database Concepts CPS 296.1 Topics in Database Systems According to Oxford Dictionary Database: an organized body of related information Database system, DataBase

More information

Part 5: Introduction to Logical Design

Part 5: Introduction to Logical Design 5. Introduction to Logical Design 5-1 Part 5: Introduction to Logical Design References: Elmasri/Navathe:Fundamentals of Database Systems, 3rd Edition, 1999. Chapter 3, Data Modeling Using the Entity-Relationship

More information

Database Applications (15-415)

Database Applications (15-415) Database Applications (15-415) DBMS Internals- Part VIII Lecture 16, March 19, 2014 Mohammad Hammoud Today Last Session: DBMS Internals- Part VII Algorithms for Relational Operations (Cont d) Today s Session:

More information

WEEK 3 TERADATA EXERCISES GUIDE

WEEK 3 TERADATA EXERCISES GUIDE WEEK 3 TERADATA EXERCISES GUIDE The Teradata exercises for this week assume that you have completed all of the MySQL exercises, and know how to use GROUP BY, HAVING, and JOIN clauses. The quiz for this

More information

1.3. Joins Introduction Access across relations Miniworld approximation Pointing mechanism

1.3. Joins Introduction Access across relations Miniworld approximation Pointing mechanism 1.3. Joins In this lecture we look at... 1.3.01. Introduction Recap: pulling data out of individual relations By row, by column Select and project Access across multiple relations Miniworld approximation

More information

Chapter 3: Introduction to SQL

Chapter 3: Introduction to SQL Chapter 3: Introduction to SQL Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 3: Introduction to SQL Overview of the SQL Query Language Data Definition Basic Query

More information

Pentaho Analytics for MongoDB

Pentaho Analytics for MongoDB Pentaho Analytics for MongoDB Bo Borland Chapter No. 3 "Using Pentaho Instaview" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter NO.3 "Using

More information

Data Strategies for Efficiency and Growth

Data Strategies for Efficiency and Growth Data Strategies for Efficiency and Growth Date Dimension Date key (PK) Date Day of week Calendar month Calendar year Holiday Channel Dimension Channel ID (PK) Channel name Channel description Channel type

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Relational Algebra. Algebra of Bags

Relational Algebra. Algebra of Bags Relational Algebra Basic Operations Algebra of Bags What is an Algebra Mathematical system consisting of: Operands --- variables or values from which new values can be constructed. Operators --- symbols

More information

Relational Algebra and SQL

Relational Algebra and SQL Relational Algebra and SQL Relational Algebra. This algebra is an important form of query language for the relational model. The operators of the relational algebra: divided into the following classes:

More information