Informatics Practices
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 ?
SQL Queries
2 Likes
Answer
For the table CLIENT, the cardinality is 4 and degree is 3.
Explanation — Initially, the table CLIENT created by Mr. James had 2 rows and 4 columns, with a cardinality of 2 and a degree of 4. After modifying the table by adding 2 rows and deleting 1 column, the new cardinality of the table CLIENT is 4 and the degree is 3.
Answered By
1 Like
Related Questions
Mr. Shankar created a table VEHICLE with 3 rows and 4 columns. He added 1 more row to it and deleted one column. What is the Cardinality and Degree of the Table VEHICLE ?
Consider the following table named "GYM" with details about fitness items being sold in the store. Write command of SQL for (i) to (iv).
Table : GYM
ICODE INAME PRICE BRANDNAME G101 Power Fit Exerciser 20000 Power Gymea G102 Aquafit Hand Grip 1800 Reliable G103 Cycle Bike 14000 Ecobike G104 Protoner Extreme Gym 30000 Coscore G105 Message Belt 5000 Message Expert G106 Cross Trainer 13000 GTC Fitness (i) To display the names of all the items whose name starts with "A".
(ii) To display ICODEs and INAMEs of all items, whose Brandname is Reliable or Coscore.
(iii) To change the Brandname to "Fit Trend India" of the item, whose ICODE as "G101".
(iv) Add a new row for new item in GYM with the details :
"G107", "Vibro exerciser", 21000, "GTCFitness"Consider the following table FITNESS with details about fitness products being sold in the store. Write command of SQL for (i) to (iv).
Table : FITNESS
PCODE PNAME PRICE Manufacturer P1 Treadmill 21000 Coscore P2 Bike 20000 Aone P3 Cross Trainer 14000 Reliable P4 Multi Gym 34000 Coscore P5 Massage Chair 5500 Regrosene P6 Belly Vibrator Belt 6500 Ambawya (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".Write SQL commands for the following on the basis of given table CLUB :
Table : CLUB
COACH_ID COACHNAME AGE SPORTS PAY SEX DATOFAPP 1 KUKREJA 35 KARATE 1000 M 1996-03-27 2 RAVINA 34 KARATE 1200 F 1998-01-20 3 KARAN 34 SQUASH 2000 M 1998-02-19 4 TARUN 33 BASKETBALL 1500 M 1998-01-01 5 ZUBIN 36 SWIMMING 750 M 1998-01-12 6 KETAKI 36 SWIMMING 800 F 1998-02-24 7 ANKITA 39 SQUASH 2200 F 1998-02-20 8 ZAREEN 37 KARATE 1100 F 1998-02-22 9 KUSH 41 SWIMMING 900 M 1998-01-13 10 SHAILYA 37 BASKETBALL 1700 M 1998-02-19 - To show all information about the swimming coaches in the club.
- To list names of all coaches with their date of appointment (DATOFAPP) in descending order.
- To display a report, showing coachname, pay, age and bonus (15% of pay) for all the coaches.