![](/images/backgrounds/119451/bg24.png)
Coexistence General information
36 U929-J-Z125-9-76
2.2.4 Coexistence of the CODASYL and relational models A decision to use UDS/SQL is not a decision in favor of the CODASYL model and against
the relational model. UDS/SQL supports both models within a single database system,
which is consequently referred to as the coexistence model. Both SQL and CODASYL
applications can work with the same data resources at the sa me time.
The coexistence model also provides users with the advantages of both data models :
– a high degree of flexibility in regard to data structure s for SQL applications, for example
through the use of views,
– optimal performance for CODASYL applications and
– monitoring of referential integrity for CODASYL and SQL applications, provided set
relationships were defined.
UDS/SQL supports two forms of logical data organizat ion:
– CODASYL data organization with set relationships between the record t ypes
– relational data organization, in which record types are l inked only via the contents of
specific record elements
The SQL interface to CODASYL data structures is supported by the BPSQ LSIA utility,
which generates a relational view for practically all of the system’s CODASYL structures
(see the “Recovery, Information and Reorganization” manual). This is necessary bec ause
SQL statements require the use of explicit data elements which do not exist in th e
CODASYL database description; in the relational database de scription, primary keys are
added to all owner record types, and foreign keys are added to member record types.
The generation of the relational data description by the BPSQLS IA utility does not physi-
cally change the database. The additional data elements (pr imary keys and foreign keys)
exist only logically. As the result of the generation, SQL application programmers receive
a printout containing all the information needed to proc ess a CODASYL database with SQL
(e.g. table names, record element names, record element descriptions, etc.). S QL appli-
cation programmers can work exclusively with the relational schema, yet the CODASYL
schema remains unchanged and available for use by CODASYL applications.