extractor connected to database