we use sql server as database with our programs but we want to have a backup for 10,15 of our critical tables so that if server with database crashes we can have those tables in a file on our local server.
I am confused on what to use to store that data . XML , JSON or any other format . I need some advice . Thank You
Well, XML allows you to store data in the format of open tag/close tag, attributes, etc. Pretty much what you see on a typical HTML file it’s a good example of an XML File. So, you could generate something like this for store table definitions:
and something like this for storing records:
On the other hand you have JSON. Unlike XML, JSON’s primary used if for serializing and data between client and server, different applications, etc. Here’s an example:
(This example’s been taken from W3School).
So, it’s clear to me that if you want to export your database into a plain-text format, XML would be the best choice. You could find other alternatives, like writing your own format, but XML is the widest choice, since it’s simple, easy to read and there’s a lot of libraries that can help you out exporting and importing your data.