before db