The variety and complexity of fiber Bragg gratings have grown tremendously in recent years. Advances in fabrication have increased interest in techniques to design gratings with specific spectral characteristics. Existing mathematical design algorithms require both the amplitude and phase response of the grating in reflection to be specified. However, sometimes other quantities are specified in design requirements, such as transmission coefficients or group delay characteristics. The spectral quantities associated with gratings are not all independent and there are dispersion relations connecting them. New relationships between the reflectance, transmittance and various group delays are presented. These relationships provide constraints on the possible gratings that can be designed, and provide a means for designing gratings from different specifications. The group delay in transmission of an arbitrary grating is always determined uniquely from the amplitude response. The corresponding quantities in reflection are determined uniquely if the grating is symmetric. For non-symmetric gratings only upper and lower bounds on the group delay in reflection can be obtained. A better physical intuition of these mathematical design algorithms is provided by a resonance mode formalism. Resonance modes play an important part in understanding linear nonuniform gratings, analogous to the role played by waveguide modes in waveguide theory. Using resonance mode expansions, exact expressions are obtained for the fields, the grating profile and the spectral characteristics for a large class of nonuniform gratings. The exact solutions can be used to investigate designs for grating structures.