Special Topics in Software Engineering:
Functional Programming for Databases
Dr. Stefan Stanczyk, Oxford Brookes University
The objective of this course is to present the functional programming (FP) approach to the development of database applications. The attributes of FP (such as declarativeness, high level of abstraction, elegance of data types, genericity, polymorphism, computability of programs, to mention but a few) instigate deeper insight into the database architecture. The devised database objects would not be confined to the pre-conceived (and usually very regular) structures of say relational model, and thus the associations between the objects can be expressed accurately, rigorously and truthfully. Should it be required, the outcome of such an abstract design may then be transformed into relational or object-oriented schemes.
The programming language used for this presentation is Haskell, the de facto standard language for lazy evaluation FP. The simplicity of the Hugs interpreter makes it a very good environment for learning the language; Hugs is also freely available for the majority of platforms (Unix, MacOS, Windows, and DOS).
Database foundations revisited - concepts, structures, operations, behaviour. Relational, binary and extended functional data models for databases. Model of computation based on Church's λ calculus.
Imperative versus declarative programming. Functional programming paradigm. Programming elements and components in a typed FP language: functions, primitive and defined types, overloading, guards, currying, recursion, list comprehension pattern matching, lambda expressions, higher order functions, type classes, algebraic types, infinite lists, sets, relations. Data structures and abstract data types. Examples of classical algorithms (e.g. sorting, merging) expressed in a functional style.
Examples of common database processes coded in Haskell. Functional database programming systems (e.g. Daplex). Relational DB structures and operations expressed in a functional style.
Familiarity with database concepts and reasonable programming skills are expected; certain mathematical ability will be beneficial. No prior knowledge of functional programming or its theoretical basis is assumed.
The marks for this course will be obtained by a project which the students have to submit until July 30, 2009.