Vault sync: 2021-10-25 17:11:26
This commit is contained in:
parent
0f8042c145
commit
82e4323af3
6
.obsidian/workspace
vendored
6
.obsidian/workspace
vendored
@ -9,7 +9,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "School/Development/Primary Key.md",
|
"file": "School/Development/Foreign Key.md",
|
||||||
"mode": "source"
|
"mode": "source"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "School/Development/Primary Key.md",
|
"file": "School/Development/Foreign Key.md",
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -87,8 +87,8 @@
|
|||||||
},
|
},
|
||||||
"active": "bc6e8ad9aa0f44c3",
|
"active": "bc6e8ad9aa0f44c3",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
"School/Development/Primary Key.md",
|
|
||||||
"School/Development/Foreign Key.md",
|
"School/Development/Foreign Key.md",
|
||||||
|
"School/Development/Primary Key.md",
|
||||||
"School/Development/SQL Database.md",
|
"School/Development/SQL Database.md",
|
||||||
"School/Analyse/OSI Model.md",
|
"School/Analyse/OSI Model.md",
|
||||||
"School/Analyse/Images/OSI-model.png",
|
"School/Analyse/Images/OSI-model.png",
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# Foreign Key
|
# 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).
|
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.
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user