Grammatical relational database model (abstract only)

This work presents a method of verifying normal form constraints on a relational database. The problem under study is related to the study of database semantics by Bernstein and Beeri [1, 2] in which these authors studied normalization of relational schemas and later, algorithmic design of such schemas. Our approach is to formulate the normal forms as a set of Van Wijngaarden grammars (W-grammars).W-grammars (Cleaveland [3]) were developed to be used as a tool in the formal specification of programming languages, in particular, Algol 68. A W-grammar is composed of two sets of rules, meta-productions and hyper-rules. In our work meta-productions are used to generate elements of a relation. These elements are then placed in hyper-rule thus creating the rules that verify the static and dynamic semantics of normal forms. Using where clauses in W-grammar provides an additional method of enforcing relational database semantics [4].The normal forms under consideration are Qualified Normal Form, Third and Fourth Normal Forms. The Qualified Normal Form definition is: A relation R is in QNF iff it is in 1NF and there exist FD,s between its attributes.We have divided the Third Normal Form defined by Date [5] into three categories: Binary, Ternary, Non-Ternary; each of these categories can consist of individual attributes (columns) or combined attributes which are called super attributes. For example, a binary relation can contain two regular attribute or two super attributes. Using the binary, ternary, or non-ternary categories, the Third Normal Form has been formulated as a W-grammar. Using the Fourth Normal Form definition described by Ullman [6] and by Maier [7], a W-grammar formulation of 4NF can be given.These W-grammars are used to enforce the static and dynamic semantics of normal forms through the preservation of functional dependencies. The static W-grammar models the attribute level and the relations between attributes in normal forms. The dynamic W-grammars represent not only the attribute level and the relation between them but also consider the tuples of the relation and the relation of the elements of the tuples to one another. It is useful in the dynamic case to think of the attributes and their relationships forming a program and the tuples forming the data upon which the 'program' operates. It may be seen that given the appropriate W-grammar, static and dynamic semantics of the normal forms mentioned above can be verified.The most important result of our work is the discovery that for the particular W-grammars considered, parsers may be found that are essentially LR(1). (See for example Aho and Ullman [8] for a comprehensive theory of LR parsing.) This is not totally surprising since similar results have been obtained elsewhere in connection with a syntactic theory of data structures (Mejstrick [9]). This result comes about because, by means of a transformation, the original W-grammar with its attendant where clauses is mapped to an LR(1) grammar with an augmented terminal alphabet. The new terminal symbols call for further lexical processing with an added time complexity of 0(n) where n is the size of the augmented alphabet. The transformed grammar presents some interesting lexical analysis problems. Their solution requires two types of token recognizers, the in-string token recognizer and the out-string recognizer. For EX: given an input string *letter r1 symbol, 1br symbol, attribute al$ The in-string recognizer delineates the small segments of the string by moving the 'dot mark' from the beginning to the end of the segment string. These small segment strings are strings which are bound at one end or the other by commas. The out-string token recognizer will move the dot mark by using the results of the in-string recognizer thus recognizing the entire input string.Our investigations may lead to a method which would allow a database administrator to test the correctness of a proposed schema without possessing a deep knowledge of database theory.