58,829 research outputs found
Database Programming in Machiavelli - A Polymorphic Language With Static Type Inference
Machiavelli is a polymorphically typed programming language in the spirit of ML, but supports a different type inferencing that makes its polymorphism somewhat more general than that of ML and appropriate for database applications. In particular, a function that selects a field f of a records is polymorphic in the sense that it can be applied to any record which contains a field f with the appropriate type. When combined with a set data type and database operations including join and projection, this provides a natural medium for relational database programming. Moreover, by implementing database objects as reference types and generating the appropriate views - sets of structures with identity - we can achieve a degree of static type checking for object-oriented databases
Semantics of Types for Database Objects
This paper proposes a framework of denotational semantics of database type systems and constructs a type system for complex database objects. Starting with an abstract analysis of the relational model, we develop a mathematical theory for the structures of domains of database objects. Based on this framework, we construct a concrete database type system and its semantic domain. The type system allows arbitrarily complex structures that can be constructed using labeled records, labeled variants, finite sets and recursion. On the semantic domain, in addition to standard operations on records, variants and sets, a join and a projection are available as polymorphically typed computable functions on arbitrarily complex objects. We then show that both the type system and the semantic domain can be uniformly integrated in an ML-like programming language. This leads us to develop a database programming language that supports rich data structures and powerful operations for databases while enjoying desirable features of modern type systems of programming languages including strong static type-checking, static type inference and ML polymorphism
Database Programming in Machiavelli - a Polymorphic Language with Static Type Inference
Machiavelli is a polymorphically typed programming language in the spirit of ML, but supports an extended method of type inferencing that makes its polymorphism more general and appropriate for database applications. In particular, a function that selects a field f of a records is polymorphic in the sense that it can be applied to any record which contains a field f with the appropriate type. When combined with a set data type and database operations including join and projection, this provides a natural medium for relational database programming. Moreover, by implementing database objects as reference types and generating the appropriate views — sets of structures with “identity ” — we can achieve a degree of static type checking for object-oriented databases.
Using Kinds to Represent Heterogeneous Collections in a Static Type System (Extended Abstract)
We consider the problem of representing heterogeneous collections of objects in a typed polymorphic programming language in such a way that common properties of members of a collection, such as having commonly named field with a common type can be expressed in the type system. The use of such collections is widespread in object-oriented and database programming and has so far been achieved in statically typed systems only through the use of a single dynamic type, which effectively hides all the structure of a value. In this paper we exploit a system of types and kinds (sets of types) to represent dynamic values with some known properties. The type system is shown to be sound and to have a complete type inference algorithm
Type inference in SQL
Type inference is an important concept in programming languages. In this Thesis, we study this problem and propose a framework for type inference in SQL, the database programming language for relational databases such as Oracle and Sybase. We consider a context-free grammar G SQL which covers the core features of the standard SQL. We add semantic rules to G SQL , following Knuth's method of "attribute grammars", to capture the set of schemas for which a query q ✹ L ( G SQL ) is well-defined. We show that G SQL is unambiguous and that our attribute grammar is non-circular. The set of schemas of a query is usually infinite. To finitely represent this set, we introduce schema tableaux, a variation of a well-known tool from database theory. By defining another attribute grammar for G SQL , we show that the set of schemas of a query q ✹ L ( G SQL ) can be finitely represented as a tableau which can be effectively computed given q as input. We discuss applications of our type inference methodology, and as a case study, we apply it on the suite of TPC Benchmark(TM) H queries, which has industry-wide relevance and a high degree of complexity. The experiments indicate the methodology in useful in practice, particularly in the context of database schema comprehension
Data Structures and Data Types in Object-Oriented Databases
The possibility of finding a static type system for object-oriented programming languages was initiated by Cardelli [Car88, CW85] who showed that it is possible to express the polymorphic nature of functions such a
A Type Language for Calendars
Time and calendars play an important role in databases,
on the Semantic Web, as well as in mobile computing. Temporal data
and calendars require (specific) modeling and processing tools. CaTTS
is a type language for calendar definitions using which one can model
and process temporal and calendric data. CaTTS is based on a "theory
reasoning" approach for efficiency reasons. This article addresses type
checking temporal and calendric data and constraints. A thesis underlying
CaTTS is that types and type checking are as useful and desirable
with calendric data types as with other data types. Types enable
(meaningful) annotation of data. Type checking enhances efficiency and
consistency of programming and modeling languages like database and
Web query languages
- …