##Objectives:
- Build a simple Object Relational Mapper.
- Learn what SQL joins are and how to use them.
- Learn how to Create, Read, Update and Delete data (CRUD).
###Right now your ORM Student class has methods that will:
- Insert students into the database with their associated attributes.
- Update a student's attributes in the database and have it persist(continue to exist).
- Delete students from the database.
- Create a new instance of a student from the database.(Students will exist in the database in a row, you will create an instance (object) so you can use that object.)
- Find a student by their name or id.
- Add a course to a student.
- Retrieve all of the courses of a student.
After completing this lab, your Course, Department and Registration classes will have similar functionality and the ability to talk to each other. In order to make this happen, your tables will use SQL joins. You will be able to do things like find all courses by department name or add a course to a particular student.
###A Note On Integration Tests Integration testing tests how your models interact with each other. In order for the integration tests to pass completely, you will need to build methods that relate Course and Student to Department. They will go in the Course and Student classes.
###Department
def course
#find all courses by department_id
end
def add_course(course)
#add a course to a department and save it
end
###Course
def department
#successfully gets department
end
def department=(department)
#set department id when deparment is set
end
def students
#find all students by course_id
end
def add_student(student)
#add a student to a particular course and save them
end