Relational Database Schema

A relational database schema `S` means all the following:

Note that an empty set of relvars is possible and it means the database records no information. In that case `C(S)` equals DEE and its cardinality is 1 (there is just one possible database value).

Schema as possrep of a database type

In order to supported nested relational databases we regard a relational database schema as a possrep defining a type (a dbtype).

The relvars of the schema are the possrep components. The database schema constraint is the possrep constraint.

A value of a dbtype is called a dbvalue. A variable of a dbtype is called a dbvar.

Using a database value to represent a value of some data type

Perhaps every possrep can be regarded as a database schema!

Consider a representation of a circle value involving its radius and centre. These components of the possrep can be regarded as relvars that have relvar predicates:

Formula Predicate
radius(R) the radius of the circle is R
centre(C) the centre of the circle is C

There is a good motive for doing this, we'd like to maximise the use of logic in the system.