Get the step-by-step solution for this question inside the Vidyadip app.
Get the answer in the appGenerate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Given the following relation: STUDENT
Table: STUDENT
| No. | Name | Age | Department | Dateofadm | Fee | Sex |
| 1 | Pankaj | 24 | Computer | 10/01/97 | 120 | M |
| 2 | Shalini | 21 | History | 24/03/98 | 200 | F |
| 3 | Sanjay | 22 | Hindi | 12/12/96 | 300 | M |
| 4 | Sudha | 25 | History | 01/07/99 | 400 | F |
| 5 | Rakesh | 22 | Hindi | 05/09/97 | 250 | M |
| 6 | Shakeel | 30 | History | 27/06/98 | 300 | M |
| 7 | Surya | 34 | Computer | 25/02/97 | 210 | M |
| 8 | Shikha | 23 | Hindi | 31/07/97 | 200 | F |
Write SQL commands for the following queries
(a) To show all information about the students of History department.
(b) To list the names of female students who are in Hindi department.
(c) To list the names of all students with their date of admission in ascending order.
(d) To display student’s name, fee, age for male students only.
(e) To count the number of students with Age>23.
Table: Product
| Pno | Name | Qty | PurchaseDate |
| 101 | Pen | 102 | 12-12-2011 |
| 102 | Pencil | 201 | 21-02-2013 |
| 103 | Eraser | 90 | 09-08-2010 |
| 109 | Sharpener | 90 | 31-08-2012 |
| 113 | Clips | 900 | 12-12-2011 |
(a) Write the names of most appropriate columns, which can be considered as candidate keys.
(b) What is the degree and cardinality of the above table?