data modeling - series 1 storing summarised data
TRANSCRIPT
![Page 1: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/1.jpg)
www.dageop.com
Data Modeling
®
DM-01 Storing Summarised data
DR. SUBRAMANI PARAMASIVAM (MANI)
![Page 2: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/2.jpg)
About me
Dr. SubraMANI ParamasivamPhD., MCT, MCSE, MCITP, MCP, MCTS, MCSACEO, Principal Consultant & Trainer @ DAGEOP (UK) Email: [email protected] Blog: http://dataap.org/blog
Follow Us
https://www.facebook.com/pages/YOUR-SQL-MAN-LTD/http://www.youtube.com/user/YourSQLMAN
https://twitter.com/dageop
https://uk.linkedin.com/in/dageop
Proud Sponsor
• SQLBits• SQL Saturdays• MCT Summit• SQL Server Geeks
Summit• Data Awareness
Programme• Dageop’s Data Day
®
www.DataAP.org
SPEAKER
![Page 3: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/3.jpg)
Contents• DM-01 Storing Summarised data• Roll-up Tables• Materialising aggregated data with indexed views
www.dageop.comData Modeling
![Page 5: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/5.jpg)
Introduction to Data Modeling• Data Modeling is a formalization and
documentation of existing process. • Data Modeling techniques converts
complex designs to easily understandable.• Data Modeling can be thought of as
a diagram or flow chart that illustrates the relationship between data• Undergoes Normalization /
Denormalization process.
www.dageop.comData Modeling
![Page 6: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/6.jpg)
Introduction to Data Modeling• Types Of Data Modeling• Conceptual Data Modeling (CDM) :
Identifies the highest level of relation ship between different entities• Enterprise Data Modeling (EDM) :
Similar to conceptual data Modeling but address the unique requirements of specific business• Logical Data Modeling (LDM) :
Illustrates the specific entities, Attributes and relations involved in a business function • Physical Data Modeling : much required for dB professionals
Represents an application and database specific implementation of LDM
www.dageop.comData Modeling
![Page 7: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/7.jpg)
Physical Data Model
• Is a representation of a data design.• Includes the facilities and
constraints of a database management system
www.dageop.comData Modeling
![Page 8: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/8.jpg)
Physical Data Model• The process of building the physical data model from Conceptual data model.• First Step : Conceptual data Model• Second Step : Logical Model• Final : Physical Data Model
www.dageop.comData Modeling
![Page 9: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/9.jpg)
Physical Data Model• A complete physical data model will include• Physical storage
• Tables, Views, Data types• Referential Integrity
• Primary Keys, Foreign keys, Constraints, Referential Integrity• Programming
• Stored procedure, UDF, Triggers, CLR Function• Indexes• Partitioned tables
www.dageop.comData Modeling
![Page 11: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/11.jpg)
Storing Summarised data• Every organization deal with many databases and
millions / billions of records.• Who?• When?• What purpose?• Database size
• SMALL• MEDIUM• LARGE
• Business requirements?• SIMPLE• COMPLEX
www.dageop.comData Modeling
![Page 12: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/12.jpg)
Storing Summarised data• Performance• DBA • Developers • Management
• Performance matters in any environment.• Summarising the data or just reporting data .
www.dageop.comData Modeling
![Page 13: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/13.jpg)
Storing Summarised data• Summary reports from aggregated transaction data is used for Management
Information reports.• It could be Complex & resource intensive too. • To overcome this issue, the best tools to be used for multi dimensional
analysis would be• SSIS - Integration Services• SSAS – Analysis Services
• For simple summary reports @ T-SQL level (Used with GROUP BY)• CUBE – Generates multi dimensional cube for the query• ROLLUP – Generates Sub-totals & Totals• COMPUTE & COMPUTE BY – Detail & Summary rows with one SELECT statement.
www.dageop.comData Modeling
![Page 15: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/15.jpg)
Roll-up Tables• Rollup is used to calculate multiple levels of subtotals across specified
group of dimensions.
• Subtotal and Grand total in a single query when the table is populated.
• Used with GROUP BY clause
• Highly efficient and helps fast retrieval.www.dageop.com
Data Modeling
![Page 16: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/16.jpg)
Roll-up Tables
SELECT <Column_Names>FROM <Table_Name>GROUP BY <Column_Names> WITH ROLLUP
www.dageop.comData Modeling
![Page 18: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/18.jpg)
Materialising aggregated data with indexed views
www.dageop.comData Modeling
![Page 19: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/19.jpg)
Materialising aggregated data with indexed views
• What is a View?• What is an Index?• What is an Indexed View?
CLUSTERED & NON-CLUSTERED indexes can be created on a view.
10K
www.dageop.comData Modeling
Table
View
Logical Physical Records
INDEX
IX View
1M
10K
![Page 21: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/21.jpg)
www.dageop.comData Modeling
ReviewStoring Summarised data
Roll-up TablesMaterialising aggregated data with indexed views
![Page 23: Data Modeling - Series 1 Storing summarised data](https://reader035.vdocuments.site/reader035/viewer/2022062316/589a95301a28abae648b5ed1/html5/thumbnails/23.jpg)
®
www.dageop.com