Primary Key

Primary key is a characteristic of values stored in a database table that allows using these values to uniquely address records to which they belong. If a column of a database is marked as a primary key, the database management system will prevent any clients from inserting or modifying records in a way that creates more than one unique primary key. A table may have several unique fields, but only one of them can be declared the primary key.

Real-world example of a primary key is a driver’s license number: it is associated with a specific person, cannot be shared with anybody, and you can use it to identify the person. Another example is a number of a row in a table: it is automatically incremented for each new record and can be used to uniquely identify it.

Values stored in database tables are used to describe objects and business logic of applications that work with the database. Primary keys can be used to refer to these objects: they are usually generated when the object is created, and remain unchanged until the object is destroyed.

Each table uses a storage engine provided by the database management software. Storage engines have different features and different response times: for example, the InnoDB engine in MySQL has full support for transactions, but is slower than MyISAM which is not transaction-safe. When developing a database-based application it is important to consider how its objects will be stored, synchronized and backed up.

With Handy Backup you can back up and restore different databases independently of the storage engine. For example, the MySQL Backup plug-in lets you perform hot backup of a MySQL database that can be done without stopping the server.

Learn more:

  • MariaDB Database Engine - a Successor of MySQL
    "MariaDB database engine, created by former MySQL creator Monty Widenius. Called for Monty’s daughter name, Maria ("My" in "MySQL" is for My, Monty’s son),…"
  • Logical Backup
    "Logical backup is a copy of objects used in an application (e.g. database tables), that is made by accessing them through the application’s interfaces.…"
  • MySQL Master Server
    "MySQL Slave Server is a server configured for MySQL replication. It constantly monitors and replicates all changes made to the database on the Master Server.…"

Backup Terms Glossary

Who uses Handy Backup?