The Columbia Clinical Repository is the foundation of the Clinical Inf
ormation System at the Columbia Presbyterian Medical Center (CPMC). Th
e Repository is implemented as a relational database on an IBM mainfra
me, using a generic design that employs a small number of tables. Clie
nt applications on remote platforms send and receive data through Data
base Access Modules (DAMs), which support the HL7 protocol, while appl
ications on the mainframe manipulate data through DAMs supporting a lo
cally defined ''query template''. Implementation using static (compile
d) SQL is compared to dynamic (ad hoc) SQL in terms of efficiency and
flexibility.