database selection problem