Added abstract class for field declaration, completed db functions