Added Database working class

you can be interested in using array_map() function, try it