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" ) ;

17 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. in 3rd part the set price is price-(price*0.25);

    ReplyDelete
    Replies
    1. You are wrong , question say for discount of 25% so our price will become 75% of original price.

      Delete
  2. In 1st part price is more than 20000,but you put less than sign

    ReplyDelete
  3. Very helpful......thank u @pathwalla

    ReplyDelete
  4. In 3 rd part can't it be
    Set Price = Price - Price*0.25

    ReplyDelete
  5. qstin 1 They have asked to display the name of the products u have given * A bit confused

    ReplyDelete
  6. In 2nd question no. saying to display names of Fitness table whose Manufacturer is 'Aone'
    We will write-
    select PNAME from FITNESS where Manufacturer is 'Aone';

    ReplyDelete
  7. Thank You Sooo Muchhhh Brother for putting up the solutionss

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post