CBSE Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2013 > Computer Science > Computer Science - by Mr. Sandip Kumar Srivastava

CBSE CLASS XII

Computer Science (C++ and Data Structure)

Previous Index Next

 

58.

a) Define

  1. Cardinality
  2. Candidate Key

b) Consider the following tables GAMES- storing the details of games  and PLAYER –storing the details of players who have enrolled their names for the scheduled games. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (vi)

Table: GAMES

GCode GameName No_Players PrizeMoney ScheduleDate
101 Carom Board 2 5000 23-Jan-2011
102 Badminton 2 12000 12-Apr-2011
103 Table Tennis 4 8000 14-Feb-2011
105 Chess 2 9000 11-Jan-2011
108 Lawn Tennis 4 25000 19-May-2011

Table: PLAYER

PCode PlayerName GCode
11 Nabi Ahmad 101
12 Ravi Sahai 108
13 Jatin 101
14 Nazneen 103
  1. To display name of those games whose  PrizeMoney is in the range 10000 to 30000 and No_Players above
  2. To display the details of games whose GameName starts with ‘C’  in ascending order of ScheduleDate.
  3. To display count  of players enrolled for each game.

  4. Display each PCode, PlayerName and the GameName for which they have enrolled.
  5. SELECT SUM(PrizeMoney) FROM GAMES;
  6. SELECT COUNT(DISTINCT GCode) FROM PLAYER;

59.

  1. What do you mean by Candidate Key and Foreign Key?
  2. Consider the following tables STORE and SUPPLIERS a. Write SQL commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii).

Table: STORES

ItemNo Item Scode Qty Rate LastBuy
2005 Sharpner Classic 23 60 8 31-Jun-09
2003 Ball Pen 0.25 22 50 25 01-Feb-10
2002 Gel Pen Premium 21 150 12 24-Feb-10
2006 Gel Pen Classic 21 250 20 11-Mar-09
2001 Eraser Small 22 220 6 19-Jan-09
2004 Eraser Big 22 110 8 02-Dec-09
2009 Ball Pen 0.5 21 180 18 03-Nov-09

Table: SUPPLIERS

Scode Sname
21 Premium Stationary
23 Soft Plastics
22 Tetra Supply

 

Previous Index Next

Submitted By : Mr. Sandip Kumar Srivastava
Email : [email protected]