Initial iteration on database layer