Beginner
    AJAX
    Android
    ASP.Net
    C#
    Cloud Computing
    Crystal Report
    Database
    Drupal
    HTML5
    JavaScript
    Joomla
    JQuery
    MVC
    php
    Reporting
    SharePoint
    SQL Server
    VB.Net
    Windows Phone
    WordPress
    WPF
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog

Home >> Database >> Denormalization in SQL Server




Denormalization in SQL Server-MindStick

Denormalization in SQL Server

What is Denormalization ?

The intentional introduce of redundancy in a table in order to improve performance is called Denormalization. Denormalization is a technique to move from higher to lower normal forms of database modeling in order to speed up database access. Denormalization is usually done to decrease the time required to execute complex queries. Drawbacks of a normalized database are mostly in performance. In a normalized database, more joins are required to gather all the information from multiple entities, as data is divided and stored in multiple entities rather than in one large table. Queries that have a lot of complex joins will require more CPU usage and will adversely affect performance. Sometimes, it is good to denormalize parts of the database. Examples of design changes to denormalize the database and improve performance are:

ORDERS

denormalization in sql server

PRODUCTS

denormalization in sql server

If you have calculated the total cost of each order placed as the cost of the product plus a tax of 10% of the product cost, the query to calculate the total cost sales as follows:

select sum((cost*qty)+(0.10*cost*qty)) from orders join products on orders.ProductId =products.ProductId

If there are thousands of rows, the server will take a lot of time to process the query and return the results as there is a join and computation involved.

ORDERS

denormalization in sql server

To find the total sales write simple query:

select SUM(ORDERCOST)from orders

 

 



 Author Information
Name: Sachindra Singh
Member Since: 1/17/2011
Article Submitted Date: 1/27/2011
Location:     India
Report Abuse Form
Reason:    
 
Total Online Users: 2678
Advertisement
mindstick
Advertise with Us
  
Dudelabs
Copyright © 2013MindStick. All Rights Reserved.