1) In cryptography, a key is a variable value that is applied using an algorithm to a string or block of unencrypted text to produce encrypted text, or to decrypt encrypted text. The length of the key is a factor in considering how difficult it will be to decrypt the text in a given message.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
2) In a database context, a key is a field that is selected for sorting. A primary key is a key that is unique for each record and is, as such, used to access that record; a foreign key is one that targets a primary key in another table.