INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.
Click here to load reader
-
Upload
calvin-hensley -
Category
Documents
-
view
219 -
download
0
description
Transcript of INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.
![Page 1: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/1.jpg)
INFORMATION INTEGRATION
Sandeep Singh BalouriaCS-257 ID- 101
![Page 2: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/2.jpg)
DATA CUBES
Data cube is a multi-dimensional structure , it as a data abstraction that allows one to view aggregated data from a number of perspectives.
It is surrounded by a collection of sub-cubes/cuboids that represent the aggregation of the base cuboid along one or more dimensions.
![Page 3: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/3.jpg)
DATA CUBE
![Page 4: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/4.jpg)
CUBE OPERATOR
In cube operator, we can define an augmented table CUBE(F) that add an additional value, denoted *, to each dimension.
The * has the intuitive meaning “any”, and it represents aggregation along the dimension in which it appears.
![Page 5: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/5.jpg)
CUBE OPERATOR
![Page 6: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/6.jpg)
EXAMPLE:Sales(model , color, date, dealer, val , cnt).-In this query we specify conditions on certain attributes
of the sales relation and group by some other attributes
-In the relation CUBE(sales), we look for those tuples t with the following properties:
1. If the query specifies a value v for attribute a, then tuple t has v in its component for a.
![Page 7: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/7.jpg)
2.If the query groups by an attribute a, then t has any non-* value in its component for a.
3.If the query neither groups by attribute a nor specifies a value for a, then t has * in its component for a.
QUERY:SELECT color, AVG(price)FROM SalesWHERE model=‘Gobi’GROUP BY color;Cube(Sales) Form is (‘Gobi’ ,c ,*,*,v ,n)
![Page 8: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/8.jpg)
CUBE IMPLEMENTED BY MATERIALIZED VIEWS
A materialized view is an object that stores the result of select statement. These are mostly used in data warehousing to improve the performance of the select statements that involve group and aggregate functions we use materialized views .
EXAMPLE: INSERT INTO salesV1 SELECT model, color, month, city, SUM(val) AS val, SUM(cnt) AS
cntFROM sales JOIN Dealers ON dealer=nameGROUP BY model , color , month, city;Sales(model, color, date, dealer, val, cnt)
![Page 9: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/9.jpg)
Query:SELECT model ,SUM(val) FROM salesGROUP BY model;-Can also be written as:SELECT model, SUM(val)FROM sales(v1)GROUP BY model;
![Page 10: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/10.jpg)
SELECT model, color, date, SUM(val) FROM salesGROUP BY model ,color , date;
![Page 11: INFORMATION INTEGRATION Sandeep Singh Balouria CS-257 ID- 101.](https://reader037.fdocuments.in/reader037/viewer/2022100404/5a4d1b7b7f8b9ab0599b8f5b/html5/thumbnails/11.jpg)
LATTICE OF VIEWS
In lattice view we can partition the values of a dimension by grouping according to one or more attributes of its dimensional tables.