- database schema or simply schema, C is a pair C:=(G,≃), where G is a graph (V,A,src,tgt) and ≃ is a congruence on G
📑 instance
- given a database schema C=(G,≃), an instance on C is a bunch of tables whose data conform to the specified layout
- G=(V,A,src,tgt)
- denote (PK,FK):C→Set
- consituents:
- A: primary ID part
- a function PK:V→Set, sending each vertex v∈V to a set PK(v)
- B: foreign ID part
- for every arrow a∈A where v=src(a)∈V and w=tgt(a)∈V, a function FK(a):PK(v)→PK(w)
- each foreign key relation is a function that maps primary key values in one table to the primary key in another table
- A: primary ID part
- laws: preservation of congruence
- …
- the congruence (declared on the paths on graph) is preserved
- consituents: