extracted common database creation