<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Using Natural Language for Database Design Edith Buchholz * and Antje Düsterhöft</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Computer Science University of Rostock</institution>
          ,
          <addr-line>A.-Einstein-Str.21 18059 Rostock</addr-line>
          ,
          <country country="DE">Germany</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper deals with a natural language dialogue tool for supporting the database design process. We want to illustrate how natural language (German) can be used for obtaining a skeleton design and for supporting the acquisition of semantics of the prospective database. The approach is based on the assumption that verbs form a central part in defining the meaning of sentences and imply semantic roles in the sentences which have to be filled by objects. We are using a moderated dialogue for drawing the designer's attention to these objects in order to extract comprehensive information about the domain.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The quality of database design is a decisive factor for the
efficiency of a database application. A database designer
has to use a high level of abstraction for mapping his
realworld application onto an entity relationship model. The
designer has to learn the model and the constraints to use
it.</p>
      <p>Natural language can be exploited in order to overcome
this bottleneck. From our point of view a user-friendly
design system has to have two supporting tools: firstly, a
tool which makes available an interface for obtaining a
natural language description of an application and
secondly, a tool for paraphrasing database schemes in a
natural language way (see also [FloPR85]).
[ColGS83], [TseCY92], [TjoB93] are presenting various
methods dealing with natural language as input for
database design systems. These systems are based on
natural language texts for the requirement specification in
the data base design process. This paper illustrates how
natural language in a dialogue tool can be used for
gathering the knowledge of the designer and how it can
be transfered into an extended entity-relationship model.
The dialogue together with the knowledge base will be
used for drawing to the designer's attention special facts
resulting from the syntactic, the semantic and the pragmatic
analyses. The tool makes suggestions for completing the
design applying the knowledge base.</p>
      <p>* This work is supported by DFG project TH 456/2-2.
In the database design project RAD ([ThaA94]) we have
implemented a rule-based dialogue design tool for getting
a skeleton design on the basis of the extended
entityrelationship model HERM [Tha91]. The designer
describes the structure of an application in German. The
specification and formalisation of semantic constraints is
one of the most complex problems for the designer. Within
natural language sentences the designer uses semantic
constraints intuitively. For that reason, within the natural
language design process we focus on extracting
comprehensive semantic information about the domain
from natural language utterances. The results of the
dialogue are available in the internal DataDictionary for
the other tools (grahical interface, integrity checker,
strategy adviser,...) of the system. Within the RAD system
the designer can use these results for various forms of
representation, e.g. a graphical representation. The
skeleton design with the semantic constraints is also the
basis for further semantic checks, e.g. of key candidates,
and will restrict the search areas in the checking process.
For the theoretical and pragmatic analyses of the language
used within the design dialogue it was necessary to do
this with a practical example. So we decided to choose
the field of library - its tasks and processes. As a method
of obtaining the linguistic corpus we carried out a number
of interviews with librariens and library users. The
extracted corpus was analysed statistically to obtain the
frequency of word forms and the occurence of synonyms
and homonyms. Starting from this domain we developed
relations to other domains (see [BucD94]).</p>
      <p>The dialogue tool will be implemented in PROLOG.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The structure of the dialogue tool</title>
      <p>For the acquisition of designer knowledge we decided to
choose a moderated dialogue tool. A moderated dialogue
can be seen as a question-answer-tool. The tool asks for
input or additional questions considering the acquisition
of database design information. These questions are frames
which will be updated in the dialogue process. The
designer can formulate the answer in natural language
natural
language
input
syntactic
analysis
analyses of
semantic
roles
intermediate
formalism
pragmatic
interpretation
domain
model</p>
      <p>HERM
model
domaindependent
HERM
description
sentences. Each sentence will be analysed syntactically as
well as semantically and then transformed into HERM
stuctures.</p>
      <p>Within the dialogue the results of the syntactic, semantic
and pragmatic analyses will be used for controlling the
dialogue. That means, if an incomplete designer input is
received a question will be initiated. Inputs are incomplete
if either semantic roles are not complete or the newly
generated design model is incomplete. Semantic roles are
filled within the semantic analysis. The pragmatics realizes
the transformation of the natural language sentences into
HERM structures.
2.1</p>
      <sec id="sec-2-1">
        <title>Syntactic analysis</title>
        <p>The syntactic analysis of the natural language input of the
designer is based on a GPSG parser (Generalized Phrase
Structure Grammar) [Gaz85]. GPSG belongs to the family
of Unification Grammars. A basic feature is the
introduction of ID/LP Rules (Immediate Dominance/
Linear Precedence). Immediate Dominance determines the
immediate dominance of a root over its followers, Linear
Precedence determines the order in which the follower,
e.g. syntactic categories are to be processed.</p>
        <p>The parser implemented in our tool uses the Earley
algorithm [Ear70].
2.2</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Semantic analysis</title>
      <p>Interpreting the semantics of the designer input we are
using the model of Bierwisch [Bie88] which inserts a
semantic level between the syntax level and the conceptual
level (HERM data model).</p>
      <p>We assume that verbs form a central part in defining the
meaning of sentences and the relationships between parts
of sentences. Basically they describe actions, processes
and states. We have tried to find a classification of verb
semantics that can be applied to all verbs in the German
language. Our aim was to keep the number of classes small
and fairly general but large enough to identify their function
in a sentence correctly. This classification (see also
[BucD94]) is, at this stage, independent of the domain to
be analysed (cf.Fig.2).</p>
      <p>To identify the meaning of sentences we have used the
model of semantic roles. Verbs of a special class imply
the occurence of semantic roles. The units in a sentence
or an utterance are seen to fulfil certain roles. Our role
concept is mainly based on the hypothesis by Jackendoff
[Jac83] and consists of the following roles which refer to
the objects partaking in the action: Cause, Theme, Result/
Goal, Source, Locative, Temporal, Mode, Voice/Aspect.
The following example illustrates the role concept.
verbs
of
position
(locative)</p>
      <p>static
copulative stative</p>
      <p>verbs verbs
Example. 'The user borrows a book with a
borrowing-slip'
results of the semantic analysis:
verb type: change of ownership
subject: the user
object: a book
locative: ?*
temporal: ?*
mode:</p>
      <p>with a borrowing-slip
(* an additional question will be initiated)
2.3</p>
      <sec id="sec-3-1">
        <title>Pragmatic interpretation</title>
      </sec>
      <sec id="sec-3-2">
        <title>2.3.1 Obtaining a skeleton design</title>
        <p>The transformation of the structure of natural language
sentences into EER model structures is a process which is
based on heuristic assumptions, e.g., we assume that all
nouns are entities. [TjoB93] illustrate a large number of
such heuristics in an informal way. If we accept these
heuristics then we can formalize them using contextfree
and contextsensitive rules.</p>
      </sec>
      <sec id="sec-3-3">
        <title>Example.</title>
        <p>/* all nouns are transferred into entities */
N(X) entity(NAME,X).
/* sentences with the main verb ‘have’ are transferred into
an entity (the subject) and the according attribute (the
object of the sentence) */
N(X),subject(X),V(haben),N(Y),object(Y)
entity(X),attre(X,Y).</p>
        <p>Considering the results of the syntactic analysis of a natural
language sentence we can describe these results using a
tuple structure.</p>
        <p>Example. The tuple structure of the sentence ‘the user
borrows a book with a borrowing-slip’ is:
S(NP(DET(the),N(user)),</p>
        <p>VP(VP(V(borrows),NP(DET(a),N(book)),
PP(PRAEP(with),</p>
        <p>NP(DET(a),</p>
        <p>N(borrowingslip)))))
The tuple can be seen as a language which can be described
by a grammar, e.g. terminals are N, DET or VP. The
HERM model can also be seen as a language if predicates
are used to describe the elements of the model. Now we
can handle the transformation as a compiler process using
an attribute grammar. The heuristics are integrated into
grammar rules as well as into semantic rules. A compiler
for this purpose has been developed. The following
example illustrates how the transformation is realized.
Example. Transforming the utterance ‘at the library’ into
an entity named ‘library’ using a contextfree grammar
formalism. (The small letters identify nonterminals, and
the capital letters are terminals. ‘$x’ is a variable.
‘assert(X)’ asserts ‘X’ to the model description.)
tuple structure:
S(PP(PRAEP(at),NP(DET(a),N(library))))
grammar rules:
start S(phrase)
phrase PP(pp_phrase)
pp_phrase PRAEP($x),NP(np_phrase)
np_phrase NP(det_phrase,n_phrase)
det_phrase DET($x)
n_phrase N($x) {assert(entity($x))}
The advantage of this approach is that we can define
actions at the word category level as well as at the sentence
phrase level. So, it is possible to define database design
actions, e.g. when considering the occurence of a genitive
nominal phrase connected with another nominal phrase
in the sentence. The heuristics underlying is that a genitive
nominal phrase has an attribute function concerning the
corresponding nominal phrase.</p>
        <p>We are using a dialogue in which the designer can
formulate a description of an application in several
sentences. For that reason we have to deal with the problem
of inserting a new part of a design into an existing design.
We have implemented a two-step approach. Firstly, a
seperate design will be generated from the sentence of the
user. Secondly, the design description will be updated
inserting the new design part. Common heuristics are the
basis of the updating process (cf. [Düs94]).</p>
      </sec>
      <sec id="sec-3-4">
        <title>2.3.2 Extracting information on behaviour</title>
        <p>In most cases a database will be used for complex
processes. In order to be able to maintain the database we
have to define transactions. (For the reasons of using
transactions see [Tha94:114].) The behaviour of the
database can help to make the system more efficient and
faster and thus to save time and money.</p>
        <p>Behaviour can best be gained from a knowledge base.
One form of presenting the domain is by classification of
the processes involved as a conceptual graph. The
knowledge base will be used for gathering relevant
processes of the application and is based on the results of
the semantic analysis. Each application can be classified.
Lending processes are identified by verbs of the class
work flow
material flow immaterial flow
reversible
irreversible
hiring lending
renting ... selling passing on
...
'change of ownership'. The library processes or the ‘rent
a car’ processes (cf. Fig. 3) belong to this group.
The lending process as a complex process can be further
classified into a number of pre and post processes (cf.
Fig. 4). These processes are included in the knowledge
base. If a user input contains one of these processes a
possible classification will be defined and an action within
the dialogue will be initiated.The pre and post processes
in Fig. 4 can be further subdivided into processes which
are summarized in the above classification. Lending thus
requires the processes of obtaining a user card, updating
the user card if need be checking whether the book is held
and available, filling in a borrowing-slip and signing it.
Example. The sentence ‘the user borrows a book with
borrowing-slip’ implies the following general questions
(borrowing has the synonym lending):
preprocesses:
1) Is the process ‘obtaining’ situated before
‘lending’ ?
2) Is the process ‘registration’ situated
before ‘lending’ ?
main processes:
3) Is the process ‘document exists’ situated
before ‘lending’ ?
4) Is the process ‘document valid’ situated
before ‘lending’ ?
...
postprocesses:
5) Is the process ‘returning’ situated after
‘lending’ ?
The designer has to give correct answers.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Conclusions/ Future Topics</title>
      <p>We have presented a dialogue tool consisting of a syntax
analyser, a semantic role definer and a pragmatics
interpreter. The dialogue tool gathers information on
structure, semantics and behaviour of the prospective
database. By means of transformation rules this
information is mapped onto the HERM model.
The advantage of the dialogue tool is that the designer
can describe the requirements of the database system in a
natural language (German) and thus can specify the
knowledge of a domain in a natural way. This knowledge
is then employed for gathering database constructs such
as entities, attributes, cardinalities, constraints, etc.
The efficiency of the database greatly depends on the exact
interpretation and transformation of the natural language
input analysis. The accuracy, on the other hand, depends
on the size and complexity of the grammar used and the
scope of the lexicon.</p>
      <p>Work in future has to concentrate on extending the
grammar to comprise all types of sentences and other
hitherto excluded parts of grammar and on ways of
steadily increasing the lexicon. For reasons of integrity
we cannot leave updating of the lexicon to the chance
designer who may have no linguistic training. Much work
will have to go into completing and maintaining the
linguistic background before it can finally be used for
any type of systems design.</p>
      <p>A second future topic is the application of the linguistic
knowledge for acquiring further semantic information of
the prospective database, e.g. acquiring key attributes or
functional dependencies.</p>
    </sec>
    <sec id="sec-5">
      <title>Acknowledgements</title>
      <p>We are grateful to Bernhard Thalheim for his guidance
and support of our work and for his helpful criticism and
suggestions.
obtaining
registration
lending
returning
document
exists
document
valid
object
exists
object
available
contract
completed
object
transferred</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [Bie88]
          <string-name>
            <surname>Bierwisch</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motsch</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zimmermann</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          : Syntax, Semantik und Lexikon. Berlin,Akademie Verlag,
          <year>1988</year>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [BucD94]
          <string-name>
            <surname>Buchholz</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Düsterhöft</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The linguistic backbone of a natural language interface for database design</article-title>
          .
          <source>In: LLC ?/94</source>
          , Oxford University Press
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [ColGS83]
          <string-name>
            <surname>Colombetti</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Guida</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ; Somalvico,
          <string-name>
            <surname>M.:</surname>
          </string-name>
          <article-title>NLDA: A Natural Language Reasoning System for the Analysis of Data Base Requirements</article-title>
          . In: Ceri,
          <string-name>
            <surname>S</surname>
          </string-name>
          . (ed.):
          <article-title>Methodology and Tools for Data Base Design</article-title>
          . North-Holland,
          <year>1983</year>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [Düs94]
          <string-name>
            <surname>Düsterhöft</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Zur Vorgehensweise bei der pragmatischen Inter pretation natürlichsprachiger Äußerungen Im Datenbankentwurf</article-title>
          .
          <source>Preprint</source>
          <volume>4</volume>
          /94,
          <string-name>
            <surname>Fachbereich</surname>
            <given-names>Informatik</given-names>
          </string-name>
          , Universität Rostock
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Ear70]
          <string-name>
            <surname>Earley</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>An efficient context-free parsing algorithm</article-title>
          .
          <source>Comm. ACM13</source>
          :2,
          <string-name>
            <surname>S.</surname>
          </string-name>
          94-
          <fpage>102</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [Eic84] Eick,
          <string-name>
            <surname>Ch</surname>
          </string-name>
          .F.:
          <article-title>From Natural Language Requirements to Good Data Base Definitions - A Data Base Design Methodology</article-title>
          .
          <source>In: Proc. of the International Conference on Data Engineering</source>
          , pp.
          <fpage>324</fpage>
          -
          <lpage>331</lpage>
          , Los Angeles, USA,
          <volume>24</volume>
          .-
          <fpage>27</fpage>
          .4.1984
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [FloPR85]
          <string-name>
            <surname>Flores</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Proix</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Rolland</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>An Intelligent Tool for Information Design</article-title>
          .
          <source>Proc. of the Fourth Scandinavian Research Seminar of Information Modeling and Data Base Management. Ellivuori, Finnland</source>
          ,
          <year>1985</year>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [Gaz85]
          <string-name>
            <surname>Gazdar</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Klein</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Pullum</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Sag</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>Generalized Phrase Structure Grammar</article-title>
          . Havard University Press Cambridge, Mass. 1985
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [GolS91]
          <string-name>
            <surname>Goldstein</surname>
            ,
            <given-names>R.C.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Storey</surname>
            ,
            <given-names>V.C.</given-names>
          </string-name>
          :
          <article-title>Commonsense Reasoning in Database Design</article-title>
          .
          <source>Proc. of the 10th International Conference on Entity-Relationship Approach</source>
          , San Mateo, California, USA,
          <volume>23</volume>
          .-
          <fpage>25</fpage>
          .
          <year>October 1991</year>
          , pp.
          <fpage>77</fpage>
          -
          <lpage>92</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [Jac83]
          <string-name>
            <surname>Jackendoff</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Semantics and cognition</article-title>
          . MIT Press, Cambridge Mass.,
          <year>1983</year>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [Tha91]
          <string-name>
            <surname>Thalheim</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Intelligent Database Design Using an Extended Entity-Relationship Model</article-title>
          .
          <source>Berichte des Fachbereiches Informatik 02-1991</source>
          ,
          <string-name>
            <given-names>Universität</given-names>
            <surname>Rostock</surname>
          </string-name>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <string-name>
            <surname>[Tha94] Thalheim</surname>
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Fundamentals of Entity-Relationship Modeling</article-title>
          . Springer Verlag 1994, Forthcoming
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [ThaA94]
          <string-name>
            <surname>Thalheim</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Albrecht</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Altus</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Buchholz</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Düsterhöft</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schewe</surname>
          </string-name>
          , K.-D.:
          <article-title>Die Intelligente Tool Box zum Datenbank entwurf RAD</article-title>
          .
          <source>Workshop "Benutzerschnitstellen“</source>
          ,
          <volume>17</volume>
          .-
          <fpage>19</fpage>
          .März1994, Kassel
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [TjoB93]
          <string-name>
            <surname>Tjoa</surname>
            ,
            <given-names>A.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Berger</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Transformation of Requirements Specifications Expressed in Natural Language into an EER Model</article-title>
          .
          <source>Proceeding of the 12thInternational Conference on ER-Approach</source>
          , Airlington,
          <string-name>
            <surname>Texas</surname>
            <given-names>USA</given-names>
          </string-name>
          ,
          <year>Dec</year>
          .
          <fpage>15</fpage>
          -
          <lpage>17th</lpage>
          ,
          <year>1993</year>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>