The roles of chemical compounds in biological systems are now systematically analyzed by high-throughput experimental technologies. To automate the processing and interpretation of large-scale data it is necessary to develop bioinformatics methods to extract information from the chemical structures of these small molecules by considering the interactions and reactions involving proteins and other biological macromolecules. Here we focus on metabolic compounds and present a knowledge-based approach for understanding reactivity and metabolic fate in enzyme-catalyzed reactions in a given organism or group. We first constructed the KEGG RPAIR database containing chemical structure alignments and structure transformation patterns, called RDM patterns, for 7091 reactant pairs (substrate-product pairs) in 5734 known enzyme-catalyzed reactions. A total of 2205 RDM patterns were then categorized based on the KEGG PATHWAY database. The majority of RDM patterns were uniquely or preferentially found in specific classes of pathways, although some RDM patterns, such as those involving phosphorylation, were ubiquitous. The xenobiotics biodegradation pathways contained the most distinct RDM patterns, and we developed a scheme for predicting bacterial biodegradation pathways given chemical structures of, for example, environmental compounds.