Working on database repository classes

Change-Id: I76ba85560a179c79ca6c33cbf2d6f2e5914ac09c