data warehousing. databases support: transaction processing systems –operational level decision...
TRANSCRIPT
![Page 1: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/1.jpg)
Data Warehousing
![Page 2: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/2.jpg)
Databases support:
• Transaction Processing Systems– operational level decision– recording of transactions
• Decision Support Systems– tactical and strategic decision making– analysis of historical records
![Page 3: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/3.jpg)
Can one database support both?
RDBMS TPSDSS
![Page 4: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/4.jpg)
Can one database support both?
RDBMS TPSDSS
Yes… but at a cost in performance.
• low concurrency
• large reads
• significant aggregation
• high concurrency
• small transactions
• limited aggregation
![Page 5: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/5.jpg)
The Solution…
ProductionDatabase(OLTP)
TPS DSS
DataWarehouse
Extract,Transport & TransformationLoad
![Page 6: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/6.jpg)
OLTP vs DW Characteristics
OLTP Database Data Warehouse
High Read/Write Concurrency Primarily Read Only
Highly Normalized Highly Denormalized
Limited Transaction History Massive Transaction History
Very Detailed Data Detailed and Summarized Data
Limited External Data Significant External Data
![Page 7: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/7.jpg)
Data Marts (3-tier approach)
ProductionDatabase(OLTP)
DSS
DataWarehouse
ETL
Data Mart
A
Data Mart
B
Data Mart
C
DSS
DSSTransformation& Limitation
External DataSources
![Page 8: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/8.jpg)
Data Marts (bottom-up approach)
ProductionDatabase(OLTP)
DSSData Mart
A
Data Mart
B
Data Mart
C
DSS
DSS
External DataSources
External DataSources
External DataSources
ETL
ETL
ETL
![Page 9: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/9.jpg)
Multi-dimensional (Sales) Data
70 55 60 35
40 90 50 30
80 110 60 25S
oda
Die
t S
oda
Lim
e S
oda
Ora
nge
Sod
a
California
Utah
Arizona
March 1March 2
March 3
![Page 10: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/10.jpg)
Cube Operations
• Cube (group by option)• Slice (implement in Oracle with where clause)• Dice (implement in Oracle with where clause)• Drill Down (implemented in report writers)• Roll-up (group by option)• Pivot (not implemented by Oracle (but by Access))
![Page 11: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/11.jpg)
Cube Data Example
Create table sales (
Item varchar2(20),
State varchar2(20),
Amount number(6),
Day date);
Insert into Sales
values('Soda','California',80,'01-Mar-2004');
Insert into Sales
values('Diet Soda','California',110,'01-Mar-2004');
…
![Page 12: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/12.jpg)
Examine these queriesSelect * from sales;
Select Item, State, sum(amount)from salesgroup by Item, State;
Select Item, State, sum(amount)from salesgroup by Rollup(Item, State);
Select State, Item, sum(amount)from salesgroup by Rollup(State, Item);
Select State, Item, sum(amount)from salesgroup by Cube(State, Item);
![Page 13: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/13.jpg)
Materialized ViewsMaterialized views are schema objects that can be used to summarize, precompute, replicate, and distribute data. They are suitable in various computing environments such as data warehousing, decision support, and distributed or mobile computing:
•In data warehouses, materialized views are used to precompute and store aggregated data such as sums and averages. Materialized views in these environments are typically referred to as summaries because they store summarized data.
•Cost-based optimization can use materialized views to improve query performance by automatically recognizing when a materialized view can and should be used to satisfy a request. The optimizer transparently rewrites the request to use the materialized view. Queries are then directed to the materialized view and not to the underlying detail tables or views.
•In distributed environments, materialized views are used to replicate data at distributed sites and synchronize updates done at several sites with conflict resolution methods. The materialized views as replicas provide local access to data that otherwise has to be accessed from remote sites.
•In mobile computing environments, materialized views are used to download a subset of data from central servers to mobile clients, with periodic refreshes from the central servers and propagation of updates by clients back to the central servers.
![Page 14: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/14.jpg)
Create Materialized View (partial syntax)
![Page 15: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/15.jpg)
Materialized View refresh_clause
![Page 16: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/16.jpg)
MV Example
Create Materialized View MVcustomer
REFRESH start with sysdate Next sysdate+(1/24)
AS
Select customerID,lastname,firstname, phone
from customers;
![Page 17: Data Warehousing. Databases support: Transaction Processing Systems –operational level decision –recording of transactions Decision Support Systems –tactical](https://reader035.vdocument.in/reader035/viewer/2022072017/56649f0c5503460f94c201e5/html5/thumbnails/17.jpg)
RDBMS Star Schema
Sales
SalesNO
SalesUnits
SalesDollars
SalesCost
Store
StoreID
Manager
Street
City
Zip
Item
ItemID
Name
UnitPrice
Brand
Category
Customer
CustID
Name
Phone
Street
City
Day
DayID
DayOfMonth
Month
Year
DayOfWeek
ItemID
CustID
StoreID
DayID