![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
thumb_up100%
Chapter 3, Problem 30E
Explanation of Solution
Explanation:
- For numeric values it will always be zero. But when there is a null value the answer will be undefined.
- When there is any instant with value equal to null then the answer will be undefined which is not equal to zero...
Expert Solution & Answer
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Students have asked these similar questions
Consider the following SQL query on the university schema:select avg(salary) - (sum(salary) / count(*))from instructorWe might expect that the result of this query is zero since the average of a setof numbers is defined to be the sum of the numbers divided by the number ofnumbers. Indeed this is true for the example instructor relation in Figure 2.1.However, there are other possible instances of that relation for which the resultwould not be zero. Give one such instance, and explain why the result wouldnot be zero.
Consider the following SQL Query:
SELECT FNAME, DNAME
FROM EMP AS E, DEPT AS D
WHERE E.DNO = D.DNUMBER AND D.DNAME='CCI' AND
SALARY > 15000;
Draw the initial query tree for the above SQL query, and then show
how
the query tree is optimized by applying the Heuristic Rules. (You
need to show the tree after applying a rule).
PLZ help with the following: IN SQL
Let R (A, B, C) be a relation schema. What happens if we execute the following query?
SELECT* FROM R WHERE A=D;
Select one:
a. We get an error.
b. The query executes successfully but returns no tuples.
c. The query returns all the tuples in R.
Chapter 3 Solutions
Database System Concepts
Ch. 3 - Prob. 1PECh. 3 - Prob. 2PECh. 3 - Prob. 3PECh. 3 -
Suppose that we have a relation marks(ID, score)...Ch. 3 - Suppose that we have a relation marks(ID, score)...Ch. 3 -
The SQL like operator is case sensitive (in most...Ch. 3 - Prob. 7PECh. 3 - Prob. 8PECh. 3 - Prob. 9PECh. 3 - Prob. 10PE
Ch. 3 - Prob. 11ECh. 3 - Prob. 12ECh. 3 - Prob. 13ECh. 3 -
Consider the insurance database of Figure 3.17,...Ch. 3 - Prob. 15ECh. 3 - Prob. 16ECh. 3 - Prob. 17ECh. 3 - Prob. 18ECh. 3 -
List two reasons why null values might be...Ch. 3 - Prob. 20ECh. 3 - Prob. 21ECh. 3 - Prob. 22ECh. 3 - Prob. 23ECh. 3 - Prob. 24ECh. 3 - Prob. 25ECh. 3 - Prob. 26ECh. 3 - Using the university schema, write an SQL query to...Ch. 3 - Prob. 28ECh. 3 - Prob. 29ECh. 3 - Prob. 30ECh. 3 - Prob. 31ECh. 3 - Prob. 32ECh. 3 - Prob. 33ECh. 3 - Prob. 34ECh. 3 - Prob. 35E
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The aim of assignment 1 is to implement a database schema and execute different types of SQL queries in Oracle SQL developer. Given the following relational schema: Student (studid, FirstName, LastName, Email, phoneNumber, DateofBirth, GPA) Club (clubid, ClubName, #studid) MemberOf (#clubid, #studid, joiningDate ) Activities (actid, actdt, place, durationNbHour) Organize (#actid , #clubid , fee) 1. Write SQL queries to create the following tables according to the below descriptions. Table name: Student studid |Char(9) Primary key FirstName Varchar2(50) NOT NULL LastName Varchar2(50) NOT NULL Email Varchar2(50) NOT NULL, UNIQUE phoneNumber Number(8) NOT NULL, UNIQUE DateofBirth Date NOT NULL GPA Number(1,2) NOT NULL Table name: Club clubID Number(3) Primary key ClubName Varchar2(20)NOT NULL NULL, UNIQUE, NOT Foreign key studid Char(9) Table Name: MemberOf ClubID Number(3) Primary Key, Foreign Key Studid Char(9) Primary Key, Foreign Key joiningDate Date Table Name: Activities Actid…arrow_forwardConsider the following SQL query on the university schema: select avg(salary)-(sum(salary) / count(*)) from instructorWe might expect that the result of this query is zero since the average of a set of numbers is defined to be the sum of the numbers divided by the number of numbers. Indeed this is true for the example instructor relation in Figure 2.1. However, there are other possible instances of that relation for which the result would not be zero. Give one such instance, and explain why the result would not be zero.arrow_forwardThe following SQL queries use the instances of R1 of "Reserves" the instances of B1 of "Boats", and the instances of S1 of "Sailors" relation. An instance R1 of Reserves bid 101 103 103 day 10/10/96 11/12/96 10/11/96 12/01/96 12/05/96 10/10/09 10/10/98 104 10/07/98 11/10/98 09/08/98 09/05/98 09/08/98 SIC 22 22 31 31 22 22 31 64 64 74 103 102 104 102 101 102 103 An instance B1 of Boats bid 101 102 103 bname Interlake Interlake Clipper Marine 104 bcolor blue red green red An instance S2 of Sailors SIG 28 31 21 44 26 58 22 22 29 29 22 32 2 64 21 74 85 95 71 sname yuppy Tubber guppy rusty Dustin Brutus Andy Horte Horatio Zorba Art Bob Amy rating 81 5 10 11 1 & |10|| El 3 115 age 35 155 135 135 45 33 25 135 18 25 635 46 1.If we wish to list out only the names and ratings of the sailors, we can write this in SQL statement as 2.Find out only the names and ages of sailors. 3.To find out the names and ratings of sailors with a rating above 8, we can combine two of the preceding queries as:…arrow_forward
- Let's wa(k through a review of basic SQL syntax, using as an example the database that was mentionedearlier. This database has the following simple structure(* indicates a primary key):Courses: CourseID*, CourseName, TeacherIDTeachers: TeacherID*, TeacherNameStudents; StudentID*, StudentNameStudentCourses: CourseID*, StudentID*Using the above table, implement the following queries.Query 1: Student Enrollment Query 2: Teacher Class Sizearrow_forwardWrite SQL queries DDL Queries to implement the following Relational Model i.e. create the Nurse and Care_Center relations (including primary key and foreign key). Intelligently write data types.arrow_forwardHow does the SQL ORDER BY clause work, and why might it be important when using database functions like MAX() or MIN()? Provide a query illustrating its usage.arrow_forward
- Implement the following ER model and sample data using Oracle SQL Developer and your CDM Oracle database account. You will submit a SQL script file and its entire outputs. The table name should be STUDENTS (plural). Each StudentID should be a five-digit number. LastName and FirstName must be entered. 12341, Doe, Jane 12342, [last name of your choice], [first name of your choice] 12343, [last name of your choice], [first name of your choice] Enrollment The table name should be ENROLLMENTS (plural). Quarters should be something like 2021Fall, 2022Winter, 2022Spring, 2022Summer1, 2022Summer2, 2022Summer10, and so forth. Grades in future quarters are entered as null. 2021Fall, 12341, IS411, A 2022Winter, 12342, IS421, null 2022Summer10, 12343, [course number of your choice], null Course The table name should be COURSES (plural). CourseNumbers should be strings of up to seven characters (e.g., IS411, DSC411, CSEC440). The course and instructor names should be strings of characters.…arrow_forwardConsider the following database table named water_schemes: water- schemes scheme_no district_name capacity Ajmer 1 20 1 Bikaner 10 2 Bikaner 10 3 Bikaner 20 1 Churu 10 Churu 20 1 Dungargarh 10 The number of tuples returned by the following SQL query is with total(name, capacity) as select district_name, sum(capacity) from water_schemes group by district_name with total_avg(capacity) as select avg(capacity) from total select name from total, total_avg where total.capacity 2 total_avg.capacityarrow_forwardConsider the query:with dept total (dept name, value) as(select dept name, sum(salary)from instructorgroup by dept name),dept total avg(value) as(select avg(value)from dept total)select dept namefrom dept total, dept total avgwhere dept total.value >= dept total avg.value;Rewrite this query without using the with construct.arrow_forward
- Write the following queries, based on the database schema Product(maker, model, type)PC(model, speed, ram, hd, price)Laptop(model, speed, ram, hd, screen, price)Printer(model, color, type, price) of Exercise 2.4.1. You should use at least one subquery in each of your answersand write each query in two significantly different ways (e.g., using differentsets of the operators EXISTS, IN, ALL, and ANY). a) Find the makers of PC's with a speed of at least 3.0.b) Find the printers with the highest price.! c) Find the laptops whose speed is slower than that of any PC.! d) Find the model number of the item (PC, laptop, or printer) with thehighest price.! e) Find the maker of the color printer with the lowest price.!! f) Find the maker(s) of the PC(s) with the fastest processor among all thosePC's that have the smallest amount of RAM.arrow_forwardConsider a database with the following relations: Employee (Employee ID, Name, salary, startDate) Department (Department ID, Name, capacity) Project (Employee ID. Department ID, name, budget, expectedDuration) Develop the following query in SQL: Display employees (by name and salary) working on the "Engine" project and with salary higher than the average salary of all employees.arrow_forwardTake the university schema SQL query: select avg(salary) - (sum(salary)/count(*)) from teacher Since the average of a set of numbers is the sum divided by the number, this query should return 0. Figure 2.1's instructor relation illustrates this. However, that relation can have non-zero results. Give an example and explain why the result is not zero.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- 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)
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education