IEEE Transactions on Software Engineering

An Entity-Relationship Programming Language

View publication


This paper presents syntax for an integrated Entity Relationship (E-R) programming language. We envision this syntax being used to extend a general purpose programming language such as Cobol, PL/1, Pascal, or C to provide facilities for working with E-R data. We start by discussing the problems that arise in providing data manipulation facilities by embedding a query language in a general purpose programming language and argue that an integrated approach is superior. We than state the requirements for such a language followed by a syntax. The syntax provides data manipulation capabilities for the E-R model in which entity sets are assumed to be mutually disjoint and each entity set has a unique, perhaps multiattribute, key. The syntax also covers the extended entity relationship (E-E-R) model which allows relationships between relationships. In an integrated language, database objects are automatically brought into main memory when they are referred to. To keep track of these objects and their references a run-time environment must be provided and bound to the user program. We discuss the design of this run time environment in some detail. If the E-R model is restricted to binary relationships between entity types and without attributes then the syntax can be considerably simplified. We discuss this syntax which has been implemented in a language called ERLANG (12). Finally, we discuss briefly some implementation considerations as well as a simple facility for defining an E-R database. © 1989 IEEE