Upload
dageop-ltd
View
77
Download
1
Embed Size (px)
Citation preview
www.dageop.com
Data Modeling
®
DM-01 Storing Summarised data
DR. SUBRAMANI PARAMASIVAM (MANI)
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
Contents• DM-01 Storing Summarised data• Roll-up Tables• Materialising aggregated data with indexed views
www.dageop.comData Modeling
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
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
Physical Data Model
• Is a representation of a data design.• Includes the facilities and
constraints of a database management system
www.dageop.comData Modeling
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
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
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
Storing Summarised data• Performance• DBA • Developers • Management
• Performance matters in any environment.• Summarising the data or just reporting data .
www.dageop.comData Modeling
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
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
Roll-up Tables
SELECT <Column_Names>FROM <Table_Name>GROUP BY <Column_Names> WITH ROLLUP
www.dageop.comData Modeling
Materialising aggregated data with indexed views
www.dageop.comData Modeling
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
www.dageop.comData Modeling
ReviewStoring Summarised data
Roll-up TablesMaterialising aggregated data with indexed views
®
www.dageop.com