Both are accurate if done properly, but doing a laboratory analysis on a single product sample may not be as accurate as doing a database analysis on the recipe or formulation of the same product. Every time the product is produced, there are typically slight variations in the ingredients or in the mixing of the product. For example, one sample may contain more salt, or flour, or sugar, in it than another. The differences can be very slight but still affect the outcome of laboratory analysis. When the analysis is completed using the recipe or formulation, it results in a more consistent analysis. For more detail, please consult FDA guidelines.