<aside> 💡 Schema - the schema of a relations
</aside>
Example:
*Key: key of each relation (underline the attributes)
PatentId | InventorId |
---|---|
P1 | I1 |
P1 | I2 |
P1 | I3 |
INVENTOR Table
InventorId | Surname | GivenName | BirthDate | RegionId |
---|---|---|---|---|
I1 | ABC | KIL | 01/01/1980 | R1 |
I2 | DEF | HGF | 01/01/1981 | R2 |
I3 | GHJ | ASF | NULL | R3 |
Given a relation $R$ there is a F.K. constraint between a set of attributes $X$ of $R$ and another relation $R_2$ iff for each value of $X$, if it is not null, it must be be present as Primary Key value of $R_2$
https://lucid.app/lucidchart/9eba670a-afb9-425c-b510-2efa3ed9a93c/edit?viewport_loc=-50%2C-139%2C1380%2C1005%2CAIzjl5sbotl7&invitationId=inv_d44f8185-3eeb-48f5-8bbb-533d75796ed8
Language to extract data from a DB