Concept explainers
a.
Refer the university schema from the textbook for the following subparts.
a.
![Check Mark](/static/check-mark.png)
Explanation of Solution
Query:
Select title from where dept_name= ‘Comp.Sci’ and credits=3
Explanation:
- In the above query, “Select”, “from”, and “where” are the keywords in Structured Query Language (SQL).
- This query selects the title of courses where department matches with “Comp.Sci” department and credits is equal to “3”.
b.
Explanation of Solution
Query:
Select distinct student.ID from (student join takes using (ID)) join (instructor join teaches using(ID)) using(course_id,sec_id,semester,year) where instructor.name= ‘Einstein’
Explanation:
- In the above query, “Select”, “distinct”, “from”, “join”, “using” and “where” are the keywords in Structured Query Language (SQL).
- In this query, the join operation is performed between student and instructor table using the ID’s.
- Then it retrieves the fields such as course id, section id, semester and year of the student. In that fields, select the distinct student ID taught by the instructor name “Einstein”.
c.
Explanation of Solution
Query:
Select max(salary) from instructor
Explanation:
- In the above query, “Select”, “from”, and “max” are the keywords in Structured Query Language (SQL).
- This query selects the maximum salary of the instructor from instructor table.
d.
Explanation of Solution
Query:
Select ID,name from instructor where salary=(select max(salary) from instructor)
Explanation:
- In the above query, “Select”, “from”, and “where” are the keywords in Structured Query Language (SQL).
- This query selects the ID and name from the instructor table where salary is equal to maximum salary from the instructor table.
e.
Explanation of Solution
Query:
Select course_id,sec_id,count(ID) from section natural join takes where semester= ‘Fall’ and year=2017 group by course_id, sec_id
Explanation:
- In the above query, “Select”, “from”, “natural join”, “group by” and “where” are the keywords in Structured Query Language (SQL).
- This query selects the course id, section id and count of enrollment of each section where semester is “Fall” season and year is “2017”.
f.
Explanation of Solution
Query:
Select max(enrollment) from (select count(ID) as enrollment from section natural join takes where semester= ‘Fall’ and year=2017 group by course_id, sec_id)
Explanation:
- In the above query, “Select”, “from”, “natural join”, “group by” and “where” are the keywords in Structured Query Language (SQL).
- This query selects the number of IDs from enrolment sections where semester is “Fall” season and year is “2017”.
- After selecting number of IDs, select the maximum enrollment from all section.
g.
Explanation of Solution
Query:
With sec_enrollment as (select course_id,sec_id,count(ID) from section natural join takes where semester= ‘Fall’ and year=2017 group by course_id, sec_id)
Select course_id,sec_id from sec_enrollment where enrollment=(select max(enrollment) from sec_enrollment)
Explanation:
- In the above query, “Select”, “from”, “natural join”, “group by” and “where” are the keywords in Structured Query Language (SQL).
- This first inner query selects the number of IDs from enrolment sections where semester is “Fall” season and year is “2017”.
- After selecting number of IDs, select the maximum enrollment from all section.
- It is stored in temporary view as “sec_enrollment”.
- Next the second inner query selects the maximum enrollment from “sec_enrollment” which displays the section id, course id from the table.
Want to see more full solutions like this?
Chapter 3 Solutions
Database System Concepts
- D. S. Malik, Data Structures Using C++, 2nd Edition, 2010arrow_forwardMethods (Ch6) - Review 1. (The MyRoot method) Below is a manual implementation of the Math.sqrt() method in Java. There are two methods, method #1 which calculates the square root for positive integers, and method #2, which calculates the square root of positive doubles (also works for integers). public class SquareRoot { public static void main(String[] args) { } // implement a loop of your choice here // Method that calculates the square root of integer variables public static double myRoot(int number) { double root; root=number/2; double root old; do { root old root; root (root_old+number/root_old)/2; } while (Math.abs(root_old-root)>1.8E-6); return root; } // Method that calculates the square root of double variables public static double myRoot(double number) { double root; root number/2; double root_old; do { root old root; root (root_old+number/root_old)/2; while (Math.abs (root_old-root)>1.0E-6); return root; } } Program-it-Yourself: In the main method, create a program that…arrow_forwardI would like to know the main features about the following 3 key concepts:1. Backup Domain Controller (BDC)2. Access Control List (ACL)3. Dynamic Memoryarrow_forward
- In cell C21, enter a formula to calculate the number of miles you expect to drive each month. Divide the value of number of miles (cell A5 from the Data sheet) by the average MPG for the vehicle multiplied by the price of a gallon of gas (cell A6 from the Data sheet).arrow_forwardMicrosoft Excelarrow_forwardIn cell C16, enter a formula to calculate the price of the vehicle minus your available cash (from cell A3 in the Data worksheet). Use absolute references where appropriate—you will be copying this formula across the row what fomula would i use and how do i solve itarrow_forward
- What types of data visualizations or tools based on data visualizations have you used professionally, whether in a current or past position? What types of data did they involve? What, in your experience, is the value these data views or tools added to your performance or productivity?arrow_forwardQuestion: Finding the smallest element and its row index and column index in 2D Array: 1. Write a public Java class min2D. 2. In min2D, write a main method. 3. In the main method, create a 2-D array myArray with 2 rows and 5 columns: {{10, 21, 20, 13, 1}, {2, 6, 7, 8, 14}}. 4. Then, use a nested for loop to find the smallest element and its row index and column index. 5. Print the smallest element and its row index and column index on Java Consolearrow_forward(using R)The iris data set in R gives the measurements in centimeters of the variables sepal length and width andpetal length and width, respectively, for 50 flowers from each of 3 species of iris, setosa, versicolor, andvirginica. Use the iris data set and the t.test function, test if the mean of pepal length of iris flowers isgreater than the mean of sepal length.The iris data set in R gives the measurements in centimeters of the variables sepal length and width andpetal length and width, respectively, for 50 flowers from each of 3 species of iris, setosa, versicolor, andvirginica. Use the iris data set and the t.test function, test if the mean of pepal length of iris flowers isgreater than the mean of sepal length.arrow_forward
- Recognizing the Use of Steganography in Forensic Evidence (4e)Digital Forensics, Investigation, and Response, Fourth Edition - Lab 02arrow_forwardWrite a Java Program to manage student information of a university. The Javaprogram does the following steps:a) The program must use single-dimensional arrays to store the studentinformation such as Student ID, Name and Major.b) The program asks the user to provide the number of students.c) The program asks the user to enter the Student IDs for the number of studentsand stores them.d) The program asks the user to enter the corresponding names for the numberof students and stores them.e) The program then asks the user to provide the corresponding major for thestudents and stores them.f) The program then should display the following options:1. ID Search2. Major Enrollment3. Exitg) On selecting option 1, the user can search for a student using Student ID. Theprogram asks the user to enter a Student ID. It then should print thecorresponding student’s details such as Name and Major if the user providedStudent ID number is present in the stored data. If the user’s Student IDnumber does not…arrow_forward(a) Algebraically determine the output state |q3q2q1q0> (which is a 4-qubitvector in 16-dimensional Hilbert space). Show all steps of your calculations. (b) Run a Qiskit code which implements the circuit and append threemeasurement gates to measure the (partial) output state |q2q1q0> (which is a 3-qubit vector in 8-dimensional Hilbert space). this is for quantum soft dev class, you can use stuff like Deutsch Jozsa if u wantarrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)