Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do the database using phpmyAdmin ,and screenshot 1. This lab tutorial is to access CLO2: Construct database queries using Structured Query Language (SQL). 2. This

image text in transcribed

image text in transcribed

do the database using phpmyAdmin ,and screenshot

1. This lab tutorial is to access CLO2: Construct database queries using Structured Query Language (SQL). 2. This is a one-week lab tutorial. Upload your work to Smartv3 one week after the hand- out date. 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) (1) Write an SQL statement that display all branches of JJ Pet Shop Sdn. Bhd. (ii) Write an SQL statement to insert a new record in the OWNER table. Create your own value for each value needed. Points by default is 0. (ii) 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions