pattern file to DB util