Schema

<aside> 💡 Schema - the schema of a relations

</aside>

Example:

  1. PATENT (PatentId, Title, Abstract, Category, Date)
  2. REGION (RegionId, RegionName, Country)
  3. INVENTOR (InventorId, Surname, GivenName, BirthDate, RegionId)
  4. PATENT-INVENTOR (PatentId, InventorId) → b/c a pattern can be invented by multiple inventor

*Key: key of each relation (underline the attributes)

PATENT-INVENTOR Schema

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

Inter Relational Constraint / Foreign Constrain / Reference Constraint

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

Query Language

Language to extract data from a DB