Database dump

from Wikipedia, the free encyclopedia

Partial or entire extracts from a database are referred to as database dump ( dump = English for extract ). Such extracts are created for data backup or porting of the database.

A database dump can also only contain the structure of the database without data. Such a copy of the database is z. B. used to transfer the developments of a project from a test database to a productive database.

The form of such an extract differs depending on the application. The product can be a compressed file for a data backup or a list of SQL commands.

The advantage here is the independence of the data. Via a dump, the data can easily be copied back into the database across different versions; porting to another database system is also possible.

Extract of a MySQL dump

#
# Table structure for table test222
#
CREATE TABLE 'test222' (
'Id' int(6) unsigned NOT NULL auto_increment,
'inhalt' varchar(255) default NULL,
PRIMARY KEY ('Id')
) TYPE=MyISAM;
#
# Dumping data for table test222
#
INSERT INTO 'test222' VALUES (1,'Zeile1');
INSERT INTO 'test222' VALUES (2,'Zeile2');

Here a table is filled with two lines. The dump can therefore be read by various SQL-based databases. It was created for MySQL.

advantages

disadvantage

  • Large dumps (large files)