DB lab2 basic implementation