db.c under development. getline function has to be fully tested.