application factory : database service use factory