Connected database to attendence table