SlideShare a Scribd company logo
Cases Study Related To Replication

                       By: Shahzad Sarwar
                       To: Dubai Office
                       Dated: 7th June 2010
Problem Definition:
Ships of shipping companies move around in sea, which have a system where check list
(as Questions/answer) are supposed to be saved. These check list identify the health,
safety and operational status of ship and its different components. On regular intervals,
these checklists are filled in ships.

There will be one centralized server, where data of these check lists from different ships
will be pushed. So central server will have consolidated view of data from all the ships
moving in the Sea.


Solutions:
Lets first analyze what are the objective of replication, Why to use and Why to not use
replication in eyes of MSDN-the most valid source of information.


1 Objectives of Replication:
Replication can be used effectively for many different purposes, as discussed in the
following sections.

1.1 Separating Data Entry and Reporting
If you have worked in an environment in which the same database is used for data entry
and reporting, you probably know that things aren't always rosy. Constantly reading and
modifying data in the same set of tables just doesn't work very well if you care about data
integrity. Transactions that run against a set of tables prevent reading the locked data
rows and pages, or perhaps prevent even an entire table from being read by a report. In
such an environment, you are bound to see blocking locks. Although there are ways to
avoid blocking (please see my earlier article about transactions and locking), it is best to
separate data entry and reporting databases. Transactional replication works well by
delivering data changes from the data entry server to the reporting server.

1.2 Distributing Load Across Servers
As your organization grows, you might find yourself in a situation in which a single
database server is utilized by too many users. If CPU utilization on your database servers
is constantly over 80 percent and you have tuned database design and queries
appropriately, chances are you could benefit by spreading the user base over multiple
servers. For instance, a server named South could serve all employees working in the
southern United States, and a server called North could serve all Northerners. If you need
to combine all data for reporting, you could use replication to move transactions from
North and South to a server named Central_Reporting.

1.3 Providing High Availability
Occasionally, you might consider using replication for high availability; that is, to
replicate transactions from the main server to a standby server. If the main server fails,
you can then point your data sources to the standby server. Be aware that using
replication for high availability takes careful planning and testing. Replication does not
provide any sort of automatic fail-over. SQL Server supports other methods of providing
high availability, such as clustering and log-shipping, which might be more appropriate
for your environment.

1.4 Transporting Data
Another common use for replication is to simply move data changes from publishers to
subscribers. This method is particularly useful for moving transactional data to a data
warehousing server, in which it is transformed and aggregated for OLAP reporting. SQL
Server provides other ways of transporting data: DTS, BCP, BULK INSERT statements,
and others. Be sure to carefully consider the alternatives before implementing replication
because other solutions might be cheaper or even faster than replication.



2 Why and Why not Replication
2.1 Why Use Database Replication?
Imagine that a client has asked you to develop a contact-management solution that the
company's field sales staff can use to monitor sales and orders. Each sales representative
has a laptop computer that can be connected to the company's network.
A traditional approach to building this solution is to separate the tables from the other
objects in the database so that the data can reside in a back-end database on a network
server, or on the Internet or an intranet, while the queries, forms, reports, macros, and
modules reside in a separate front-end database on the user's computer. The objects in the
front-end database are based on tables that are linked to the back-end database. When
sales representatives want to retrieve or update information in the database, they use the
front-end database.
Database replication enables you to take a new approach to building this solution by
creating a single database that contains both the data and objects, and then making
replicas of the database for each sales representative. You can make replicas for each user
and synchronize each replica with the Design Master on a network server. Sales
representatives update the replicas on their computers during the course of a work
session, and users synchronize their replicas with the Design Master on the server as
needed.
In addition, you can choose to replicate only a portion of the data in the Design Master,
and you can replicate different portions for different users by creating partial replicas. In
the scenario involving sales representatives who use replica databases, each individual
salesperson typically needs only the sales data related to his or her own territory.
Replicating all sales data for all sales representatives would involve unnecessary
processing and duplication of data. By using partial replicas, you can duplicate only the
data that each salesperson actually needs. A complete set of data is still contained in the
Design Master, but each replica handles only a subset of that data.
2.2 When Database Replication Should Not Be Used?
Although database replication can solve many of the problems inherent in distributed-
database processing, it is important to recognize that there are situations in which
replication is less than ideal. You may not want to use replication if:

2.2.1 There are large numbers of record updates at multiple replicas.
Solutions that require frequent updates of existing records in different replicas are likely
to have more record conflicts than solutions that simply insert new records in a database.
Record conflicts occur when any changes are made to the same record by users at
different locations at the same time. Solutions with many record conflicts require more
administrative time because the conflicts must be resolved manually. This is true even if
different fields are updated within the same record.

2.2.2 Data consistency is critical at all times.
Solutions that rely on information being correct at all times, such as funds transfers,
airline reservations, and the tracking of package shipments, usually use a transaction
method. Although transactions can be processed within a replica, there is no support for
processing transactions across replicas. The information exchanged between replicas
during synchronization is the result of the transaction, not the transaction itself.



3 Solution points:

   •   As consolidation of all ships data to central database is primary objective, so
       general case supports implementation as replication.

   •   With reference to point 2.2.1, as all ships have separate records of data of
       checklist, so we don’t have multiple updates of same record by different replicas.
       So we are on safe side for replication.

   •   With reference to point 2.2.2, as we don’t have data consistency issues with data,
       as logically data from different ships don’t have relationship between them.

   •   Point under query is, “Is data really worth transferring via replication?” or simple
       Import or export via XML file and transfer by ftp will serve the purpose. Volume
       of data and frequency of data transfer will be a deciding factor.



References:
         Microsoft MSDN
         Google
Software architecture   case study - why and why not sql server replication

More Related Content

PPTX
Lect 07 data replication
PDF
netezza-pdf
PPTX
Lect 08 materialized view
DOC
Case Study For Replication For PCMS
PDF
Performance tuning and optimization (ppt)
PPT
Understanding System Performance
PDF
Updating and Scheduling of Streaming Web Services in Data Warehouses
PDF
Working with informtiaca teradata parallel transporter
Lect 07 data replication
netezza-pdf
Lect 08 materialized view
Case Study For Replication For PCMS
Performance tuning and optimization (ppt)
Understanding System Performance
Updating and Scheduling of Streaming Web Services in Data Warehouses
Working with informtiaca teradata parallel transporter

What's hot (20)

PPTX
SQL Server Database Backup and Restore Plan
PPTX
Database management system
PDF
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
PDF
Queues, Pools and Caches paper
PPT
Module 02 teradata basics
PPTX
Capacity Management of an ETL System
PDF
Backing up Microsoft Great Plains / Microsoft Dynamics GP
PPTX
Backup and recovery in sql server database
PDF
A memory capacity model for high performing data-filtering applications in Sa...
PDF
How to boost performance of your rails app using dynamo db and memcached
PDF
Data base management system
PPT
Lecture 03 - The Data Warehouse and Design
PPT
Teradata a z
PPTX
Sql Server tips from the field
PPTX
Parallel processing in data warehousing and big data
PPT
Database backup and recovery basics
PDF
5 Scenarios: When To Use & When Not to Use Hadoop
DOCX
group project
PPTX
PDF
Divide & Conquer Reporting By Scaling Out with Replication
SQL Server Database Backup and Restore Plan
Database management system
IRJET - The 3-Level Database Architectural Design for OLAP and OLTP Ops
Queues, Pools and Caches paper
Module 02 teradata basics
Capacity Management of an ETL System
Backing up Microsoft Great Plains / Microsoft Dynamics GP
Backup and recovery in sql server database
A memory capacity model for high performing data-filtering applications in Sa...
How to boost performance of your rails app using dynamo db and memcached
Data base management system
Lecture 03 - The Data Warehouse and Design
Teradata a z
Sql Server tips from the field
Parallel processing in data warehousing and big data
Database backup and recovery basics
5 Scenarios: When To Use & When Not to Use Hadoop
group project
Divide & Conquer Reporting By Scaling Out with Replication
Ad

Viewers also liked (20)

DOC
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
DOC
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
DOC
Whitepaper To Study Filestream Option In Sql Server
PPT
Bond Case Study
PPT
Mitochondrial Replacement Case Study Part 2
PDF
Searching for Configurations in Clone Evaluation: A Replication Study [SSBSE'16]
PDF
Atp and mitochondria
PPTX
Sickle-Cell Anemia Case Study
PPTX
Case study
ODP
Bio lab case 2
PPT
DNA REPLICATION
PPTX
Sickle cell anemia
PPT
Biochemistry Honors
PPTX
Organelles & Diseases Related
PPTX
Biology case study #4
PPTX
State v. Mott: A Case Study in Forensic Science
PPTX
Case study #3
PPTX
Case 1
PPT
PPTX
Chloroplast dna
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
Software architecture to analyze licensing needs for pcms- pegasus cargo ma...
Whitepaper To Study Filestream Option In Sql Server
Bond Case Study
Mitochondrial Replacement Case Study Part 2
Searching for Configurations in Clone Evaluation: A Replication Study [SSBSE'16]
Atp and mitochondria
Sickle-Cell Anemia Case Study
Case study
Bio lab case 2
DNA REPLICATION
Sickle cell anemia
Biochemistry Honors
Organelles & Diseases Related
Biology case study #4
State v. Mott: A Case Study in Forensic Science
Case study #3
Case 1
Chloroplast dna
Ad

Similar to Software architecture case study - why and why not sql server replication (20)

PDF
Data warehousing change in a challenging environment
PDF
PDF
Migration to Oracle 12c Made Easy Using Replication Technology
PPTX
U1-NOSQL.pptx DIFFERENT TYPES OF NOSQL DATABASES
DOC
Informatica and datawarehouse Material
DOC
Data warehouse concepts
PPT
Building High Performance MySQL Query Systems and Analytic Applications
PPT
Building High Performance MySql Query Systems And Analytic Applications
PDF
EOUG95 - Client Server Very Large Databases - Paper
PDF
The technology of the business data lake
PDF
Database Concepts 6th Edition Kroenke Solutions Manual
PPT
Data Warehouse
PPTX
Fundamentals of DBMS
PDF
Scale from zero to millions of users.pdf
PDF
Clifford Sugerman
PDF
Clifford sugerman
PDF
Database Concepts 7th Edition Kroenke Solutions Manual
DOC
Dwh faqs
PPTX
Database management system
PDF
Mocca International GmbH _Q500 analysis and Recommendations_Final
Data warehousing change in a challenging environment
Migration to Oracle 12c Made Easy Using Replication Technology
U1-NOSQL.pptx DIFFERENT TYPES OF NOSQL DATABASES
Informatica and datawarehouse Material
Data warehouse concepts
Building High Performance MySQL Query Systems and Analytic Applications
Building High Performance MySql Query Systems And Analytic Applications
EOUG95 - Client Server Very Large Databases - Paper
The technology of the business data lake
Database Concepts 6th Edition Kroenke Solutions Manual
Data Warehouse
Fundamentals of DBMS
Scale from zero to millions of users.pdf
Clifford Sugerman
Clifford sugerman
Database Concepts 7th Edition Kroenke Solutions Manual
Dwh faqs
Database management system
Mocca International GmbH _Q500 analysis and Recommendations_Final

More from Shahzad (20)

DOC
Srs sso-version-1.2-stable version-0
DOCX
Srs sso-version-1.2-stable version
DOCX
Exploration note - none windows based authentication for WCF
DOCX
To study pcms pegasus erp cargo management system-release-7 from architectu...
DOCX
To study pcms pegasus erp cargo management system-release-6 from architectu...
PPT
Pakistan management
PPS
Corporate lessons
DOC
What is future of web with reference to html5 will it devalue current present...
DOC
A cross referenced whitepaper on cloud computing
PPT
Software Architecture New Features of Visual Studio 2010 / .Net 4.0 - Part 1...
PPT
From Windows Presentation Foundation To Silverlight
DOC
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
DOC
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
DOC
To Analyze Cargo Loading Optimization Algorithm
DOC
DOC
White Paper On ConCurrency For PCMS Application Architecture
PPT
Data Structure In C#
DOC
Software Bugs A Software Architect Point Of View
PPT
Design Pattern For C# Part 1
PPT
UML- Unified Modeling Language
Srs sso-version-1.2-stable version-0
Srs sso-version-1.2-stable version
Exploration note - none windows based authentication for WCF
To study pcms pegasus erp cargo management system-release-7 from architectu...
To study pcms pegasus erp cargo management system-release-6 from architectu...
Pakistan management
Corporate lessons
What is future of web with reference to html5 will it devalue current present...
A cross referenced whitepaper on cloud computing
Software Architecture New Features of Visual Studio 2010 / .Net 4.0 - Part 1...
From Windows Presentation Foundation To Silverlight
To Study The Tips Tricks Guidelines Related To Performance Tuning For N Hib...
To Study E T L ( Extract, Transform, Load) Tools Specially S Q L Server I...
To Analyze Cargo Loading Optimization Algorithm
White Paper On ConCurrency For PCMS Application Architecture
Data Structure In C#
Software Bugs A Software Architect Point Of View
Design Pattern For C# Part 1
UML- Unified Modeling Language

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PPTX
Cloud computing and distributed systems.
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
NewMind AI Monthly Chronicles - July 2025
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
Cloud computing and distributed systems.
Unlocking AI with Model Context Protocol (MCP)
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
NewMind AI Monthly Chronicles - July 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Software architecture case study - why and why not sql server replication

  • 1. Cases Study Related To Replication By: Shahzad Sarwar To: Dubai Office Dated: 7th June 2010
  • 2. Problem Definition: Ships of shipping companies move around in sea, which have a system where check list (as Questions/answer) are supposed to be saved. These check list identify the health, safety and operational status of ship and its different components. On regular intervals, these checklists are filled in ships. There will be one centralized server, where data of these check lists from different ships will be pushed. So central server will have consolidated view of data from all the ships moving in the Sea. Solutions: Lets first analyze what are the objective of replication, Why to use and Why to not use replication in eyes of MSDN-the most valid source of information. 1 Objectives of Replication: Replication can be used effectively for many different purposes, as discussed in the following sections. 1.1 Separating Data Entry and Reporting If you have worked in an environment in which the same database is used for data entry and reporting, you probably know that things aren't always rosy. Constantly reading and modifying data in the same set of tables just doesn't work very well if you care about data integrity. Transactions that run against a set of tables prevent reading the locked data rows and pages, or perhaps prevent even an entire table from being read by a report. In such an environment, you are bound to see blocking locks. Although there are ways to avoid blocking (please see my earlier article about transactions and locking), it is best to separate data entry and reporting databases. Transactional replication works well by delivering data changes from the data entry server to the reporting server. 1.2 Distributing Load Across Servers As your organization grows, you might find yourself in a situation in which a single database server is utilized by too many users. If CPU utilization on your database servers is constantly over 80 percent and you have tuned database design and queries appropriately, chances are you could benefit by spreading the user base over multiple servers. For instance, a server named South could serve all employees working in the southern United States, and a server called North could serve all Northerners. If you need to combine all data for reporting, you could use replication to move transactions from North and South to a server named Central_Reporting. 1.3 Providing High Availability Occasionally, you might consider using replication for high availability; that is, to replicate transactions from the main server to a standby server. If the main server fails, you can then point your data sources to the standby server. Be aware that using
  • 3. replication for high availability takes careful planning and testing. Replication does not provide any sort of automatic fail-over. SQL Server supports other methods of providing high availability, such as clustering and log-shipping, which might be more appropriate for your environment. 1.4 Transporting Data Another common use for replication is to simply move data changes from publishers to subscribers. This method is particularly useful for moving transactional data to a data warehousing server, in which it is transformed and aggregated for OLAP reporting. SQL Server provides other ways of transporting data: DTS, BCP, BULK INSERT statements, and others. Be sure to carefully consider the alternatives before implementing replication because other solutions might be cheaper or even faster than replication. 2 Why and Why not Replication 2.1 Why Use Database Replication? Imagine that a client has asked you to develop a contact-management solution that the company's field sales staff can use to monitor sales and orders. Each sales representative has a laptop computer that can be connected to the company's network. A traditional approach to building this solution is to separate the tables from the other objects in the database so that the data can reside in a back-end database on a network server, or on the Internet or an intranet, while the queries, forms, reports, macros, and modules reside in a separate front-end database on the user's computer. The objects in the front-end database are based on tables that are linked to the back-end database. When sales representatives want to retrieve or update information in the database, they use the front-end database. Database replication enables you to take a new approach to building this solution by creating a single database that contains both the data and objects, and then making replicas of the database for each sales representative. You can make replicas for each user and synchronize each replica with the Design Master on a network server. Sales representatives update the replicas on their computers during the course of a work session, and users synchronize their replicas with the Design Master on the server as needed. In addition, you can choose to replicate only a portion of the data in the Design Master, and you can replicate different portions for different users by creating partial replicas. In the scenario involving sales representatives who use replica databases, each individual salesperson typically needs only the sales data related to his or her own territory. Replicating all sales data for all sales representatives would involve unnecessary processing and duplication of data. By using partial replicas, you can duplicate only the data that each salesperson actually needs. A complete set of data is still contained in the Design Master, but each replica handles only a subset of that data.
  • 4. 2.2 When Database Replication Should Not Be Used? Although database replication can solve many of the problems inherent in distributed- database processing, it is important to recognize that there are situations in which replication is less than ideal. You may not want to use replication if: 2.2.1 There are large numbers of record updates at multiple replicas. Solutions that require frequent updates of existing records in different replicas are likely to have more record conflicts than solutions that simply insert new records in a database. Record conflicts occur when any changes are made to the same record by users at different locations at the same time. Solutions with many record conflicts require more administrative time because the conflicts must be resolved manually. This is true even if different fields are updated within the same record. 2.2.2 Data consistency is critical at all times. Solutions that rely on information being correct at all times, such as funds transfers, airline reservations, and the tracking of package shipments, usually use a transaction method. Although transactions can be processed within a replica, there is no support for processing transactions across replicas. The information exchanged between replicas during synchronization is the result of the transaction, not the transaction itself. 3 Solution points: • As consolidation of all ships data to central database is primary objective, so general case supports implementation as replication. • With reference to point 2.2.1, as all ships have separate records of data of checklist, so we don’t have multiple updates of same record by different replicas. So we are on safe side for replication. • With reference to point 2.2.2, as we don’t have data consistency issues with data, as logically data from different ships don’t have relationship between them. • Point under query is, “Is data really worth transferring via replication?” or simple Import or export via XML file and transfer by ftp will serve the purpose. Volume of data and frequency of data transfer will be a deciding factor. References: Microsoft MSDN Google