Add patterns to db