Utilize este identificador para referenciar este registo:
https://hdl.handle.net/1822/6570
Título: | Strong types for relational databases: functional pearl |
Autor(es): | Visser, Joost Silva, Alexandra M. |
Palavras-chave: | Type-level programming Haskell Relational databases SQL Functional dependency theory |
Data: | 2006 |
Editora: | Association for Computing Machinery |
Citação: | ACM SIGPLAN WORKSHOP ON HASKELL, Portland, Oregon, USA, 2006 – “Haskell '06 : proceedings”. New York : ACM Press, 2006. ISBN 1-59593-489-8. p. 25-36. |
Resumo(s): | 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 |
Tipo: | Artigo em ata de conferência |
URI: | https://hdl.handle.net/1822/6570 |
ISBN: | 1-59593-489-8 |
Acesso: | Acesso aberto |
Aparece nas coleções: | HASLab - Artigos em revistas internacionais DI/CCTC - Artigos (papers) |
Ficheiros deste registo:
Ficheiro | Descrição | Tamanho | Formato | |
---|---|---|---|---|
StrongTypesForRDBs_joost.visser.pdf | Documento principal | 219,73 kB | Adobe PDF | Ver/Abrir |