To tackle the problem of low-efficiency integration of heterogeneous data from various legacy ERP systems, a data integration approach based on ontology learning are presented. Considering the unavailability of database interface and diversity of DBMS and naming conventions of legacy information systems, a data integration framework for legacy ERP systems based on ontology learning from structured query language (SQL) scripts (RDB) are proposed. The key steps and technicality of the proposed framework and the process of ontology-based semantic integration are depicted.