Add method to create database session factory.