Answer 1:
select * from Course where deptId in ('EE','MGT')
Answer 2:
Select Name from Sudent where StudId in ( select StudId from Transcript group by StudId having CrsCode='Spring 1997' and CrsCode='fall 1998' );
NOTE - I am little bit confused between crsCode and crsName. i mean given data"Spring 1997" and "fall 1998" belongs to crsCode or crsName. So i am writing the another query that consumes data as crsName if that is the case.
Select Name from Sudent where StudId in ( select StudId from Transcript group by StudId having CrsCode in (select crsCode from course where crsName in('Spring 1997' , 'fall 1998' )));
5.10 Express each of the following queries in relational algebra and (ii) SQL using the Student...
Give the following queries in the relational algebra using the following relational schema: Student (sid, name, age, address, email, cgpa) enrolledIn (sid, modulecode, grade) module (modulecode, modulename, credits, lecturername) a) What are the names of students enrolled in module code “cs3020”? b) Give the module code of all the modules that are taught by the teacher named “Altaf”? c) Who teaches the module with code”cs1500”? d) Give the name of all the teachers teaching the student with id”12f6778”.
Express the following SQL queries in relational algebra: 2) What are the singers who have never scheduled the concert at Saint-Denis 2? SELECT singer FROM Show WHERE singer NOT IN (SELECT singer FROM Show S, Hall H WHERE S.hall_id = H.hall_id AND H.name = 'Saint-Denis 2')
Express the following SQL queries in relational algebra: 1) What are the dates of the concert of Lionel Richie at the Bell Center? SELECT date FROM Concert C, Show S, Hall H WHERE C.show_id = S.show_id AND S.hall_id = H.hall_id AND S.singer = 'Lionel Richie' AND H.name = ‘Bell Center’
Create sql queries to find the following
miscrosoft access compatible commands please
9. Courses for which at least three students earned a grade of A, showing the grade and the course code 10. Semesters when the highest number of courses have been scheduled, showing the semester name and the number of sections 11. (Extra) Professors that are not students, and students that are not professors, showing their ID and SSN 12. (Extra) Semesters for which all courses are taught by...
Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber , CourseTitle, NumberOfUnits, RoomNumber, DayTime), where DayTime is of the form MW 1:0-2:00. Enrollment = (SSN , CourseNumber, Grade) Express the following queries using SQL statements with minimum number of tables and operations. a. List the SSN and Name of every student who has no grade in at least one course. b. List the name of every student who enrolled in at least two courses....
Problems and Exercises 1 through 9 are based on the dass scheduling
3NF relations along with some sample data shown in Figure 6-11.
Not shown in this figure are data for an ASSIGNMENT relation,
which represents a many-to-many relationship between faculty and
sections.4. Write SQL data definition commands for each of the following queries:a. How would you add an attribute, Class, to the Student
table?b. How would you remove the Registration table?c. How would you change the FacultyName field from...
10- Specify the following
queries in SQL on the database schema of Figure 2. a. Retrieve the
names of all senior students majoring in ‘CS’ (Computer Science).
b. Retrieve the names of all courses taught by Professor King in
2004 and 2005. c. For each section taught by Professor King,
retrieve the course number, semester, year, and number of students
who took the section. d. Retrieve the name and transcript of each
senior student (Class =4) majoring in CS. A...
Intro to database systems question:
Question2 (20 points, 5 points each) Consider the following relational schema as part of a university database Prof(sin, pname, o_ce, age, sex, specialty, dept did) Dept(did, dname, budget, num majors, chair sin) Assume the following queries are the most common queries in the workload for this university and they are almost equivalent in frequency and importance Assume that both B+ trees and hashed indexes are supported by the DBMS and that both single and multiple-attribute...
Question 1.Write a SQL statement for each of the following
questions based on the above tables (50 Points).
1) Create “Enrollment” table.
2) Change the credits of “Database” course from 2 to 3.
3) List the course titles (not Course_No) and grades John Doe
had taken.
4) Calculate average of Café Balance, and name new field as
Average Balance.
5) Create a roster for “Database” course (list student ID, last
name, first name, major, and status for each student enrolled...
Please provide the relation algebra, the oracle SQL code and the
output tuples for the following (Answer #6 only the BONUS
question). I have the others actually I have the BONUS, but I want
to compare with your solution to make sure I did it correctly.
Thank you very much!
LAB exercises 2 Write the Oracle DML query codes for the following questions and take the screen shot of the output. 1. Retrieve the name and address of all employees...