Perform the following operations using SQL.
1. Create a Database ('fdb') using any one from Oracle, Sybase, DB-2, SQL Server or MySQL.
2. Create the following tables and fill them with the data.
Table Name: student
| id |
name |
birth |
gpa |
grad |
| 1 |
Anderson |
10/22/1987 |
3.9 |
2009 |
| 2 |
jones |
4/16/1990 |
2.4 |
2010 |
| 3 |
Hernandez |
8/12/1989 |
3.1 |
2011 |
| 4 |
Chen |
2/4/1990 |
3.2 |
2011 |
Table Name: courses
| id |
number |
name |
quarter |
| 1 |
CS142 |
CP II |
Winter 2015 |
| 2 |
ART101 |
Finger painting |
Fall 2014 |
| 3 |
ART101 |
Finger painting |
Winter 2015 |
| 4 |
PE204 |
Mud wreatling |
Winter 2015 |
Create a join table course_students describing which student took which courses.
| course_id |
student_id |
| 1 |
1 |
| 3 |
1 |
| 4 |
1 |
| 1 |
2 |
| 2 |
2 |
| 1 |
3 |
| 2 |
4 |
| 4 |
4 |
3. Write SQL query to select students having GPA greater than 3 and the result should be sorted according to name.
4. Update student's (Jones) GPA to 2.5.
5. Find all students who took a CS142 course.
6. Delete record of student named "Jones".
7. Add one column ("degree") to students table.
8. Delete table courses_ students.