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:

  • Database Replication
    "Database replication is a process of synchronization in which data added to one database is automatically copied to the other. Replication should not be…"
  • Foreign Key
    "Foreign key is a field in a “child” table of a database that is used to refer to a record in a “parent” table of the same database. For example, if there…"
  • Oracle VSS Writer Service
    "VSS Writer Service is an addition to Windows Volume Shadow Copying Service (VSS) provided by an Oracle API, to allow access to open Oracle databases. Having…"


Backup Terms Glossary

Who uses Handy Backup?