Q. (a) Mr. James created a table CLIENT with 2 rows and 4 columns. He added 2 more rows to it and deleted one column. What is the Cardinality and Degree of the Table CLIENT ?
(b) Consider the following table FITNESS with details about fitness products being sold in the store. Write command of SQL for (i) to (iv).>
(i) To display the names of all the products with price more than 20000.
(ii) To display the names of all products by the manufacturer "Aone".
(iii) To change the price data of all the products by applying 25% discount reduction.
(iv)To add a new row for product with the details
"P7", "Vibro Exerciser", 28000, "Aone".
Answer =
(a)
Cardinality = 4
Degree = 3
(b)
(i)
select PNAME from FITNESS
Where price > 20000;
(ii)
select pname from FITNESS
Where manufacturer = “Aone”;
(iii)
update FITNESS
Set price = price * 0.75 ;
(iv)
insert into FITNESS values (“P7” , “Vibro Exerciser”, 28000, "Aone" ) ;
in 3rd part the set price is price-(price*0.25);
ReplyDeleteYou are wrong , question say for discount of 25% so our price will become 75% of original price.
DeleteIn 1st part price is more than 20000,but you put less than sign
ReplyDeleteSorry .: (
DeleteIt's ok brother u are doing so much hard work 👍
DeleteThank You : )
DeleteVery helpful......thank u @pathwalla
ReplyDeleteWelcome : )
DeleteIn 3 rd part can't it be
ReplyDeleteSet Price = Price - Price*0.25
qstin 1 They have asked to display the name of the products u have given * A bit confused
ReplyDeleteOk.
DeleteIn 2nd question no. saying to display names of Fitness table whose Manufacturer is 'Aone'
ReplyDeleteWe will write-
select PNAME from FITNESS where Manufacturer is 'Aone';
I have also written it.
DeleteThank You Sooo Muchhhh Brother for putting up the solutionss
ReplyDeleteWelcome : )
DeleteHii..
ReplyDeleteHiii.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )