JJ Pet Shop Sdn. Bhd. hires you to be their Project Manager cum Database Designer for their new project, a pet boarding management system. Assume you have normalized the raw data into the 3rd Normal Form. Below shows the Pet, Owner, Branch and Boarding tables. PET (id, name, type, breed, ownerIC, dietRemark) OWNER (ic, name, address, phoneNo, points) BRANCH (id, city, capacity) BOARDING (id, petID, branchID, dateIn, dateOut) (i) Write an SQL statement that display all branches of JJ Pet Shop Sdn. Bhd. (ii) value for each value needed. Points by default is 0. Write an SQL statement to insert a new record in the OWNER table. Create your own (iii) Write an SQL statement to delete one record in the BRANCH table. Create your own value for each value needed. (iv) Write an SQL statement to update owner 900111126104's phone number to "0191234567". (v) Write an SQL statement that display all pets with having diet remark as either "seafood allergic" or "kibbles only". (vi) Write an SQL statement that display all branches that can accommodate 50 or more pets per day. (vii) Write an SQL statement that display the longest boarding time. (viii) Write an SQL statement that count all boarding in the year 2000. (ix) Write an SQL statement to display the petť's ID, pet's type, the city's name of the branch and the number of the total days the pet's been boarded in the branch. Sort your answer base on the boarding ID. (x) Write an SQL that calculates the total price for each boarding. Total price is calculated by multiplying the total number of days with RM15. Display the total price in a column labelled "Total Payment". You should only display the boarding ID, and the total payment column. (xi) Write an SQL statement that shows the average number of days pet owner's sends their pet for boarding.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
JJ Pet Shop Sdn. Bhd. hires you to be their Project Manager cum Database Designer for their
new project, a pet boarding management system. Assume you have normalized the raw data
into the 3rd Normal Form. Below shows the Pet, Owner, Branch and Boarding tables.
PET (id, name, type, breed, ownerIC, dietRemark)
OWNER (ic, name, address, phoneNo, points)
BRANCH (id, city, capacity)
BOARDING (id, petID, branchID, dateIn, dateOut)
(i)
Write an SQL statement that display all branches of JJ Pet Shop Sdn. Bhd.
(ii)
value for each value needed. Points by default is 0.
Write an SQL statement to insert a new record in the OWNER table. Create your own
(iii) Write an SQL statement to delete one record in the BRANCH table. Create your own
value for each value needed.
(iv) Write an SQL statement to update owner 900111126104's phone number to
"0191234567".
(v) Write an SQL statement that display all pets with having diet remark as either "seafood
allergic" or "kibbles only".
(vi) Write an SQL statement that display all branches that can accommodate 50 or more
pets per day.
(vii) Write an SQL statement that display the longest boarding time.
(viii) Write an SQL statement that count all boarding in the year 2000.
(ix) Write an SQL statement to display the petť's ID, pet's type, the city's name of the branch
and the number of the total days the pet's been boarded in the branch. Sort your answer
base on the boarding ID.
(x)
Write an SQL that calculates the total price for each boarding. Total price is calculated
by multiplying the total number of days with RM15. Display the total price in a column
labelled "Total Payment". You should only display the boarding ID, and the total
payment column.
(xi) Write an SQL statement that shows the average number of days pet owner's sends their
pet for boarding.
Transcribed Image Text:JJ Pet Shop Sdn. Bhd. hires you to be their Project Manager cum Database Designer for their new project, a pet boarding management system. Assume you have normalized the raw data into the 3rd Normal Form. Below shows the Pet, Owner, Branch and Boarding tables. PET (id, name, type, breed, ownerIC, dietRemark) OWNER (ic, name, address, phoneNo, points) BRANCH (id, city, capacity) BOARDING (id, petID, branchID, dateIn, dateOut) (i) Write an SQL statement that display all branches of JJ Pet Shop Sdn. Bhd. (ii) value for each value needed. Points by default is 0. Write an SQL statement to insert a new record in the OWNER table. Create your own (iii) Write an SQL statement to delete one record in the BRANCH table. Create your own value for each value needed. (iv) Write an SQL statement to update owner 900111126104's phone number to "0191234567". (v) Write an SQL statement that display all pets with having diet remark as either "seafood allergic" or "kibbles only". (vi) Write an SQL statement that display all branches that can accommodate 50 or more pets per day. (vii) Write an SQL statement that display the longest boarding time. (viii) Write an SQL statement that count all boarding in the year 2000. (ix) Write an SQL statement to display the petť's ID, pet's type, the city's name of the branch and the number of the total days the pet's been boarded in the branch. Sort your answer base on the boarding ID. (x) Write an SQL that calculates the total price for each boarding. Total price is calculated by multiplying the total number of days with RM15. Display the total price in a column labelled "Total Payment". You should only display the boarding ID, and the total payment column. (xi) Write an SQL statement that shows the average number of days pet owner's sends their pet for boarding.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 7 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY