first stage integration of database