
- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
Foreign Key in RDBMS
A Foreign Key creates a link between tables. It references the primary key in another table and links it.
For example, the DeptID in the Employee table is a foreign key −
<Employee>
EmpID | EmpName | EmpAge | DeptID |
<Department>
DeptID | DeptName | DeptZone |
The DeptID in the Department table is a Primary Key in the Department Table.
The DeptID in the Employee table is a Foreign Key in the Employee Table.
The below figure represents the same −
Above, you can see our two tables. The Foreign Key of the Employee table is the Primary Key of the Department table.
- Related Articles
- Composite Key in RDBMS
- Secondary Key in RDBMS
- Super Key in RDBMS
- Surrogate Key in RDBMS
- Candidate Key in RDBMS
- Alternate Key in RDBMS
- Unique Key in RDBMS
- Difference between Primary key and Foreign key in Database
- Difference Between Primary key and Foreign key in DBMS
- Difference between Primary key and Foreign key in SQL Database
- MySQL Syntax to create Foreign Key?
- How to identify foreign key in MySQL DB?
- Foreign key referencing of two DB2 tables
- Get a list of Foreign Key constraints in MySQL
- How to use Primary Key Constraints and Foreign Key Constraints to enforce database integrity in Oracle?

Advertisements