CBSE Guess > Papers > Important Questions > Class XII > 2012 > Computer Science > Computer Science Mr. Pradumna Singh Computer Science- CBSE CLASS XII Q. 19. What do you understand by Primary Key and Alternate Key. Explain with example. For - 4 Marks Ans : PRIMARY KEY : It is a set of one or more attributes that can uniquely identify tuples within the relation.
Here in above table EmpNo, MobileNo, PANCardNo & BankAccountNo are candidate keys. If EmpNo is made the primary key then remaining will automatically become alternate keys. Q.20. Consider the following table GAMES and PLAYER. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii). Table : GAMES
Table : PLAYER
Ans. : SELECT * FROM GAMES WHERE PRZMONEY<30000 AND SCHDATE<’01-JAN-2009’ ;> Ans. : SELECT NAME FROM PLAYERS ORDER BY NAME DESC; Ans. : UPDATE GAMES SET PRZMONEY=PRZMONEY+1000 WHERE GAMENAME LIKE ‘B%’; Ans. : ALTER TABLE PLAYER ADD(DOB DATE); Ans. :
Ans. : MIN(SCHDATE) MAX(PRZMONEY) 12-Nov-2008 40000 Ans. : AVG(PRZMONEY) Ans. : COUNT(DISTINCT NUMBER) 3 Prepared By: Mr. Pradumna Singh |
Warning: include(../../../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2012/computer_science/computer_science4.php on line 196 Warning: include(): Failed opening '../../../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/papers/cbse_important_questions/xii/2012/computer_science/computer_science4.php on line 196 |