Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Read the following scenario and answer ALL questions in the answer sheet provided. JJ Pet Shop Sdn. Bhd. hires you to be their Project Manager
Read the following scenario and answer ALL questions in the answer sheet provided. 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) (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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started