Computer Science Workbench Editor: Tosiyasu L. Kunii
H. Kitagawa T.L. Kunii The U nnortnalized Relational Data Model F or Office Form Processor Design With 78 Figures Springer-Verlag Tokyo Berlin Heidelberg New York London Paris Hong Kong
HIROYUKI KITAGAWA Assistant Professor Institute of Information Sciences and Electronics University of Tsukuba 1-1-1 Tennodai, Tsukuba Ibaraki, 305 Japan TOSIYASU L. KUNII Professor and Chairman Department of Information Science Faculty of Science The University of Tokyo 7-3-1 Hongo, Bunkyo-ku Tokyo, 113 Japan Series Editor: TOSIYASU L. KUNII Professor and Chairman Department of Information Science Faculty of Science The University of Tokyo 7-3-1 Hongo, Bunkyo-ku Tokyo, 113 Japan Library of Congress Cataloging-in-Publication Data Kitagawa, H. (Hiroyuki), 1955- The unnormalized relational data model: for office form processor design/h. Kitagawa, T.L. Kunii. p. cm.- (Computer science workbench) Includes bibliographical references. ISBN-13: 978-4-431-68101-4 e-isbn-13: 978-4-431-68099-4 DOl: 10.1007/978-4-431-68099-4 (U.S.): 1. Data base design. 2. Relational data bases. I. Kunii, Tosiyasu. II. Title. III. Series. QA76.9.D26K58 1989005.75'6-dc20 This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in other ways, and storage in data banks. Springer-Verlag Tokyo 1989 Softcover reprint of the hardcover lst edition 1989 The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. Typesetting: Macmillan India Ltd., Bangalore
Series Preface Computer Science Workbench is a monograph series which will provide you with an in-depth working knowledge of current developments in computer technology. Every volume in this series will deal with a topic of importance in computer science and elaborate on how you yourself can build systems related to the main theme. You will be able to develop a variety of systems, including computer software tools, computer graphics, computer animation, database management systems, and computer-aided design and manufacturing systems. Computer Science Workbench represents an important new contribution in the field of practical computer technology. TOSIYASU L. KUNII
Preface The evolution of database systems research is itself a story. Long after the emergence of systems derived from practical applications, Codd's relational data model has gradually occupied the theoretical domain of database systems and is moving into the realms of practical use. Certainly, the theoretical foundation makes database design, validation, and testing easier. However, Cod d's model allows only fiat tables to be handled, while most business and engineering data in practice are in nested table forms. Thus, a recent major obstacle in database systems development is the large gap between the theory and the practice. This book aims at filling the gap by giving a rigorous foundation for handling practical data in the nested table forms which are also called "unnormalized relations." In fact, we can even develop a form translator based on the method explained in this book. Otherwise-identical business and engineering data which differ in format from one enterprise to another can be easily compiled into one another by the form translator. In this book, the nested table data model is presented to provide a theoretical basis for modeling practical data. Then, its applications are discussed through the design and implementation of a database workbench featuring the interactive manipulation of form-based documents. The use of nested tables is developed further in the context of application system generation. The book does not assume a reader's familiarity with database systems, and can be used by practitioners, researchers, and students, for self-study or as a textbook for a one semester course on the topic of database systems. HIROYUKI KITAGAWA TOSIYASU L. KUNII
Acknowledgments This book grew out of many years of our research on the use of unnormalized relations to handle business and engineering forms in a practical manner. Formalization of and theoretical study on the nested table data model and its application were initiated at the Kunii Laboratory of the University of Tokyo. We would like to thank all members of the Kunii Laboratory, Department of Information Science, the University of Tokyo for their help to us. We are grateful to Dr. Yukio Mizuno, Dr. Kiichi Fujino, and Mr. Sohei Misaki ofnec Corporation and to Professor Motoei Azuma of Waseda University for their encouragement to our work. Further research on nested tables and also the development of the FORMDOQ prototype were done when Kitagawa was with the NEC Software Product Engineering Laboratory. Thanks are also due to many members of the laboratory who were involved in the development of the FORMDOQ prototype. We would like to thank Professor Shi Bing Yao of the University of Maryland for his discussions and encouragement to our early work. Finally, we wish to thank Michiko Kitagawa for her help in preparing the manuscript of the book.
Table of Contents 1 Introduction.... 2 Historical Background.............................. 5 2.1 Form Data Model............................. 6 2.2 Form System................................. 12 2.3 Form-Based Application Specification.............. 14 3 Nested Table Data Model........................... 17 3.1 Overview.................................... 17 3.2 Nested Table................................. 19 3.3 Nested Table Handle........................... 22 3.3.1 Addressing Scheme....................... 23 3.3.2 Primitive NT Handle..................... 23 3.3.3 Composite NT Handle.................... 26 3.4 Nested Table Operation......................... 27 3.4.1 Primitive NT Operation................... 27 3.4.1.1 NF Operation........................... 27 3.4.1.2 XR Operation........................... 29 3.4.2 Composite NT Operation.................. 33 3.5 Dependencies and Normalization.................. 38 3.5.1 Dependencies... 39 3.5.2 Normalization... 42 3.6 Operational Properties of NT Operations........... 43 3.6.1 Basic Properties......................... 44 3.6.2 Data Manipulation Capability.............. 61 3.7 Summary.................................... 68 4 Form Document Workbench......................... 69 4.1 Overview.................................... 69 4.2 Requirements and Features...................... 70 4.2.1 Requirements for Form Document Workbench. 70 4.2.2 Features of FORMDOQ.................. 72 4.3 Three Level System Hierarchy.................... 73 4.3.1 External Level........................... 74 4.3.2 Logical Level........................... 78 4.3.3 Internal Level........................... 82
Xli Table of Contents 4.4 Form Document Manipulation Model.............. 82 4.5 System Architecture............................ 85 4.5.1 Graphics Driver......................... 86 4.5.2 System Manager......................... 86 4.5.3 Form Schema Editor..................... 87 4.5.4 Form Document Editor................... 87 4.5.5 Form Schema Base Manager............... 91 4.5.6 Graphics Type Handler................... 91 4.5.7 Form Document Base Manager............. 91 4.5.8 File Manager........................... 93 4.5.9 Heap Procedure Handler.................. 95 4.5.10 Application Program Handler/Interface....... 99 4.6 Interactive Document Handling................... 101 4.6.1 Basic Man-Machine Interface............... 101 4.6.2 Session Examples........................ 105 4.7 Prototype Implementation....................... 110 4.7.1 Process Structure........................ 110 4.7.2 File Management........................ 112 4.7.3 Form Document Heap Handling............ 116 4.7.4 Graphics Manipulation.................... 119 4.8 Experimental Evaluation........................ 120 4.9 Summary.................................... 121 5 Form-Based Application Generation.................... 123 5.1 Overview... 123 5.2 Application System Model....................... 123 5.2.1 Activity Tree and Activity Diagram.......... 124 5.2.2 Step... 126 5.2.2.1 Form Procedure......................... 127 5.2.2.2 NT Procedure........................... 129 5.2.2.3 Application Program..................... 130 5.3 Application Procedure Specification................ 132 5.3.1 NTPL Specification...................... 132 5.3.2 Example... 135 5.4 Application Generation Environments.............. 138 5.4.1 Activity Tree............................ 138 5.4.2 Activity Diagram........................ 140 5.4.3 Step... 140 5.4.3.1 Form Procedure......................... 140 5.4.3.2 NT Procedure........................... 141 5.4.3.3 Application Program..................... 141 5.5 Summary.................................... 142 6 Conclusion... 143 References......................................... 145
Table of Contents xiii Appendix A: Correspondence Between NTD and the NF2 Relational Data Model................................ 153 Appendix B: BNF Specification of NTPL.................. 155 List of Acronyms and Abbreviations...................... 157 Subject Index....................................... 161