functions to deal with the communication  with the Data Base