You are here:

C#/Algorithms for Database Backup and Restore Programs

Advertisement


Question
QUESTION: Dear Murat

http://en.wikipedia.org/wiki/Relational_database_management_system‎

There are Database Backup and restore utilities for RDBMS Systems.
The Backup program generates a (.Bak) Binary File as output which can later be restored in case the Database crashes.

What could be the Algorithm/s in database backup/s and restore programs ?. i.e. C/C++/C# Programming logic/Algorithm.

Awaiting your reply,

Thanks & Regards,
Prashant S Akerkar

ANSWER: Hi there,

Most utilities are simply using sql commands to backup the database files. You can execute commands like "Backup Database" and "Restore Database" to achieve this (Talking about Microsoft SQL Server). Every rdbms has it's own backup and restore methods and these are mostly executable through command-line. So the best way would be preparing the command-line arguments and simply run inside your application. For example in MSSQL, you would run sqlcmd.exe with prepared arguments to create a backup or restore.

Hope that helps,

Murat

---------- FOLLOW-UP ----------

QUESTION: Dear Murat

Thank you.

I would like to know the programming logic / algorithm for the Database backup and Database Restore program. i.e. pseudo code.

http://en.wikipedia.org/wiki/Pseudocode‎

Awaiting your reply,

Thanks & Regards,
Prashant S Akerkar

Answer
Hi back,

Here are the detailed methods of backup and restore for SQL Server, which they used directly assemblies and not command-line:
CodeProject.com

Hope that helps,

Murat

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Murat Mehmet

Expertise

I can help with questions about desktop and web programming in C#, including SOAP, XML, database managing, custom controls, security etc.

Experience

I have been developing web and especially desktop applications in C# and VB.Net for almost 5 years. My programming life has begun with VB6 long time ago, so its about 8 years that I am in this business.

Organizations
Was in R & D for 2 years in a popular Turkish technology website: cyber-warrior.com

Education/Credentials
2011 Computer Engineering graduation in University of Trakia in Turkey.

©2016 About.com. All rights reserved.