16
KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT INFORMATICS PRACTICES CLASS XII TOPICS SA(1) SA(2) LA(6) TOTAL Networking & Open 4(4) 3(6) - 7(10) Source software Programming in Java 7(7) 6(12) 1(6) 14(25) RDBMS 6(6) 6(12) 2(12) 14(30) IT Applications 1(1) 2(4) - 3(5) TOTAL 18(18) 17(34) 3(18) 38(70) NOTE: Marks are given inside the bracket and the number of questions outside the bracket.

KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

  • Upload
    doanh

  • View
    218

  • Download
    1

Embed Size (px)

Citation preview

Page 1: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

KENDRIYA VIDYALAYA SANGATHAN

BLUE PRINT

INFORMATICS PRACTICES – CLASS XII

TOPICS SA(1) SA(2) LA(6) TOTAL Networking & Open 4(4) 3(6) - 7(10)

Source software Programming in Java 7(7) 6(12) 1(6) 14(25)

RDBMS 6(6) 6(12) 2(12) 14(30)

IT Applications 1(1) 2(4) - 3(5)

TOTAL 18(18) 17(34) 3(18) 38(70)

NOTE: Marks are given inside the bracket and the number of questions outside the bracket.

Page 2: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

MODEL QUESTION PAPER

SUB: INFORMATICS PRACTICES (065)

CLASS – XII

MM: 70 TIME: 3 Hrs

Q.1 A

B

C

D

E

F

G

Mr. Sinha is interested in transferring songs from his mobile to Mr. Shyam‟s mobile.

Suggest two Suitable wireless options he may use for doing the same.

(1)

What are the following softwares used for?

(i) PHP (ii)MySQL

(1)

Arrange the following communication channels in the ascending order of their data transfer range.

(i) Optical Fiber (ii) Coaxial cable (iii) UTP Cable

(1)

Write any four scripts included in UNICODE

(1)

Identify the type of Topology from the following: (i) If each node is connected with the help of independent cable with the help of a central switching (communication controller)

(ii) If each node is connected with the help of a single co-axial cable.

(2)

Distinguish between Open Source software and Proprietory software with reference customizability of the software.

(2)

Samhita says that the following numbers indicate an address : 208.77.188.166

What is the above address called ? To which object/device is it assigned ?

(2)

Page 3: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q2

Q3

A

B

C

D

E

F

G

A

B

C

D

E

F

G

Sugandha has developed a login form in Java. Which method will she use to obtain the password from a password field ?

Name two attributes of TABLE tag of HTML.

Ms. Seema has developed a java application to get computerized result of the

students of her school. She enters the marks in the textfields & corresponding percentage is calculated. But she forgets to write the command for conversion from string to Decimal format. Write the command.

Which HTML tag and corresponding attributes are used to establish default

font size for entire page?. What is XML? How is it different from HTML? (2)

What will be the value of a and b after execution of the following code:

int a=1,b=2; if( ++b <5) {

a* = b; } Write a code in java to accept temperature in Celsius from the user and display

the same in Fahrenheit. (Note : Fahrenheit = Celsius*9/5 +32)

If a database “ School“ exists, which MySql command help you to start working in that database.

Differentiate between Primary key and Candidate key.

Anju has created a table “PARTICIPANTS(PNO, PNAME, CITY, CLASS)”. She wants to find out the names of participants who are not from Mumbai, Delhi and Ahmedabad. She tried the following :

SELECT NAME FROM PARTICIPANTS WHERE CITY HAS NOT Mumbai, Delhi, Ahmedabad;

Find out the error(s) and rewrite the above query after correction (2) Table SPORTS has 4 rows and 3 columns. Table ACADEMICS has 3 rows

and 4 columns. What will be the cardinality & degree of the Cartesian product of SPORTS & ACADEMICS ?

Ram has created a table SUPPLIER in a database. One of the columns in the table is amount. Which keyword is used to enter only unique values ?

An amount consisting of 2675.50 stored in a string variable strAmt. Now

Mr. Saurabh( wants to store it in double numeric variable dblAmt Write a Java statement to do this.

There is a column ITEM in a table SUPPLIER. The following two statements are giving different outputs. What may be the possible reason ?

SELECT COUNT(*) FROM SUPPLIER; SELECT COUNT(ITEM) FROM SUPPLIER (2)

(1)

(1)

(1)

(1)

(2)

(2)

(2)

(1)

(1)

(2)

(2)

(1)

(1)

(2)

Page 4: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q4

A

B

C D

E

F

SECTION – B

What will be displayed after executing the following code. (2)

String name = “Chennai Express”;

Int TM = name.length(),TN;

TN = 80- TM;

jTextField1.setText(Integer.toString(TM));

jTextField2.setText(Integer.toString(TN));

Rewrite the following program code using Switch Case Statements.. (2)

int option= Integer.parseInt(jtxt1.getText());

if (option == 1)

jtxt2.setText(“Regular employee”);

else if (option == 2)

jtxt2.setText(“on probation”);

else if (option == 3)

jtxt2.setText(“visiting faculty”);

else if (option == 4)

jtxt2.setText(“on contract”);

else

jtxt2.setText(“invalid option”);

Write a Java statement to disable jtxt1 . (1)

Given a string object namely 'Amount', having value as "500.75" stored in it.

What will be result of the following:

JOptionPane.showMessageDialog(null,(Amount.length()+Double.parseDouble (Amount)))

The following code has some error(s). Rewrite the correct code underlining all the

corrections made:

int i = 1, j= 5; K=0;

while (i<=3 & j>=1) { K + 5 = K; i++;

} jTextField1.DisplayText(K);

Sumit Garments has developed a GUI application for their company.The company accepts payments in 3 modes and give discounts correspondingly.

MODE OF

PAYMENT

DISC

OUN

T

CASH 8 %

CHEQUE 7%

CREDIT

CARD

Nil

(2)

(2)

(1) (2)

(2)

(6)

Name of customer

Bill amount

Mode of payment O CASH O CHEQUE OCREDIT CARD

Discount

NetAmount

Page 5: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q5

A B

C

(i) Write the code to make the textfields for discount and netamount uneditable.

(ii) When Calculate discount button is clicked discount should be calculated as per criteria and displayed in textfield. Calculate netamount button should

also be enabled. (iii) When Calculate netAmount button is clicked the netamount is calculated and

displayed in textfield.

Explain the purpose of DDL and DML statement. Give two examples of each. (2) Write the output of the following SQL queries. (2)

(i) SELECT INSTR(„‟CORPORATE FLOOR‟,‟OR‟); (ii) SELECT MID(„Welcome‟,3,4);

(iii) SELECT SIGN(-15); (iv) SELECT ROUND(15.193,1);

Write SQL commands for the queries given below on a table LIBRARY

SN

o.

Title Author Subjec

t

Publishe

r

Quantit

y

Price

1 Data Structure Lipschute DS McGraw 4 217.00

2 DOS Guide NORTRON OS PHI 3 175.00

3 Turbo C++ RobortLafor

e

Prog Galgotia 5 270.00

4 Dbase Dummies Palmer DBMS PustakM 7 130.00

5 Mastering

Windows

Cowart OS BPB 1 225.00

6 Computer

Studies

French FND Galgotia 2 75.00

7 COBOL Stern Prog John W 4 1000.0

0 8 Guide Network Freed NET Zpress 3 200.00

9 Basic for

Beginners

Norton Prog BPB 3 40.00

10 Advanced

Pascal

Schildt Prog McGraw 4 350.00

showing the details of Books :

Table: LIBRARY

i. Display the title of all books with Price in the range 100 to 300.

ii. Display the Author of all the books whose title starts with “D “

iii. Arrange all the books of library in increasing order of their quantity.

iv. Display the detail of book written by “ RobortLafore” .

v. Change the price of all books by applying 10% discount reduction.

vi. SELECT Title and Author FROM LIBRARY WHERE Price BETWEEN

200 AND 350;

vii. SELECT MAX(Price ) FROM LIBRARY WHERE Publisher=‟ McGraw‟ ;

(2) (2)

(6)

Page 6: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q6

A

B

C

Write SQL command to create the following table structure.

Table: COACH

Field Type Constraint

PCode Integer PRIMARY KEY

Name Varchar(20) NOT NULL

ACode Integer FOREIGN KEY which refers to the Acode in Table Activity

Consider the following tables „Company‟ and „Model‟ shown below.

Table : Company

Compid CompName CompHO CompPerson

1 Titan Okhla Arjun k.

2 Maxima Shahdara R.S.Agrawal

3 Anjata Najafgarh Dhiraj Goyel

Table : Model

ModelID CompID ModelCost

T020 1 2000

M032 4 2500

M039 2 7000

A167 3 800

T024 1 1200

(1) Identify the foreign key in Model table and primary key in Company Table.

(2) Check every value in CompID column of both tables.Do you find any discrepancy?

Consider the tables Doctors and Patient given below:

Table : Doctors

DocID DocName Department OPD_days

101 K.K.Mathur ENT TTS

102 Ashish Sharma

Paed MWF

201 Vivek

Khurana

Ortho MWF

Table : Patients

PatNo PatName Department DocID

1 Akash ENT 101

2 Sameer Ortho 201

3 Rahul ENT 101

4 Neha Paed 102

5 Manoj Ortho 201

With reference to these two tables, write a SQL query for (i) and (ii) and output

for (iii).

(2)

(2)

(6)

Page 7: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q7

A

B

C

(i) Display Patient Name,Patient No and corresponding doctor name for each patient. (2)

(ii) Display the list of all patients whose OPD_days are „TTS‟. (2) (iii) SELECT OPD_days,count(*) (2)

FROM Doctors,Patients WHERE Doctors.Department = Patients.Department GROUP BY OPD_days;

Define e-Business. Name one popularly used e-Business website.

How does e –Governance help in reducing corruption? Write two points.

Suruchi works in a Mart.She wants to create contros on a form for the following Operations. Choose appropriate controls out of TextBox,Command

Button,Radio button,List Box,combo Box,label, Check Box.

S.NO OPERATION

1 ENTER THE ITEM CODE

2 SELECT ITEM SIZE(FROM LIST OF SIZES)

3 ENTER QUANTITY

4 SUBMIT THE FORM

(1)

(2)

(2)

Page 8: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

INFORMATICS PRACTICES (065)

ANSWER KEY

Q.1 A

B

C

D

E

F

G

Mr. sinha is interested in transferring songs from his mobile to Mr. Shyam‟s mobile. Suggest two Suitable wireless options he may use for doing the same.

Ans. Bluetooth and Infrared (1/2 mark each)

(1)

What are the following softwares used for?

(i) PHP (ii)MySQL

Ans. (i) PHP : Scripting language

(ii)MySQL: Database

(1)

Arrange the following communication channels in the ascending order of their data

transfer range. (i) Optical Fiber (ii) Coaxial cable (iii) UTP Cable

Ans (i) UTP cable (ii) Coaxial cable (III) Optical fiber

(1)

Write any four scripts included in UNICODE

Ans Devanagri, Bengali, Gurmukhi, Gujarati, Oriya , Tamil, Telugu, Kannada, Malayalam (any four) (1 mark for correct answer)

(1)

Identify the type of Topology from the following: (i) If each node is connected with the help of independent cable with the help of a central switching

(communication controller) (ii) If each node is connected with the help of a single co-axial cable.

Ans. (i) Star Topology (ii) Bus Topology (1 mark for each correct answer)

(2)

Distinguish between Open Source software and Proprietory software with

reference customizability of the software.

Ans Source code of Opens source software is available to the user and therefore the user can customize it according to his/her own requirements & capability. Whereas the source code ofproprietory software is available only

with its vendor/developer. Therefore it cannot be customized by the user as per his requirements. (2 marks for correct distinction)

(2)

Samhita says that the following numbers indicate an address : 208.77.188.166 What is the above address called ? To which object/device is it assigned ?

Ans. The above assress is called an IP address or Internet protocol address. It is a numerical label that is assigned to devices participating in a network (

1 mark for each part)

(2)

Page 9: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q2

Q3

A

B C

D

E

F

G

A

B

C

Sugandha has developed a login form in Java. Which method will she use to obtain the password from a password field ?

Ans getPassword() (1 mark for correct answer)

Name two attributes of TABLE tag of HTML. Ans. <TR>, <TD>

Ms. Seema has developed a java application to get computerized result of the students of her school. She enters the marks in the textfields & corresponding percentage is calculated. But she forgets to write the command for conversion

from string to Decimal format. Write the command. Ans. float marks = Float.parseFloat(jTextField1.getText()); (1 mark)

Which HTML tag and corresponding attributes are used to establish default font size for entire page?.

Ans. <BASEFONT> tag and SIZE attribute (1/2 mark each)

What is XML? How is it different from HTML? (2)

Ans. XML (eXtensible Markup Language) is also a markup language like

HTML. But XML is different from HTML in the sense that HTML describes how

to display and format the data, text and images in the browser whereas XML is

used to describe the data. To store self-describing data, XML allows us to create

our own tags where as HTML has fixed tag set to display data.

(1 mark each for definition & difference)

What will be the value of a and b after execution of the following code: int a=1,b=2;

if( ++b <5)

{ a* = b; }

Ans. a= 3, b=3 (1 mark for each value) Write a code in java to accept temperature in Celsius from the user and display the same in Fahrenheit.

(Note : Fahrenheit = Celsius*(9/5 +32) Ans. float cel, far;

cel = Float.parseFloat(txt1.getText()); far = cel*9/5+32; txt2.setText(“”+far); (2 marks) or any other correct answer

If a database “ School“ exists, which MySql command help you to start

working in that database. Ans. Use School;

Differentiate between Primary key and Candidate key. Ans. Primary key is an attribute or set of attributes which can uniquely identifies each row whereas Candidate key is all the attributes which can serve as primary key out of which one is set as primary key.(1 mark)

Anju has created a table “PARTICIPANTS(PNO, PNAME, CITY, CLASS)”.

(1)

(1) (1)

(1)

(2)

(2)

(2)

(1)

(1)

(2)

Page 10: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q4

D

E

F

G

A

B

She wants to find out the names of participants who are not from Mumbai, Delhi and Ahmedabad. She tried the following :

SELECT NAME FROM PARTICIPANTS WHERE CITY HAS NOT Mumbai, Delhi, Ahmedabad;

Find out the error(s) and rewrite the above query after correction (2) Ans. SELECT NAME FROM PARTICIPANS WHERE CITY NOT IN(‘Mumbai’, ‘Delhi’, ‘Ahmedabad’);

Table SPORTS has 4 rows and 3 columns. Table ACADEMICS has 3 rows

and 4 columns. What will be the cardinality & degree of the Cartesian product of SPORTS & ACADEMICS ? Ans. Cardinality :- 12 Degree :-7 (1 mark for each correct answer)

Ram has created a table SUPPLIER in a database. One of the columns in the table is amount. Which keyword is used to enter only unique values ?

Ans. UNIQUE CONSTRAINT (1 mark) An amount consisting of 2675.50 stored in a string variable strAmt. Now

Mr. Saurabh wants to store it in double numeric variable dblAmt Write a Java statement to do this.

Ans. dblAmt=Double.parseDouble(strAmt); There is a column ITEM in a table SUPPLIER. The following two statements are

giving different outputs. What may be the possible reason ? SELECT COUNT(*) FROM SUPPLIER;

SELECT COUNT(ITEM) FROM SUPPLIER (2) Ans. Null values are included in Query 1 but not in Query 2.(2 marks)

SECTION – B

What will be displayed after executing the following code. (2)

String name = “Chennai Express”;

Int TM = name.length(),TN;

TN = 80- TM;

jTextField1.setText(Integer.toString(TM));

jTextField2.setText(Integer.toString(TN));

Ans. 15 , 65 (1 mark each)

Rewrite the following program code using Switch Case Statements.. (2)

int option= Integer.parseInt(jtxt1.getText());

if (option == 1)

jtxt2.setText(“Regular employee”);

else if (option == 2)

jtxt2.setText(“on probation”);

else if (option == 3)

jtxt2.setText(“visiting faculty”);

else if (option == 4)

jtxt2.setText(“on contract”);

else

jtxt2.setText(“invalid option”);

(2)

(1)

(1)

(2)

(2)

(2)

Page 11: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

C

D

E

F

Ans. switch(option) {

Case 1 : jtxt2.setText(“Regular employee”); break;

Case 2 : jtxt2.setText(“on probation”); break; Case 3 : jtxt2.setText(“visiting faculty”);

break; Case 4 : jtxt2.setText(“on contract”);

break; default : jtxt2.setText(“invalid option”); } ( 2 mark)

Write a Java statement to disable jtxt1 . (1)

Ans. jtxt1.setEnabled(false); (1 mark)

Given a string object namely 'Amount', having value as "500.75" stored in it.

What will be result of the following:

JOptionPane.showMessageDialog(null,(Amount.length()+Double.parseDouble (Amount)))

Ans. 506.75 ( 2 mark)

The following code has some error(s). Rewrite the correct code underlining all the

corrections made:

int i = 1, j= 5; K=0; while (i<=3 & j>=1) {

K + 5 = K; i++; }

jTextField1.DisplayText(K);

Ans. int i = 1, j= 5, K=0; while (i<=3 && j>=1)

{ K = K + 5; i++;

} jTextField1.setText(K); (1/2 mark each for correcting any four errors) OR (1 mark for only identifying any four errors - without making any correction)

Sumit Garments has developed a GUI application for their company.The company

accepts payments in 3 modes and give discounts correspondingly.

MODE OF

PAYMENT

DISC

OUN

T

CASH 8 %

CHEQUE 7%

CREDIT

CARD

Nil

(1)

(2)

(2)

(6)

Name of customer

Bill amount

Mode of payment O CASH O CHEQUE OCREDIT CARD

Discount

NetAmount

Page 12: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q5

A

(i) Write the code to make the textfields for discount and netamount uneditable.

jTextField2.setEditable(“False”); jTextField3.setEditable(“False”);

(ii) When Calculate discount button is clicked discount should be Calculated as per criteria and displayed in textfield.

Calculate netamount button should also be enabled. Float x =Float.parseFloat( jTextField1.getText());

If(jRadioButton1.isSelected()) { float disc= x*8/100;

Float netamount = x-disc; jTextField2.setText(“”+disc); jButton2.setEnabled(“true”);

}

else if(jRadioButton2.isSelected()) { float disc= x*7/100; Float netamount = x-disc;

jTextField2.setText(“”+disc); jButton2.setEnabled(“true”);

} else if(jRadioButton3.isSelected()) { float disc=0.0;

Float netamount = x-disc; jTextField2.setText(“”+disc);

jButton2.setEnabled(“true”); }

(iii) When Calculate netAmount button is clicked the netamount is

calculated and displayed in textfield.

Float x =Float.parseFloat( jTextField1.getText());

Float y=Float.parseFloat(jTextField2.getText()); Float z= x-y;

jTextField3.setText(“”+z);

i) 1 mark for each textfield ii) 1.5 marks for correct code, 0.5 mark for netamt.setEnabled(true);

iii) 2 marks for correct code

Explain the purpose of DDL and DML statement. Give two examples of each. (2)

Ans. DDL –Data Definition Language use to define,modify,delete the structure of databse elements e.g Create table, Alter table etc

DML – Data Manipulation Language use to manipulate the data e.g Delete, Insert,Update (2 mark)

(2)

Page 13: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

B

C

Write the output of the following SQL queries. (2)

(i) SELECT INSTR(„‟CORPORATE FLOOR‟,‟OR‟); (ii) SELECT MID(„Welcome‟,3,4);

(iii) SELECT SIGN(-15); (iv) SELECT ROUND(15.193,1);

Ans.

(i) 2 (ii) lcom (iii) -1 (iv) 15.2 (1/2 each)

Write SQL commands for the queries given below on a table LIBRARY

SN

o.

Title Author Subjec

t

Publishe

r

Quantit

y

Price

1 Data Structure Lipschute DS McGraw 4 217.00

2 DOS Guide NORTRON OS PHI 3 175.00

3 Turbo C++ RobortLafor

e

Prog Galgotia 5 270.00

4 Dbase Dummies Palmer DBMS PustakM 7 130.00

5 Mastering

Windows

Cowart OS BPB 1 225.00

6 Computer

Studies

French FND Galgotia 2 75.00

7 COBOL Stern Prog John W 4 1000.0

0 8 Guide Network Freed NET Zpress 3 200.00

9 Basic for

Beginners

Norton Prog BPB 3 40.00

10 Advanced

Pascal

Schildt Prog McGraw 4 350.00

showing the details of Books :

Table: LIBRARY

i. Display the title of all books with Price in the range 100 to 300.

ii. Display the Author of all the books whose title starts with “D “

iii. Arrange all the books of library in increasing order of their quantity.

iv. Display the detail of book written by “ RobortLafore” .

v. Change the price of all books by applying 10% discount reduction.

vi. SELECT Title and Author FROM LIBRARY WHERE Price

BETWEEN 200 AND 350;

vii. SELECT MAX(Price ) FROM LIBRARY WHERE Publisher=‟

McGraw‟ ;

Ans.

1. select title from library where price between 100 and 300; 2. select author from library where name like “D%”; 3. select * from library order by quantity;

4. select * from library where author =”RobortLafore”; 5. update library

set price = price-price*0.10;

(2)

(6)

Page 14: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q6

A

B

6. Data structure lipschute

TurboC++ RobertLafore Mastering Cowert

Guide network freed Advanced Schildt 7. 350

Write SQL command to create the following table structure. Table: COACH

Field Type Constraint

PCode Integer PRIMARY KEY

Name Varchar(20) NOT NULL

ACode Integer FOREIGN KEY which refers to the Acode in Table Activity

Ans.

CREATE TABLE COACH (PCode integer primarykey,Name varchar(20) NOT NULL,ACode integer , Foreign Key(Acode) references Activity(Acode) ); ( FOR CORRECT QUERY SYNTAX 1 MARK & CONDITION 1 MARK ) Consider the following tables „Company‟ and „Model‟ shown below.

Table : Company

Compid CompName CompHO CompPerson

1 Titan Okhla Arjun k.

2 Maxima Shahdara R.S.Agrawal

3 Anjata Najafgarh Dhiraj Goyel

Table : Model

ModelID CompID ModelCost

T020 1 2000

M032 4 2500

M039 2 7000

A167 3 800

T024 1 1200

(1) Identify the foreign key in Model table and primary key in Company Table. (2) Check every value in CompID column of both tables.Do you find any

discrepancy?

Ans. (1) ModelID – primary in Model table & CompId – primary in Company table (1 mark) (2) In compId column of Model table consists a row value 4 which is not defined in company table (Parent table) ( 1 mark)

(2)

(2)

Page 15: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

Q7

C

A

B

C

Consider the tables Doctors and Patient given below:

Table : Doctors

DocID DocName Department OPD_days

101 K.K.Mathur ENT TTS

102 Ashish

Sharma

Paed MWF

201 Vivek Khurana

Ortho MWF

Table : Patients

PatNo PatName Department DocID

1 Akash ENT 101

2 Sameer Ortho 201

3 Rahul ENT 101

4 Neha Paed 102

5 Manoj Ortho 201

With reference to these two tables, write a SQL query for (i) and (ii) and output for (iii). (i) Display Patient Name,Patient No and corresponding doctor name for each patient. (2)

(ii) Display the list of all patients whose OPD_days are „TTS‟. (2) (iii) SELECT OPD_days,count(*) (2)

FROM Doctors,Patients WHERE Doctors.Department = Patients.Department GROUP BY OPD_days;

Ans.

(1) SELECT PatName,PatNo,DocName FROM DOCTORS, PATIENTS WHERE DOCTOR.DOCID=PATIENT.DOCID; (2 mark) (2) SELECT * FROM DOCTORS, PATIENTS WHERE DOCTOR.DOCID= PATIENT.DOCID AND OPD_Days=’TTS’; (2 mark) (3) Output : OPD_days Count(*)

TTS 2 MWF 3 (2 mark)

Define e-Business.Name one popularly used e-Business website.

Ans. a) E-business refers to any form of transaction(exchange) that uses an electronic medium to facilitate the transaction. www.amazon.com (any website) (1 mark) How does e –Governance help in reducing corruption? Write two points.

Ans. Any two points in which E-governance helps in reducing corruption

like MCA-21,Passport website. (1 mark for each point) Suruchi works in a Mart.She wants to create contros on a form for the following Operations. Choose appropriate controls out of TextBox,Command

Button,Radio button,List Box,combo Box,label, Check Box.

(6)

(2)

(2)

(2)

Page 16: KENDRIYA VIDYALAYA SANGATHAN BLUE PRINT · PDF fileKENDRIYA VIDYALAYA SANGATHAN ... Display the list of all ... Arrange the following communication channels in the ascending order

S.NO OPERATION

1 ENTER THE ITEM CODE

2 SELECT ITEM SIZE(FROM LIST OF SIZES)

3 ENTER QUANTITY

4 SUBMIT THE FORM

Ans. 1.TextField

2. ListBox/ComboBox 3. TextField 4. CommandButton (1/2 mark each)