attached learning engine to database