A database programming language is a programming language extended with database operations. In this paper we extend a core functional language with explicitly labeled tuples and the operations of the relational algebra. We present the functional database programming language Neon along with a polymorphic type inference algorithm that can infer a `type formula', that is, a type together with type constraints, for any valid Neon program. Neon has the following salient features: (1) let-bound polymorphism, (2) explicitly labeled tuples, (3) polymorphic tuple operations, notably extension, (4) sets and set operations, and (5) polymorphic relational algebra operations, notably natural join. To type-check a Neon program the standard Damas-Milner type inference algorithm needs to be extended so that it collects constraints on type variables imposed by tuple and relational operations. The type inference algorithm has been successfully implemented in Haskell.