Data{a: A, b: B, c: C, ... }::=Finite_sets( $ Net{a: A, b: B, c: C, ... } ),
or in tabular form using either ASCII (P1 below) or HTML tables (P2 below).
---------------------
name number
---------------------
John Doe 714-123-5678
John Doe 3678
Joan Roe 714-123-5878
Joan Roe 3878
---------------------
| name | number |
|---|---|
| John Doe | 714-123-5678 |
| John Doe | 3678 |
| Joan Roe | 714-123-5878 |
| Joan Roe | 3878 |
. . . . . . . . . ( end of section Example) <<Contents | End>>
$ Net{a1: A1, b1: B1,...W1(a1,b1...)}and $ Net{a2: A2, b2: B2,...W2(a2,b2...)} = $ Net{a1: A1, b1: B1,...a2: A2, b2: B2...(W1(a,b...) and W2(a2,b2...))}.
$ Net{A, B, C, ...W1}&$ Net{A, B, C, ...W2} = $ Net{A, B, C, ... W1 and W2}.
$ Net{A, B, C, ...W1}|$ Net{A, B, C, ...W2} = $ Net{A, B, C, ... W1 or W2}.
An Entity Type is a set of structures with a specified key:
This kind of class is more general those used in object-oriented languages. encapsulated dynamics. It is essentially a set of all possible static snapshots of an object. However the use of general documentation to define ENTITY implies that inheritance is possible because documents can inherit structures and properties form each other. Documentation also always the statement of properties that are invariant over the life time of an object of that class. This tends to be related to the possible dynamics of the object with out giving clues as to how it will be implemented.
Example of Entities and classes
----------------------------------------
Name type number
----------------------------------------
"John Doe" home "714-123-5678"
"John Doe" work "3678"
"Joan Roe" home "714-123-5878"
"Joan Roe" work "3878"
-----------------------------------------The above indicates the more formal description
Primary Keys
We can define relationships by documenting the primary keys and the other attributes:
Notice that since|-X in ids(X), it follows |- for all D ( @D = @^D). Thus all sets of n-tpls are tables with identifying columns.
Another form of redundancy occurs when partial information about elements in a set permits the deduction of other parts of the set. Suppose that R is a set and p:R->P and q: R->Q with the properties that
In general if we have an arrow a: { ->, <>->, ...) we symbolize by (R) p a qthe fact that R defines a relation p(R) a q(R). By @(R)p a q we indicate the set of subrelations of R with that particular reduncancy:
If (R)p->q and p is not in ids(R) then part of the structure of the problem is hidden inside R and will tend to cause problems when changes made to R. Normalisation separates out these dependancies into separate relations.
When there are two disjoint subsets of variables (p and q say) in a structure N and for all R:@N we know that the values of p determine the values of q then we say that q is functionally dependant on p.
Example of Functional Dependency
P={(name=>"John Doe",type=> home, number=>"714-123-5678"),
----------------------------------------
Name type number
----------------------------------------
"John Doe" home "714-123-5678"
"John Doe" work "3678"
"Joan Roe" home "714-123-5878"
"Joan Roe" work "3878"
-----------------------------------------
In general for all phones:phone_books,
PERSON=$ Net{ id: SSN, name: names, address: addresses,...},
A Discriminated union is a useful way to describe a database.
See_Also
The theory of Types
[ types.html ]
How to describe dynamic relationships [ math_14_Dynamics.html ]
The theory of Realtionships [ logic_44_n-aryrelations.html ]
. . . . . . . . . ( end of section Sets of Structures and Data Bases) <<Contents | End>>
. . . . . . . . . ( end of section Acknowledgements) <<Contents | End>>
Notes on MATHS Notation
Special characters are defined in
[ intro_characters.html ]
that also outlines the syntax of expressions and a document.
Proofs follow a natural deduction style that start with assumptions ("Let") and continue to a consequence ("Close Let") and then discard the assumptions and deduce a conclusion. Look here [ Block Structure in logic_25_Proofs ] for more on the structure and rules.
The notation also allows you to create a new network of variables and constraints. A "Net" has a number of variables (including none) and a number of properties (including none) that connect variables. You can give them a name and then reuse them. The schema, formal system, or an elementary piece of documentation starts with "Net" and finishes "End of Net". For more, see [ notn_13_Docn_Syntax.html ] for these ways of defining and reusing pieces of logic and algebra in your documents. A quick example: a circle = Net{radius:Positive Real, center:Point}.
For a complete listing of pages in this part of my site by topic see [ home.html ]
Notes on the Underlying Logic of MATHS
The notation used here is a formal language with syntax
and a semantics described using traditional formal logic
[ logic_0_Intro.html ]
plus sets, functions, relations, and other mathematical extensions.
For a more rigorous description of the standard notations see