# Database: Fields: Keys

Keys are what connect tables. Relational database systems got along for almost 20 years quite well without the PRIMARY and FOREIGN key declarations. MySQL is an example of a popular database that ignored primary and foreign key declarations until recent versions. So why were they added to SQL2, and what can they enable a database to do that can't be done without them?

- They provide useful documentation to humans.
- They allow QBE systems to automatically generate queries.
- They allow enforcing referential integrity.