% File:    dbpl-syst.tex
% Author:  F. Matthes, A. Rudloff, F. Matthes
% Date:    1-JUL-1992
% Title:   DBPL User and System Manual
% Das File dbpl-sizes.ps ist folgendermassen entstanden:
% - Rag-Time Grafik cut & paste
% - Smart Scrap Cliboard
% - Cricket Draw sichern als EPSF
% - zur Sun kopiert
% - [] settransfer Zeile im PS Code auskommentiert
% 
\documentstyle[a4,epsf,11pt]{article}
\pagestyle{headings}
\parindent=0pt
\parskip=5pt plus 2pt
\newcommand{\figwidth}{14cm}

\begin{document}

\newcommand{\nfnf}[1]{NF$^2$}
\newcommand{\e}[1]{{\em #1\/}}
\newcommand{\kw}[1]{{\sl #1}}
\newcommand{\p}[1]{{\sl #1}}
\newcommand{\k}[1]{{\bf #1}}

%------------------------------------------------------------------
\begin{titlepage}
\vspace*{1cm}
{\noindent\huge The Database Programming Language DBPL\\[0.5cm]
User and System Manual}

\vskip 1.5cm
\noindent Florian Matthes\\
\noindent Andreas Rudloff\\
\noindent Joachim W.~Schmidt\\
\noindent Kazimierz Subieta\\
\vskip 1cm
\noindent The database programming language DBPL is based on the notion of
bulk type and iteration abstraction, supports data persistence and
transaction procedures, and has Modula-2 as its algorithmic kernel. 

This fist part of this document is intended for users of the DBPL system.
It gives an introduction into the DBPL language concepts and
illustrates their use in a larger modular database application.

The second part gives some insight into the implementation of the DBPL
system. As of today, the DBPL system exists in two fully source code
compatible implementations, VAX/VMS DBPL and Sun DBPL. Both are written
entierly in Modula-2 and consist of a compilation and a run time
environment. The multi-user run time system is highly portable and runs
under VAX/VMS 6.1, SunOS 4.1, IBM AIX 3.2 and IBM OS/2.  Both DBPL
systems are integrated deeply into commercially available software
development environments (NSE, SCCS, CMS) and provide optimized
transactional multi-user access not only to type-complete DBPL databases
but also to external relational databases via a fully transparent SQL
gateway.

\vskip 1cm
\noindent Status: Revised, July 1992
\vskip 1cm
\noindent Arbeitsbereich DBIS\\
 Fachbereich Informatik\\
 Universit\"at Hamburg\\
 Vogt-K\"olln Stra{\ss}e 30\\
 D-2000 Hamburg 54\\
 Federal Republic of Germany\\
 \ \\
{\small This work was supported by the European Commission, Basic
Research, Contract \# 4092, FIDE.}

\end{titlepage}
%----------------------------------------------------------------


\tableofcontents                 
\newpage

\section{Language and System Support for Data-Intensive Applications}

The paper is intended to be read in conjunction with the \e{DBPL
Rationale and Report} \cite{MaSc92a} and reports on the current status of
the DBPL system, the result of a long term research and development
project at Hamburg University that was set up around 1985. The paper
presents two complementary views on the DBPL system: The first and the
second section provide an introduction into the DBPL language concepts
for database programming in the small (section~1) and for database
application development in the large (section~2).  The understanding of
this ``external'' conceptual view of DBPL provides the basis for the
more technical description of the ``internals'' of the DBPL system, in
particular its compilation system (section~3) and its multi-user
database runtime support (section~4). The paper ends with a discussion
of our past experience using the DBPL system and possible future
application areas.

As of today, the DBPL system exists in two fully source code compatible
implementations, VAX/VMS DBPL and Sun DBPL. Both are written entierly in
Modula-2 and consist of a compilation and a run time environment. The
multi-user run time system is highly portable and runs under VAX/VMS
6.1, SunOS 4.1, IBM AIX 3.2 and IBM OS/2.  Both DBPL systems can be
integrated deeply into commercially available software development
environments (NSE, SCCS, CMS) and provide optimized transactional
multi-user access not only to type-complete DBPL databases but also to
external relational databases via a fully transparent SQL gateway.

Figure~\ref{dbpl-system} depicts the overall DBPL system architecture
and indicates the interaction between the various parts of the DBPL
system. A DBPL application typically consists of a collection of modules
and interfaces (represented by dashed boxes in Fig.~\ref{dbpl-system}).
Some of these modules define \e{shared} objects like library routines or
database variables, others define private, application specific code or
data. Individual modules and interfaces are translated by the DBPL
compiler and then linked with other compiled DBPL modules or object code
developed in other programming languages (C, C++, Modula-3) yielding an
executable program with (symbolic, type-safe) references to shared
libraries and shared databases.

At runtime, this executable program interacts through the interface
module \kw{DBPLRTS} with the various layers of the DBPL run time system
(\kw{PSMS, CTMS, SQLGate, CPMS, CRDS, SMS}; see Sec.~\ref{run-time}).
Database objects are either stored in a DBPL-specific format in files
accessed through operating system calls issued by the layer \kw{SMS} or
they are held in commercial SQL databases (Ingres, Oracle) and accessed
via set-oriented dynamic SQL+C statements following the \e{X-Open}
standard for SQL database access. The distinction between DBPL and SQL
database objects is fully transparent to the application programmer.

Fig.~\ref{dbpl-system} also outlines the interaction between two DBPL
applications (possibly running on different nodes of a TCP/IP or a
DECnet local area network) that import a common set of database modules
and therefore run against shared databases. The sharing of DBPL database
objects is achieved by a page-oriented client-server architecture using
a three-level (\kw{CTMS, CRDS, SMS}) concurrency-control and recovery
protocol based on explicit message passing. The layer \kw{LMS} provides
communication services and a centralized scheduling process that
guarantees serializable transaction execution for DBPL applications.
Concurrent and possibly remote access to SQL databases is handled using
built-in services of the commercial SQL servers.\footnote{There is no
two-phase commit protocol to guarantee abort / commit consistency across
mixed DBPL and SQL databases in case of system failures at commit time.}

\begin{figure}
\centerline{\epsfbox{dbpl-components.ps}}
\caption{Overall DBPL system architecture}
\label{dbpl-system} 
\end{figure}

The next section introduces the notions of bulk type, iteration
abstraction, data persistence and transaction procedures as found in
DBPL. These concepts are employed in section~2 to solve a larger
programming task, the development of a cross-reference database for
module, identifier and type dependency management.

% -------------------------------------------------------------------

\include{dbpl-language}

\include{dbpl-demo}

\include{dbpl-compiler}

\include{dbpl-rts}

\section{Using the DBPL System}

The DBPL project always had a strong commitment to implementability. A
multi-user DBPL system under VAX/VMS has served many times since 1985
for lab courses on database programming at the Universities of Frankfurt
and Hamburg.  There exist several DBPL system extensions that experiment
with alternatives for concurrency (optimistic, pessimistic and mixed
strategies) \cite{BJS86} and integrity control \cite{Bott90}, storage
structures for complex objects, recursive queries \cite{JLS85,ScLi85}
and distribution \cite{JLRS88,JGLR88}. The construction of a distributed
DBPL system is based on ISO/OSI communication standards and involves,
for example, a re-implementation of the DBPL compiler to generate native
code for IBM-PC/AT clients in cooperation with VAX/VMS servers.

In 1991, a substantial effort was made to integrate the experience
gained with these prototypes into a new, portable implementation of the
DBPL runtime system on various platforms (VAX/VMS, Sun-3, Sun-4/Unix,
IBM RISC/AIX). By utilizing Sun's optimizing compiler backend, the DBPL
compiler achieves ``production-quality'' performance and
interoperability.

The availability of an optimizing and transparent gateway from DBPL to
SQL database servers since early 1992 substantially increases the
attractiveness of DBPL for users that have to work with large, possibly
pre-existing databases and that require well-established tools for
access control, data clustering, interactive database access etc.\ and
last, but not least, interoperability with non-DBPL database
applications.

To summarize, we expect the DBPL language and system to be used in
research and devleopment mainly for the following three tasks:

\begin{description} 

\item[Concept validation:] As outlined above, we strongly believe in the
necessity of experimental evaluation of proposed system solutions (e.g.
of new concurrency control protocols or a new workstation-server
architectures).  In many cases, the interaction with several system
components (e.g. the recovery management or the query optimizer), or the
lack of universality severly impairs the utility of a seemingly
advantageous paper-and-pencil solution.

\item[Database education:] Our experience in using DBPL intensively in
lab classes convinces us that it is an appropriate tool for teaching the
essential problems and solutions in database application development.
Without being distracted by idiosyncratic surface syntax and
deficiencies of traditional preprocessor database interfaces, it is much
easier to isolate and communicate the repeating patterns in database
applications and to concentrate on an \e{abstract and complete} picture
of database application programming.

\item [Application prototyping:] From Modula-2 the DBPL language has
inherited software engineering qualities that can not be found in
commercial database environments and which qualify DBPL as an
appropriate tool for designs and implementations. This use of DBPL is
further supported by the quality of the commercial platforms on which
the DBPL system is realized, the depth of its integration into
professional environmets for software development and maintenance and
its interoperability with commercial relational database servers.

\end{description}

{\small
\bibliographystyle{florian} 
\bibliography{../bib/florian}
}
\end{document}

