Strongly typed, compile-time safe and loosely coupled data persistence

Yao, Conglun (2010). Strongly typed, compile-time safe and loosely coupled data persistence. University of Birmingham. Ph.D.

[img]
Preview
Yao10PhD.pdf
PDF

Download (1MB)

Abstract

A large number of approaches have been developed to simplify construction of, and to reduce errors in, data-driven applications. However, these approaches have not been particularly concerned with compile-time type safety. Type mismatch errors between program and the database schema occur quite often during program development, and the techniques used in these approaches often defer error checking on database operations until runtime. In this thesis, we take a different approach from those previously proposed, based on strict type checking at compile time, type inference, higher-order functions, phantom types, object relational mapping, and loosely coupled database interaction. Instead of using external, literal XML file and string type SQL, we embed the mapping meta data and user defined queries directly in the program, the type safety of which is guaranteed by the program compiler. Such a result is achieved by introducing additional database schema information and using type avatars, a dummy structure used to extend the type checking to embedded queries, during compilation. We show that this approach is practical and effective by implementing a compile-time type-safe object relational framework, called Qanat, in the OCaml programming language and using a loosely coupled SQL database. We further report experimental results obtained by running a number of benchmark tests, and compare the resulting Qanat applications with the equivalent, raw database driver based applications.

Type of Work: Thesis (Doctorates > Ph.D.)
Award Type: Doctorates > Ph.D.
Supervisor(s):
Supervisor(s)EmailORCID
Sexton, Alan P.UNSPECIFIEDUNSPECIFIED
Licence:
College/Faculty: Colleges (2008 onwards) > College of Engineering & Physical Sciences
School or Department: School of Computer Science
Funders: None/not applicable
Subjects: Q Science > QA Mathematics > QA75 Electronic computers. Computer science
URI: http://etheses.bham.ac.uk/id/eprint/1186

Actions

Request a Correction Request a Correction
View Item View Item

Downloads

Downloads per month over past year