This paper addresses the definition and the study of discrete generalized splines. Discrete generalized splines are continuous piecewise defined functions which meet some smoothness conditions for the first and second divided differences at the knots. They provide a generalization both of smooth generalized splines and of the classical discrete cubic splines. Completely general configurations for steps in divided differences are considered. Direct algorithms are proposed for constructing discrete generalized splines and discrete generalized B-splines (discrete GB-splines for short). Explicit formulae and recurrence relations are obtained for discrete GB-splines. Properties of discrete GB-splines and their series are studied. It is shown that discrete GB-splines form weak Chebyshev systems and that series of discrete GB-splines have a variation diminishing property.