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:

  • 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.…"
  • Shared-Nothing Architecture
    "Shared-nothing architecture (SNA) is a pattern used in distributing computing in which a system is based on multiple self-sufficient nodes that have their…"
  • Database Dump
    "Database dump is a text file containing a set of SQL statements that need to be run on an SQL server to create a database with the entire internal structure…"


Backup Terms Glossary

Who uses Handy Backup?