Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Faculty relation replaced with teacher ; FacultyID replaced with TeacherID ; facultyName replaced with teacherName Consider the following relations Pupil(studentNum Integer, studentName: String, Degree: String,

Faculty relation replaced with teacher ; FacultyID replaced with TeacherID ; facultyName replaced with teacherName image text in transcribed
Consider the following relations Pupil(studentNum Integer, studentName: String, Degree: String, Year: String, Age: Integer) Name.Sitring, class Time: String, classroom: String, facultylD: Integer) Registered Faculty(facultyID: Integet,faculty Name: String, departmentld: Integer) ntNum: Integer, courneName: String) Attributes of the Pupil relation: The student number is an & digit code, for example, 98712201. The student name is a combination of the first and last name, for example, Mary Jane. The degree option can be any program offered by the university, for example, Physics or Mathematics. Year has values: Y1 (year 1), Y2 (year 2) or Y3 (year Attributes of the Course relation: Course name is a 5 digit code, for example, CS11A or MS10A. Class time is a 15 digit string. for example, 09:00AM-11:00AM. Classroom names are a letter followed by three digits, for example, A123 The faculty ID is a 4 digit code, for example, 1001 (Natural Sciences). Attributes of the Registered relation: The student number is as described in the Pupil relation. The course name is as described in the Course relation. Note: Registered has one record per pupil-course pair such that the pupil is registered in the course Attributes of the Faculty relation: The faculty ID is as described in the Course relation. The faculty name is a 6 letter code, for example Nat Sci (Natural Sciences). The department ID is a 5 digit code, for example, 12345. Write the following queries in SQ)L. No duplicates should be printed in any of the answers 1. Find the names of all undergraduates (Year -Yl) who are registered in a course taught by John 2. Find the age of the oldest pupil who is either doing a Chemistry degree or registered in a course taught by John. 3. Find the names of all courses that either meet in classroom 1341 or have fifteen or more pupils registered

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions