www.dageop.com
Data
Modeling
®
DM-01 Storing Summarised data
DR. SUBRAMANI
PARAMASIVAM
(MANI)
About
me
Dr. SubraMANI Paramasivam
PhD., MCT, MCSE, MCITP, MCP, MCTS, MCSA
CEO, Principal Consultant & Trainer
@ DAGEOP (UK)
Email: mani@dageop.com
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.com
Data Modeling
Introduction to Data Modeling
www.dageop.com
Data 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.com
Data 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.com
Data Modeling
Physical Data Model
• Is a representation of a data
design.
• Includes the facilities and
constraints of a database
management system
www.dageop.com
Data 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.com
Data 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.com
Data Modeling
DM-01 Storing Summarised data
www.dageop.com
Data 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.com
Data Modeling
Storing Summarised data
• Performance
• DBA 
• Developers 
• Management 
• Performance matters in any environment.
• Summarising the data or just reporting data .
www.dageop.com
Data 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.com
Data Modeling
Roll-up Tables
www.dageop.com
Data 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.com
Data Modeling
DEMO
www.dageop.com
Data Modeling
Materialising aggregated data
with indexed views
www.dageop.com
Data 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.com
Data Modeling
Table
View
Logical Physical Records
INDEX
IX
View
1M
10K
DEMO
www.dageop.com
Data Modeling
www.dageop.com
Data Modeling
Review
Storing Summarised data
Roll-up Tables
Materialising aggregated data with indexed views
Q & A
www.dageop.com
Data Modeling
®
www.dageop.com

Data Modeling - Series 1 Storing summarised data

  • 1.
    www.dageop.com Data Modeling ® DM-01 Storing Summariseddata DR. SUBRAMANI PARAMASIVAM (MANI)
  • 2.
    About me Dr. SubraMANI Paramasivam PhD.,MCT, MCSE, MCITP, MCP, MCTS, MCSA CEO, Principal Consultant & Trainer @ DAGEOP (UK) Email: mani@dageop.com 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
  • 3.
    Contents • DM-01 StoringSummarised data • Roll-up Tables • Materialising aggregated data with indexed views www.dageop.com Data Modeling
  • 4.
    Introduction to DataModeling www.dageop.com Data Modeling
  • 5.
    Introduction to DataModeling • 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.com Data Modeling
  • 6.
    Introduction to DataModeling • 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.com Data Modeling
  • 7.
    Physical Data Model •Is a representation of a data design. • Includes the facilities and constraints of a database management system www.dageop.com Data Modeling
  • 8.
    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.com Data Modeling
  • 9.
    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.com Data Modeling
  • 10.
    DM-01 Storing Summariseddata www.dageop.com Data Modeling
  • 11.
    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.com Data Modeling
  • 12.
    Storing Summarised data •Performance • DBA  • Developers  • Management  • Performance matters in any environment. • Summarising the data or just reporting data . www.dageop.com Data Modeling
  • 13.
    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.com Data Modeling
  • 14.
  • 15.
    Roll-up Tables • Rollupis 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
  • 16.
    Roll-up Tables SELECT <Column_Names> FROM<Table_Name> GROUP BY <Column_Names> WITH ROLLUP www.dageop.com Data Modeling
  • 17.
  • 18.
    Materialising aggregated data withindexed views www.dageop.com Data Modeling
  • 19.
    Materialising aggregated data withindexed 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.com Data Modeling Table View Logical Physical Records INDEX IX View 1M 10K
  • 20.
  • 21.
    www.dageop.com Data Modeling Review Storing Summariseddata Roll-up Tables Materialising aggregated data with indexed views
  • 22.
  • 23.