Database dump
Encyclopedia
For information on obtaining the Wikipedia database, see Wikipedia:Database download.

A database dump contains a record of the table
Table (database)
In relational databases and flat file databases, a table is a set of data elements that is organized using a model of vertical columns and horizontal rows. A table has a specified number of columns, but can have any number of rows...

 structure and/or the data from a database
Database
A database is an organized collection of data for one or more purposes, usually in digital form. The data are typically organized to model relevant aspects of reality , in a way that supports processes requiring this information...

 and is usually in the form of a list of SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....

 statements. A database dump is most often used for backing up
Backup
In information technology, a backup or the process of backing up is making copies of data which may be used to restore the original after a data loss event. The verb form is back up in two words, whereas the noun is backup....

 a database so that its contents can be restored in the event of data loss
Data loss
Data loss is an error condition in information systems in which information is destroyed by failures or neglect in storage, transmission, or processing. Information systems implement backup and disaster recovery equipment and processes to prevent data loss or restore lost data.Data loss is...

. Corrupted
Data corruption
Data corruption refers to errors in computer data that occur during writing, reading, storage, transmission, or processing, which introduce unintended changes to the original data...

 databases can often be recovered by analysis of the dump. Database dumps are often published by free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 and free content
Free content
Free content, or free information, is any kind of functional work, artwork, or other creative content that meets the definition of a free cultural work...

 projects, to allow reuse or forking
Fork (software development)
In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software...

 of the database.

Example


-- Database
CREATE DATABASE 'example';
USE 'example';

-- Table structure for table 'users'
CREATE TABLE 'users' (
'id' int(8) unsigned NOT NULL AUTO_INCREMENT,
'username' varchar(16) NOT NULL,
'password' varchar(16) NOT NULL,
PRIMARY KEY ('id')
);

-- Data for table 'users'
INSERT INTO 'users' VALUES (1,'alice','secret'),(2,'bob','secret');

External links

  • mysqldump — A Database Backup Program
  • PostgreSQL dump backup methods, for PostgreSQL
    PostgreSQL
    PostgreSQL, often simply Postgres, is an object-relational database management system available for many platforms including Linux, FreeBSD, Solaris, MS Windows and Mac OS X. It is released under the PostgreSQL License, which is an MIT-style license, and is thus free and open source software...

    databases.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK