- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Surrogate Key in RDBMS
A Surrogate Key’s only purpose is to be a unique identifier in a database, for example, incremental key, GUID, etc. It has
Surrogate Key has no actual meaning and is used to represent existence. It has an existence only for data analysis.
Example
<ProductPrice>
Key | ProductID | Price |
505_92 | 1987 | 200 |
698_56 | 1256 | 170 |
304_57 | 1898 | 250 |
458_66 | 1666 | 110 |
Above, the surrogate key is Key in the <ProductPrice> table.
Other Examples
Some other examples of a Surrogate Key −
- Counter can also be shown as Surrogate Key.
- System date/time stamp
- Random alphanumeric string.
Advertisements