Vault sync: 2021-10-25 17:11:26
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# 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).
|
||||
|
||||
For
|
||||
|
||||
## Example
|
||||
|
||||
|ID (PK)|Name|Age|Sex|Length|
|
||||
|-----|-----|-----|-----|-----|
|
||||
|1|Nick|21|M|190|
|
@@ -5,4 +5,8 @@ There can only be ONE primary per table and can consist of multiple attributes (
|
||||
|
||||
A primary key is **not** required, but highly advised. Even if you don't use it its better to include one in your schema.
|
||||
|
||||
## Exaple
|
||||
## Example
|
||||
|
||||
**Name (PK) - Age - Sex - Length**
|
||||
|
||||
In the table schema above, only one entity where the name is Nick can exist because Name is the primary key.
|
||||
|
Reference in New Issue
Block a user