Added stored procedure for Attendence and a view for terms.