CS5481 Data Engineering Tutorial 1 SQL versus relational algebra
1. Most of the databases nowadays are relational databases.
2. To make data available to users, the most important issue in databases is how users specify
requests for retrieving data.
3. The SQL language is the most widely used query language today.
4. The relational algebra forms the basis for SQL and is the internal form used for query
processing and optimization.
Basic use of SQL (that you should have learnt)
A few 1.
2.
3.
4.
5.
6.
7.
examples of using SQL to retrieve data from the university database at the back. Find the names of all instructors.
Find the instructor names and the ID of courses they taught for all instructors who have taught some courses.
Find the instructor names and the ID of courses they taught for all instructors in the Computer Science department who have taught some courses.
Find the ID of all courses taught in Semester A 2015 but not in Semester B 2014.
Find the average salary of instructors in the Computer Science department.
Find the average salary of instructors in each department.
Display a list of all students, with their ID, name, dept_name and tot_cred, along with the courses that they have taken.
How to include those students who have not taken any courses in the list?
CS5481 Data Engineering Tutorial 1 Schema Diagram for University Database