Modern Database Management
13th Edition
ISBN: 9780134773650
Author: Hoffer
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 6.65PAE
Program Plan Intro
To list:
SQL query for the customer name, and number of vendors in the same state.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Q4
There are 9 workers for ASH Development Sdn. Bhd.
Unfortunately, there are only 4 rooms available for these workers. Every
week, a worker name is randomly selected to do odd jobs for the company.
When a worker has been selected randomly, a
these rooms are full. Based on Figure Q4, worker's ID number 0 (Umar) is
randomly selected for the first week, and the 4 boxes represent 4 rooms for
as shown in Table Q4.
room needs to be vacated if
workers.
Table Q4
Worker's ID
Worker's Name
Umar
1.
Lukman
Arif
Yusuf
Anas
Muadz
Aleef
Hafiz
8.
Amir
9.
Taufik
WI
4
6
2
9.
4
1
3
8
D
R2
R3
R4
W
W
W1
w1
Wi
w1
W1
w1
w1
wi
Wi
W1
2
3
4 56
78 9
1
2
3
4
5
6
8
9
Figure Q4
Investigate the number of page faults occur by illustrating the way how the room is managed
using the list of weekly random selection of workers as shown in Figure Q4 using the
following algorithms:
(a)
Optimal Page Replacement (OPR) replacement algorithm
2.
RRR
CUSTOMER
Customer table is composed of customer number, name and phone number.
Give and fill-in the appropriate attribute name for each of the column.
custID
123
124
125
126
reservelD
5001
5002
5003
5004
5005
5006
5007
RESERVATION
Each reservation is for one taxi. Reservation table is composed of reservation identification number, start
reservation date, end reservation date, reservation days requested by customers starting from reservation
date until end of reservation date, customer number that make the reservation and taxi number assigned
to the reservation.
Give and fill-in the appropriate attribute name for each of the column.
taxill
custName
Ahmad Bin Abdullah
Fatimah Binti Adam
LAI
LA2
Ruqayya Binti Idris
Sulaiman Bin Daud
LA3
LA4
startDate
01/10/2019
05/10/2019
05/10/2019
15/10/2019
20/10/2019
27/10/2019
02/11/2019
taxiType
endDate
03/10/2019
12/10/2019
08/10/2019
17/10/2019
25/10/2019
Sedan
Sedan
Van
Van
30/10/2019
04/11/2019
cust Phoneno
TAXI
Taxi table is composed of taxi…
Change to use the database frozenfood
Alter table customerOrder add column total as data type decimal size 7,2, not null,
default value of 0.0
Update table customerOrder, set column total equal to column quantity multiplied by
subquery
a. (select column price from table product where column productId in table
customerOrder equals column id in table product)
Update table customerOrder, set column orderStatelId equal to subquery
a. (select column id from table orderstate where state equals “Payment received")
Alter table customerPayment add column paymentDate as data type date, not null,
default value of (CURRENT_DATE) (Note: the parenthesis MUST be included)
Insert into table customerPayment, columns customerOrderId and total result set
returned from query
a. Select columns id and total from table customerOrder where column
orderStateld is equal to subquery
i. (select column id from table orderState where column state is equal to
"Payment received")
Write Test Case 1 as a SQL join query…
Chapter 6 Solutions
Modern Database Management
Ch. 6 - Define each of the following terms: dynamic view...Ch. 6 - Match the following terms to the appropriate...Ch. 6 - Prob. 6.3RQCh. 6 - Prob. 6.4RQCh. 6 - Prob. 6.5RQCh. 6 - Explain the relationship between EXISTS and...Ch. 6 - Prob. 6.7RQCh. 6 - Under what conditions can a UNION clause be used?Ch. 6 - Prob. 6.9RQCh. 6 - Explain why it is necessary to limit the kinds of...
Ch. 6 - Describe a set of circumstances for which using a...Ch. 6 - Prob. 6.12RQCh. 6 - Prob. 6.13RQCh. 6 - Prob. 6.14RQCh. 6 - Prob. 6.15RQCh. 6 - Prob. 6.16RQCh. 6 - Prob. 6.17RQCh. 6 - Prob. 6.18RQCh. 6 - Prob. 6.19RQCh. 6 - List for advantages of SQL-invoked routines.Ch. 6 - Prob. 6.21RQCh. 6 - Prob. 6.22RQCh. 6 - Prob. 6.23RQCh. 6 - This chapter discusses the data dictionary views...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Write SQL retrieval commands for each of the...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Write SQL queries to answer the following...Ch. 6 - Write SQL queries to answer the following...Ch. 6 - Write an SQL query to answer the following...Ch. 6 - Prob. 6.31PAECh. 6 - Prob. 6.32PAECh. 6 - Prob. 6.33PAECh. 6 - What do you need to do if a tutor signs up and...Ch. 6 - Prob. 6.35PAECh. 6 - Write the SQL query to find any tutors who have...Ch. 6 - Prob. 6.37PAECh. 6 - Write an SQL query to determine the total number...Ch. 6 - Prob. 6.39PAECh. 6 - Prob. 6.40PAECh. 6 - Prob. 6.41PAECh. 6 - Prob. 6.42PAECh. 6 - Prob. 6.43PAECh. 6 - Which tutor needs to be reminded to tum in...Ch. 6 - Prob. 6.45PAECh. 6 - Write an SQL query to list all product line names...Ch. 6 - Modify to include only those product lines the...Ch. 6 - Prob. 6.48PAECh. 6 - Prob. 6.49PAECh. 6 - Write an SQL query to display the order number,...Ch. 6 - Prob. 6.51PAECh. 6 - Prob. 6.52PAECh. 6 - Prob. 6.53PAECh. 6 - Prob. 6.54PAECh. 6 - Prob. 6.55PAECh. 6 - Prob. 6.56PAECh. 6 - Prob. 6.57PAECh. 6 - Prob. 6.58PAECh. 6 - Write an SQL query to list each customer who...Ch. 6 - Prob. 6.60PAECh. 6 - Modify Problem and Exercise 6-60 so that the list...Ch. 6 - Prob. 6.62PAECh. 6 - Prob. 6.63PAECh. 6 - Prob. 6.64PAECh. 6 - Prob. 6.65PAECh. 6 - Prob. 6.66PAECh. 6 - Prob. 6.67PAECh. 6 - Prob. 6.68PAECh. 6 - Prob. 6.69PAECh. 6 - Prob. 6.70PAECh. 6 - Prob. 6.71PAECh. 6 - Rewrite your answer to Problem and Exercise 6-71...Ch. 6 - Display the customer ID, name, and order ID for...Ch. 6 - Prob. 6.74PAECh. 6 - Prob. 6.75PAECh. 6 - Prob. 6.76PAECh. 6 - Prob. 6.77PAECh. 6 - Prob. 6.78PAECh. 6 - Prob. 6.79PAECh. 6 - Write an SQL query to list the order number,...Ch. 6 - Prob. 6.81PAECh. 6 - Prob. 6.82PAECh. 6 - Prob. 6.83PAECh. 6 - Prob. 6.84PAECh. 6 - Prob. 6.85PAE
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
- Ensure that the only legal values for the BDRMS column in the CONDO_UNIT table are 1, 2, or 3.arrow_forwardYou will be using the Colonial Adventure Tours database. How many current reservations does Colonial Adventure Tours have and what is the total number of persons for all reservations?arrow_forwardSQL Querry Find the list of courses who haven’t got any section opened in Spring 2019. (Use outer join!)arrow_forward
- The Driver Relationship team wants to ensure that the all driving license IDs in the active drivers table have the length of 7. Alter the ACTIVE_DRIVERS table created in Chapter 8, Activity 1 to check the length of the DRIVER_DRIVING_LICENSE_ID.arrow_forwardGiven the following relation that stores details of student registration: Stu_ID Name Town Province Course RegisteredDate S101 Malak Al Nadabi Al Khuwair Western ITDR2106 02-02-2020 S101 Malak Al Nadabi Al Khuwair Western ITDR1105 14-09-2019 S102 Nadar Al Hashli Daesit Southern ITDR1102 05-02-2020 S102 Nadar Al Hashli Daesit Southern ITDR1101 05-02-2020 S103 Basit Barkat Ruwi Central ITDR1105 06-02-2020 S104 Yeshan Al Khuwair Western ITDR2106 15-09-2019 If the functional dependencies are consistent with the above relation, put TRUE. If they are not, put FALSE. Stu_ID à Name, Town Town à Province Course à RegisteredDate RegisteredDate à Course Stu_ID, Course à RegisteredDate Stu_ID à Course Stu_IDarrow_forwardSome rows of the STUDENT table are shown below: CODE NAME GPA YEAR 291 ALEX 3.1 2 938 MICHELE 2.3 1 931 JHON 3.3 1 182 JOE 3.4 2 190 REY 2.0 2 330 RON 3.9 3 Which best describes the result of the query below? SELECT YEAR, AVG(GPA) FROM STUDENT WHERE GPA > 2.0 GROUP BY YEAR a. The average maximum GPA of all the students in each year. b. The year of the student with the maximum GPA. c. The average GPA of students with a GPA higher than 2.0 each year. d. The average GPA of the students with a GPA higher than 2.0.arrow_forward
- The query in the figure below. PROGRAM 1 Dept ID PROGRAM ACADEMIC ADVISOR STUDENT OFFICE PHONE 1 SID Name GPA Gender Dept ID Field: SID Table: STUDENT Sort Show Criteria: Name STUDENT PROGRAM PROGRAM GPA STUDENT Accounting" or Name and PROGRAM for the students who registered in the A program "Accounting" will be listed SID, Name, PROGRAM, and GPA for the students who registered in the B program "Accounting" will be listed SID and GPA for the students who registered in the program "Accounting" will be listed Name and GPA for the students who registered in the program "Accounting will be listedarrow_forwarddatabasearrow_forwardDesign a query of Stores with the following: Store Name, Store Size, Sum of order amounts, Percent of unpaid order amount, Weighted average volume discount. a. Volume discount: Percent difference between order amount and payment amount Design a query of Stores with the following: Store Name, Sum of all order amounts, Number of all orders, Top customer name, Top customer sum of invoice amounts, Top customer number of invoices, Top customer % of total invoice amount. (4 different tables : Orders table: orderid storeid customerid OrderDate OrderAmount paymentid PreferredOrder orderstatusid Customers table: customerid Name Company Type ContractDate PreferredEnrollmentDate PreferredVoidDate Payments Table: paymentid VolumeDiscount PaymentAmount PaymentDate PaymentMethod Stores Table : storeid Name Store Size Category ContractDate Type Order Status: orderstatusid Namearrow_forward
- Below is the answer I got but it is incorrect select PROJ_NUM, ROUND(SUM(ASSIGN_HOURS),2) as 'TOTAL_HOURS', ROUND(SUM(ASSIGN_CHARGE),2) as 'TOTAL_CHARGE' from ASSIGNMENT -- from ASSIGNMENT table group by PROJ_NUM; -- group by to aggregate per PROJ_NUMarrow_forwardhow do you Calculate a query in access database on how many customers there are for each lawn size? if the customers is 30 and the lawn size are 4 different lawns (commercial, large, medium and small?arrow_forward1. The data type for Borrower_name in Borrowers Table is: A. Short text C. Currency B. Long text D. Yes/No Borrowers Field Name Borrower ID Borrower Name Phone num Membership_activation Data Type AutoNumber Short Text Short Text Yes/Noarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr