using the University database
we have provided you with the creation script using the relational schema of a University as shown below. You should run this script in MySQL Workbench and use this database to extract the necessary information.
The script is based on the following relational schema:
Subject (subjectCode, departmentName)
TeachingStaff (employeeNumber, firstName, surname, departmentName)
Instructs (employeeNumber, subjectCode, studentID, position)
Student (studentID, studentSurname, studentInitials, gender)
TeachingCredentials (employeeNumber, degreecode, uni, awardYear)
Enrolment (studentId, degreeCode, year, uni, timeMode, placeMode, completed)
Grades (studentID, subjectCode, grade)
Column Constraints
Other Information
Query 1
Write a query to list the full names, (i.e. first name and last name combined) and degree code of teaching staff who received their credentials from a university other than QUT.
Query 2
Write a query to list the id, name and gender of all students who are enrolled part time. Sort the result in alphabetical order of student surname.
Query 3
Write a query to count how many students each member of the teaching team instructs. In your result-set, include the teacher’s ID, surname and the number of students they teach.
Query 4
Write a query that lists the first name and degree of all teachers that are not teaching in 2019.
Query 5
Write a query to produce some statistics about each student. Your result-set should include the student ID, their surname, their current GPA, whether they are part time or full time and external or internal. Only show results for students who have received 1 or more grades.
Query 6
Write a query that will produce some statistics about each subject to report to the University exec team. Your result-set should include the following:
Below are the SQL queries for the university database.
1) Function CONCAT() is used to give combines first name and surname of teacher. Two tables are joined here on common attributes and filter is used in where clause.
SELECT CONCAT(t.firstName, ' ', t.surname) AS Name,
tc.degreecode
FROM TeachingStaff As t
INNER JOIN TeachingCredentials AS tc
ON t.employeeNumber = tc.employeeNumber
WHERE tc.uni <> 'QUT'
2) Two tables are joined here on common attributes to get all the relevant column. Order by is used to sort the result by studentSurname.
SELECT s.studentID, s.studentSurname, s.studentInitials,
s.gender
FROM Student AS s
INNER JOIN Enrolment AS e
ON e.studentID = s.studentID
WHERE e.timeMode = 'PT'
ORDER BY s.studentSurname DESC;
3) Aggregate function count() is used to get the number of student by teacher. The result is grouped by employeeNumber and their surname.
SELECT t.employeeNumber, t.surname, COUNT(i.studentID)
FROM TeachingStaff AS t
INNER JOIN Instructs AS i
ON i.employeeNumber = t.employeeNumber
GROUP BY t.employeeNumber, t.surname;
4) Two tables are joined here to get the result. Filter is done in where clause to get only the desired rows.
SELECT t.firstName, tc.degreeCode
FROM TeachingStaff As t
INNER JOIN TeachingCredentials AS tc
ON t.employeeNumber = tc.employeeNumber
WHERE tc.awardYear <> '2019';
5) Three tables are joined to get all the relevant columns in the result set.
SELECT s.studentID, s.studentSurname, g.grades, e.timeMode,
e.placeMode
FROM Student AS s
INNER JOIN Enrolment AS e
ON e.studentID = s.studentID
INNER JOIN Grades AS g
ON g.studentID = e.studentID
WHERE g.grades > 1;
using the University database we have provided you with the creation script using the relational schema...
Please build an Entity Relationship Diagram using the following information: Build a database for a regional university in Western New York called Ithica South University. The university database administrator needs to keep track of the students that attend the university, the courses offered by the university, and the university employees. Ithica tracks the first and last name of each student, as well as their target degree. The university keeps track separately of two subclasses of students, as students are either...
You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database design process provided the following data requirements for the University Database system. Using the following requirements answer this...
Fly-By-Night University (FBNU) has several campuses and has recently decided to centralize their student records. The university’s main office needs to develop a new system to house student records and course information. You have been hired to make recommendations regarding the design of the new system. You have met with key personnel for the purposes of requirements gathering. You have analyzed the current system and the goal for the future system. These are the items you have determined: Faculty are...
Instructions Fly-By-Night University (FBNU) has several campuses and has recently decided to centralize their student records. The university’s main office needs to develop a new system to house student records and course information. You have been hired to make recommendations regarding the design of the new system. You have met with key personnel for the purposes of requirements gathering. You have analyzed the current system and the goal for the future system. These are the items you have determined: Faculty...
Write Ten SQL SELECT statements to query the STUDENT schema you created for practice lab. 4. List all cities that have 10 or more students and instructors combined. Show city, state, number of student residents, number of instructor residents, and total student/instructor residents in that city. Sort by total in descending order. 5. List the instructor id and name of the instructors that teach fewer than 10 sections. 7. Find how many students are enrolled in sections taught by Todd...
Budgeting for an Academic Department at a State University: Can You Believe the Numbers? INTRODUCTION You are the senior accounting faculty member in the business school and your dean, Dean Weller, is asking for help. She is very discouraged after a midyear budget meeting with the Vice President of Finance. The college's Department of Social Work has a large budget deficit, and because of this the VP is inclined towards closing the department entirely or closing its bachelor's program. The...
Case Study 1: Should a Computer Grade Your Essays? Would you like your college essays graded by a computer? Well, you just might find that happening in your next course. In April 2013, EdX, a Harvard/MIT joint venture to develop massively open online courses (MOOCs), launched an essay-scoring program. Using arti ficial intelligence technology, essays and short answers are immediately scored and feedback tendered, allowing students to revise, resubmit, and improve their grade as many times as necessary. The non-profit...
Please Use your keyboard (Don't use handwriting) *******Please re-write my answer I need new and unique answers, please. (Use your own words, don't copy and paste)***** Case Study 1: Should a Computer Grade Your Essays? Would you like your college essays graded by a computer? Well, you just might find that happening in your next course. In April 2013, EdX, a Harvard/MIT joint venture to develop massively open online courses (MOOCs), launched an essay-scoring program. Using artificial intelligence technology, essays...
CASE 6 Using Ex-Cons to Teach Business business school with a master's degree, worked as a Ethics at MCL devised a 56 million money launderin home and served two years in federal prison. AL After the Enron scandal and he was the way he became divorced and unemployed, and Tyon, and Adelphia debacles that wed a couple of to move back in with his parents. As Busw. We years later, the business ethics industry really started to reported, it was...