SlideShare a Scribd company logo
ENTERPRISE DB SERVER AN INTRODUCTION 
Why do we need to know structure, features of an enterprise database? 
As Batman said: Either you die yourself a hero or live long enough to see yourself becoming a villain. 
(The Dark Knight) 
Microsoft, Oracle & even Apple: Lived long enough to see themselves becoming villains. Web does 
not like them, open source community dislikes them. :) 
(Antitrust, proprietary code, patent war, aggressive sales tactics, Market Monopoly, DRM) 
But Microsoft Windows Server Software still resides on 16% web server machines, 54% of all 
fortune 1000 company servers. Not to mention many corporate SME use entire microsoft stack in 
their intranet making it top intranet based software. 
War is Drug: The Hurt Locker. 
We can say Microsoft stack is Drug. Once you are into it You 
can come out of it. 
my precious code…
Why? 
Microsoft SQL Server may not be the best enterpriseDB out there but it has the best Software 
Suit in terms of packaging of various components, features and analytics verticals. 
Basic components of the sql server database is as follows 
Sql Server Database engine (DB Objects, Jobs, Query Tools, Tuning tools, Full-Text, Log and DTC) 
Sql Server Analysis Services (OLAP, Cubes, PostGre In Memory, BI, Business Analytics) 
Sql Server Reporting engine (Charting, Matrix, Templates, Sub Reports) 
Sql Server Integration services (DTS Packages) 
[1] SQL Server Database Engine: This part of SQL Server actually creates and drives relational 
databases. (profiler, Agent, DB Mail, Browser, Pipes, mdf and ldf, Recovery, Mirror, RAIDs) 
[2] SQL Server Analysis Services (SSAS): SSAS is the data-analysis component of SQL Server. It 
can create OLAP (OnLine Analytical Processing) cubes sophisticated programming objects for 
organizing data inside a relational database and do data mining (pulling relevant data out of a 
database in response to an ad-hoc question). 
[3] SQL Server Reporting Services (SSRS): SSRS is a component of SQL Server that provides 
reporting regardless of a database’s operating system. 
[4] SQL Server Integration Services (SSIS): SSIS is a component of SQL Server that does the 
Extract, Transform, and Load (ETL) process that cleans up and formats raw data from source 
systems for inclusion in the database as ready-to-use information.
SQL 
SERVER 
MY SQL 
Feature Comparison
DB INDEXING 
•Extent 
–8 contiguous 64KByte size data Pages 
–Once extent full, next record will take up a whole additional extent. 
–Pre-allocating space saves time. 
•Page 
–64K bytes 
–# of records/page varies with bytes/record 
–Types of Pages: Data and Index pages 
–Page Split 
–When page becomes full, it splits 
–New page allocated: ½ data from old page moved to new (FILL FACTOR*) 
•Rows 
–Storage is different as per different versions 
–Text data or Blob data is stored differently, only finite data is stored in Pages
Extent 
Page 1 Page 2 ………. 
Page 8 
TABLE
● Two types of Index: 
Clustered and Nonclustered Index (Ordered and Hashed Index) 
|Amit| 24| Vidhya Nagar| Bharat| 27| 
Jay Nagar| Kumar| 22| vikas 
Nagar |Lukcy| 24| Shastri Nagar| 
|Mohan| 44| Vidhyadhar Nagar| 
PAGE 1 
|Sanjay| 24| Vidhya Nagar| Sumit| 
27| Jay Nagar| Tarun| 22| 
vikas Nagar |Yusuf| 24| Shastri Nagar| 
|Zakir| 44| Vidhyadhar Nagar| 
PAGE 2 
Index 
Amit - Page 1 
Bharat - Page 1 
... 
Sumit - Page 2
Nonclustered Index 
|Amit| 24| Vidhya Nagar| Bharat| 27| 
Jay Nagar| Kumar| 22| vikas 
Nagar |Lukcy| 24| Shastri Nagar| 
|Mohan| 44| Vidhyadhar Nagar| 
PAGE 1 
|Sanjay| 25| Vidhya Nagar| Sumit| 
27| Jay Nagar| Tarun| 22| 
vikas Nagar |Yusuf| 26| Shastri Nagar| 
|Zakir| 44| Vidhyadhar Nagar| 
PAGE 2 
Index 
24 - Page 1 
27 - Page 1 
27 - Page 2 
... 
Index DESC 
27 - Page 1 
27 - Page 2 
24 - Page 1 
...
FRAGMENTATION / FILL FACTOR / SPARSE COLUMNS 
Index PAGE 
Amit - Page 1 
bharat - Page 1 
Chintu - Page 1 
--40-- 
Index PAGE 
Jay - Page N 
Mohan - Page N 
Rajesh - Page N 
--40-- 
Index PAGE 
Sumit - Page M 
Siddu - Page M 
Zakir - Page M 
---40--- 
TABLE 
No of Records 
120 
Index PAGE 
Amit - Page 1 
bharat - Page 1 
Chintu - Page 1 
--40-- 
Index PAGE 
Jay - Page N 
Mohan - Page N 
Rajesh - Page N 
--40-- 
Index PAGE 
Sumit - Page M 
Siddu - Page M 
Zakir - Page M 
---40--- 
Index PAGE 
Chinu - Page X
TABLE 
No of Records 
121 
Index PAGE 
Amit - Page 1 
bharat - Page 1 
Chintu - Page 1 
Chinu - Page X 
----empty---- 
Index PAGE 
Jay - Page N 
Mohan - Page N 
Rajesh - Page N 
------empty----- 
------empty----- 
Index PAGE 
Sumit - Page M 
Siddu - Page M 
Zakir - Page M 
------empty----- 
------empty----- 
SPARSE COLUMNS 
Index PAGE 
Amit,24 - Page 1 
bharat,22 - Page 1 
Chintu,43 - Page 1 
Chinu,45 - Page X
● Dense Index and sparse Index 
Dense for all search key values 
Sparse for few search key values 
● Sparse Index: 
-Less space and less maintenance overhead for insertions and deletions. 
-Generally slower than dense index for locating records. 
-sparse index with an index entry for every block in file, corresponding to least 
search-key value in the block. 
- only when data is ordered (sometimes internally maintained by database) 
- Find index record with largest search-key value < K, then start searching reverse
Multi Level Index:
Points: 
● Updating indices imposes overhead on database modification --when a 
row is modified, every index on the row must be updated. e.g. Log Table 
● High Insert values: Bulk insert, BCP routines 
● Sequential scan using clustered index is efficient, but a sequential scan 
using a non clustered index is expensive. 
● Only one clustered index, hundreds of non clustered index (ascending, 
descending) 
● Where > clause = clustered index 
● Where = clause Non clustered index 
● Index Maintenance is also important due to fragmentation 
● Full Text
Choosing between clustered and non-clustered index: 
Five Factors involved when choosing the indexing technique 
• Access type - is the type of access being used. 
• Access time - time required to locate the data. 
• Insertion time - time required to insert the new data. 
• Deletion time - time required to delete the data. 
• Space overhead - the additional space occupied by the added data 
structure.
Hopefully ☺ 
● Database Components & features 
● Sql Constructs 
● Database design & Normalization 
● Analytics & Reporting Concepts 
● Database Maintenance & tuning 
● Database Architectures

More Related Content

PPTX
Leadership Presentation for NAPP 2014
Gavin Clark
 
DOCX
Employee relationship
Mohamed ramzan
 
PPT
Work samples - Chris L.
JMarie Kerr
 
DOCX
Morfo1 pie
Luis Padilla
 
PPTX
The Age of Enlightenment
dyanv
 
PPTX
sosiologi
Deny Satriyani
 
PDF
學測、指考單字統計
Yu-Ting Chen
 
DOC
Kemahiran bernilai tambah
hallen77
 
Leadership Presentation for NAPP 2014
Gavin Clark
 
Employee relationship
Mohamed ramzan
 
Work samples - Chris L.
JMarie Kerr
 
Morfo1 pie
Luis Padilla
 
The Age of Enlightenment
dyanv
 
sosiologi
Deny Satriyani
 
學測、指考單字統計
Yu-Ting Chen
 
Kemahiran bernilai tambah
hallen77
 

Viewers also liked (6)

PPTX
Tuusula 1.10.2016
Krista Kindt-Sarojärvi
 
PPTX
Narrative photo writing task term 4
Gavin Clark
 
PPTX
Maglevv
POONAMCH
 
PDF
สินทรัพย์กระแสเงินสด 50,000
n24999
 
PPTX
Avikalp
Khushi Jha
 
PPTX
EDU337 Week 1 Assignment
Kevin Webb
 
Tuusula 1.10.2016
Krista Kindt-Sarojärvi
 
Narrative photo writing task term 4
Gavin Clark
 
Maglevv
POONAMCH
 
สินทรัพย์กระแสเงินสด 50,000
n24999
 
Avikalp
Khushi Jha
 
EDU337 Week 1 Assignment
Kevin Webb
 
Ad

Similar to Enterprise dbs and Database indexing (20)

PPTX
dotnetMALAGA - Sql query tuning guidelines
Javier García Magna
 
PPTX
Sql server lesson6
Ala Qunaibi
 
PPTX
Sql performance tuning
Leo Mark Villar
 
PDF
SQLServer Database Structures
Antonios Chatzipavlis
 
PPTX
We Don't Need Roads: A Developers Look Into SQL Server Indexes
Richie Rump
 
PDF
Indexing techniques
Huda Alameen
 
PPTX
Query Optimization in SQL Server
Rajesh Gunasundaram
 
PPTX
Dev Sql Indexing Strategies
rsnarayanan
 
DOCX
Indexes in ms sql server
Rahul Yerrabelli
 
PPTX
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
PPTX
Database Performance Tuning
Arno Huetter
 
PPTX
Database Performance
Boris Hristov
 
PDF
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
Polish SQL Server User Group
 
PPTX
Indy pass writing efficient queries – part 1 - indexing
eddiew
 
PPT
Sql Server Basics
rainynovember12
 
PPTX
presentation is on database for sql and stored procedures
harshsinghal08979
 
PPT
Indexing Strategies
jlaspada
 
PPTX
Understanding indices
Richard Douglas
 
PDF
Building better SQL Server Databases
ColdFusionConference
 
PPTX
Geek Sync | Understand Indexes to Write Better Queries
IDERA Software
 
dotnetMALAGA - Sql query tuning guidelines
Javier García Magna
 
Sql server lesson6
Ala Qunaibi
 
Sql performance tuning
Leo Mark Villar
 
SQLServer Database Structures
Antonios Chatzipavlis
 
We Don't Need Roads: A Developers Look Into SQL Server Indexes
Richie Rump
 
Indexing techniques
Huda Alameen
 
Query Optimization in SQL Server
Rajesh Gunasundaram
 
Dev Sql Indexing Strategies
rsnarayanan
 
Indexes in ms sql server
Rahul Yerrabelli
 
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
Database Performance Tuning
Arno Huetter
 
Database Performance
Boris Hristov
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
Polish SQL Server User Group
 
Indy pass writing efficient queries – part 1 - indexing
eddiew
 
Sql Server Basics
rainynovember12
 
presentation is on database for sql and stored procedures
harshsinghal08979
 
Indexing Strategies
jlaspada
 
Understanding indices
Richard Douglas
 
Building better SQL Server Databases
ColdFusionConference
 
Geek Sync | Understand Indexes to Write Better Queries
IDERA Software
 
Ad

Recently uploaded (20)

PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PPTX
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
DOCX
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
PDF
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Balancing Resource Capacity and Workloads with OnePlan – Avoid Overloading Te...
OnePlan Solutions
 
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
Presentation about variables and constant.pptx
safalsingh810
 
Odoo Integration Services by Candidroot Solutions
CandidRoot Solutions Private Limited
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Exploring AI Agents in Process Industries
amoreira6
 
Can You Build Dashboards Using Open Source Visualization Tool.docx
Varsha Nayak
 
Enhancing Healthcare RPM Platforms with Contextual AI Integration
Cadabra Studio
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Activate_Methodology_Summary presentatio
annapureddyn
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Protecting the Digital World Cyber Securit
dnthakkar16
 

Enterprise dbs and Database indexing

  • 1. ENTERPRISE DB SERVER AN INTRODUCTION Why do we need to know structure, features of an enterprise database? As Batman said: Either you die yourself a hero or live long enough to see yourself becoming a villain. (The Dark Knight) Microsoft, Oracle & even Apple: Lived long enough to see themselves becoming villains. Web does not like them, open source community dislikes them. :) (Antitrust, proprietary code, patent war, aggressive sales tactics, Market Monopoly, DRM) But Microsoft Windows Server Software still resides on 16% web server machines, 54% of all fortune 1000 company servers. Not to mention many corporate SME use entire microsoft stack in their intranet making it top intranet based software. War is Drug: The Hurt Locker. We can say Microsoft stack is Drug. Once you are into it You can come out of it. my precious code…
  • 2. Why? Microsoft SQL Server may not be the best enterpriseDB out there but it has the best Software Suit in terms of packaging of various components, features and analytics verticals. Basic components of the sql server database is as follows Sql Server Database engine (DB Objects, Jobs, Query Tools, Tuning tools, Full-Text, Log and DTC) Sql Server Analysis Services (OLAP, Cubes, PostGre In Memory, BI, Business Analytics) Sql Server Reporting engine (Charting, Matrix, Templates, Sub Reports) Sql Server Integration services (DTS Packages) [1] SQL Server Database Engine: This part of SQL Server actually creates and drives relational databases. (profiler, Agent, DB Mail, Browser, Pipes, mdf and ldf, Recovery, Mirror, RAIDs) [2] SQL Server Analysis Services (SSAS): SSAS is the data-analysis component of SQL Server. It can create OLAP (OnLine Analytical Processing) cubes sophisticated programming objects for organizing data inside a relational database and do data mining (pulling relevant data out of a database in response to an ad-hoc question). [3] SQL Server Reporting Services (SSRS): SSRS is a component of SQL Server that provides reporting regardless of a database’s operating system. [4] SQL Server Integration Services (SSIS): SSIS is a component of SQL Server that does the Extract, Transform, and Load (ETL) process that cleans up and formats raw data from source systems for inclusion in the database as ready-to-use information.
  • 3. SQL SERVER MY SQL Feature Comparison
  • 4. DB INDEXING •Extent –8 contiguous 64KByte size data Pages –Once extent full, next record will take up a whole additional extent. –Pre-allocating space saves time. •Page –64K bytes –# of records/page varies with bytes/record –Types of Pages: Data and Index pages –Page Split –When page becomes full, it splits –New page allocated: ½ data from old page moved to new (FILL FACTOR*) •Rows –Storage is different as per different versions –Text data or Blob data is stored differently, only finite data is stored in Pages
  • 5. Extent Page 1 Page 2 ………. Page 8 TABLE
  • 6. ● Two types of Index: Clustered and Nonclustered Index (Ordered and Hashed Index) |Amit| 24| Vidhya Nagar| Bharat| 27| Jay Nagar| Kumar| 22| vikas Nagar |Lukcy| 24| Shastri Nagar| |Mohan| 44| Vidhyadhar Nagar| PAGE 1 |Sanjay| 24| Vidhya Nagar| Sumit| 27| Jay Nagar| Tarun| 22| vikas Nagar |Yusuf| 24| Shastri Nagar| |Zakir| 44| Vidhyadhar Nagar| PAGE 2 Index Amit - Page 1 Bharat - Page 1 ... Sumit - Page 2
  • 7. Nonclustered Index |Amit| 24| Vidhya Nagar| Bharat| 27| Jay Nagar| Kumar| 22| vikas Nagar |Lukcy| 24| Shastri Nagar| |Mohan| 44| Vidhyadhar Nagar| PAGE 1 |Sanjay| 25| Vidhya Nagar| Sumit| 27| Jay Nagar| Tarun| 22| vikas Nagar |Yusuf| 26| Shastri Nagar| |Zakir| 44| Vidhyadhar Nagar| PAGE 2 Index 24 - Page 1 27 - Page 1 27 - Page 2 ... Index DESC 27 - Page 1 27 - Page 2 24 - Page 1 ...
  • 8. FRAGMENTATION / FILL FACTOR / SPARSE COLUMNS Index PAGE Amit - Page 1 bharat - Page 1 Chintu - Page 1 --40-- Index PAGE Jay - Page N Mohan - Page N Rajesh - Page N --40-- Index PAGE Sumit - Page M Siddu - Page M Zakir - Page M ---40--- TABLE No of Records 120 Index PAGE Amit - Page 1 bharat - Page 1 Chintu - Page 1 --40-- Index PAGE Jay - Page N Mohan - Page N Rajesh - Page N --40-- Index PAGE Sumit - Page M Siddu - Page M Zakir - Page M ---40--- Index PAGE Chinu - Page X
  • 9. TABLE No of Records 121 Index PAGE Amit - Page 1 bharat - Page 1 Chintu - Page 1 Chinu - Page X ----empty---- Index PAGE Jay - Page N Mohan - Page N Rajesh - Page N ------empty----- ------empty----- Index PAGE Sumit - Page M Siddu - Page M Zakir - Page M ------empty----- ------empty----- SPARSE COLUMNS Index PAGE Amit,24 - Page 1 bharat,22 - Page 1 Chintu,43 - Page 1 Chinu,45 - Page X
  • 10. ● Dense Index and sparse Index Dense for all search key values Sparse for few search key values ● Sparse Index: -Less space and less maintenance overhead for insertions and deletions. -Generally slower than dense index for locating records. -sparse index with an index entry for every block in file, corresponding to least search-key value in the block. - only when data is ordered (sometimes internally maintained by database) - Find index record with largest search-key value < K, then start searching reverse
  • 12. Points: ● Updating indices imposes overhead on database modification --when a row is modified, every index on the row must be updated. e.g. Log Table ● High Insert values: Bulk insert, BCP routines ● Sequential scan using clustered index is efficient, but a sequential scan using a non clustered index is expensive. ● Only one clustered index, hundreds of non clustered index (ascending, descending) ● Where > clause = clustered index ● Where = clause Non clustered index ● Index Maintenance is also important due to fragmentation ● Full Text
  • 13. Choosing between clustered and non-clustered index: Five Factors involved when choosing the indexing technique • Access type - is the type of access being used. • Access time - time required to locate the data. • Insertion time - time required to insert the new data. • Deletion time - time required to delete the data. • Space overhead - the additional space occupied by the added data structure.
  • 14. Hopefully ☺ ● Database Components & features ● Sql Constructs ● Database design & Normalization ● Analytics & Reporting Concepts ● Database Maintenance & tuning ● Database Architectures