ACM Home Page
Please provide us with feedback. Feedback
Strong types for relational databases
Full text PdfPdf (278 KB)
Source Haskell archive
Proceedings of the 2006 ACM SIGPLAN workshop on Haskell table of contents
Portland, Oregon, USA
SESSION: Session 1 table of contents
Pages: 25 - 36  
Year of Publication: 2006
ISBN:1-59593-489-8
Authors
Alexandra Silva  CWI, The Netherlands
Joost Visser  Universidade do Minho, Portugal
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): n/a,   Downloads (12 Months): n/a,   Citation Count: 2
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1159842.1159846
What is a DOI?

ABSTRACT

Haskell's type system with multi-parameter constructor classes and functional dependencies allows static (compile-time) computations to be expressed by logic programming on the level of types. This emergent capability has been exploited for instance to model arbitrary-length tuples (heterogeneous lists), extensible records, functions with variable length argument lists, and (homogenous) lists of statically fixed length (vectors).We explain how type-level programming can be exploited to define a strongly-typed model of relational databases and operations on them. In particular, we present a strongly typed embedding of a significant subset of SQL in Haskell. In this model, meta-data is represented by type-level entities that guard the semantic correctness of database operations at compile time.Apart from the standard relational database operations, such as selection and join, we model functional dependencies (among table attributes), normal forms, and operations for database transformation. We show how functional dependency information can be represented at the type level, and can be transported through operations. This means that type inference statically computes functional dependencies on the result from those on the arguments.Our model shows that Haskell can be used to design and prototype typed languages for designing, programming, and transforming relational databases.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
American National Standards Institute. ANSI X3.135-1992: Database Language SQL. 1992.
2
3
4
5
6
 
7
A. Cunha, J. N. Oliveira, and J. Visser. Type-safe two-level data transformation. In Proc. Int. Symp. Formal Methods, volume 4085 of Lecture Notes in Computer Science, pages 284--299. Springer, 2006.
 
8
 
9
 
10
T. Hallgren. Fun with functional dependencies. In Proc. of the Joint CS/CE Winter Meeting, pages 135--145, 2001. Dep.t of Computing Science, Chalmers, Göteborg, Sweden.
 
11
 
12
A. Jaoua et al. Discovering Regularities in Databases Using Canonical Decomposition of Binary Relations. JoRMiCS, 1:217--234, 2004.
 
13
O. Kiselyov and R. Lämmel. Haskell's overlooked object system. Draft of 10 September 2005, 2005.
14
15
16
 
17
 
18
 
19
C. Necco. Procesamiento de datos politípicos (polytypic data processing). Master's thesis, Universidad Nacional de San Luis, Departamento de Informática, Argentina, 2004.
 
20
C. Necco and J. N. Oliveira. Toward generic data processing. In Proc. WISBD'05, 2005.
21
22
 
23
S. L. Peyton Jones. Haskell 98: Language and libraries. J. Funct. Program., 13(1):1--255, 2003.
24
 
25


Collaborative Colleagues:
Alexandra Silva: colleagues
Joost Visser: colleagues