notes/School/Development/Foreign Key.md

12 lines
358 B
Markdown

# Foreign Key
A Foreign key is a [[Constraint]] that protects links between tables. Foreign key is a attribute or attributes that link to the [[Primary Key]] of a other entity set (table).
## Example
|ID (PK)|Name|Age|Sex|Length|
|-----|-----|-----|-----|-----|
|1|Nick|21|M|190|
|ID (PK)||Age|Sex|Length|
|-----|-----|-----|-----|-----|
|1|Nick|21|M|190|