0% found this document useful (0 votes)
4 views4 pages

Cbse Class 11 Hy Informatics Practice 2017

This document is an examination paper for Informatics Practice for Std. 11, consisting of various SQL-related questions and tasks. It includes topics such as SQL commands, table structures, and functions, along with practical exercises to test students' understanding. The paper is structured into multiple sections, each addressing different aspects of database management and SQL syntax.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views4 pages

Cbse Class 11 Hy Informatics Practice 2017

This document is an examination paper for Informatics Practice for Std. 11, consisting of various SQL-related questions and tasks. It includes topics such as SQL commands, table structures, and functions, along with practical exercises to test students' understanding. The paper is structured into multiple sections, each addressing different aspects of database management and SQL syntax.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

http://www.cbseboardonline.

com

Std. 11 Time : 3 hrs.

23-9-2016 Half Yearly Examination in INFORMATICS PRACTICE M. Marks : 70

1) a) Write difference between (write any two points) [12]


i) TRIM() and RTRIM()
ii) SUBSTR() and INSTR()
iii) Round() and Truncate()
iv) Now() and Sysdate()
v) Update and Delete commands
vi) DDL (data definition language) and DML (data manipulation language)
b) Write the degree and cardinality of a table consumer containing 5 Rows and 6 Columns.
Mr Kumar inserted 7 rows and added 3 columns in the consumer table. Now what is its
Cardinality and Degree? [2]
c) Find errors in the following query and write the correct command. [5]
i) Select Name,* from student where stream = null ;
ii) Select Pcode, Pname from product where price is between 400 to 600 ;
iii) Select Pcode, Pname from product where Pname in „CD‟, „DVD‟ ;
iv) Update table student set Marks = 78 where admno is 101 ;
v) Delete * from Student where name like = „S%‟ ;
d) Name the function used to display [3]
i) Current/System Date
ii) Add two or more strings
iii) Result like “Monday” “Tuesday” etc.
iv) Last 5 characters from a string
v) Position of a string inside another string
vi) Part of a string from position till number of characters
e) The Doc_name Column of table Hospital is given below: [2]

Based on the information, find the output of the following queries:


i) Select Doc_Name from Hospital where doc_name like „_ _ n%‟ ;
ii) Select Doc_Name from Hospital where doc_name like „%ee%‟ ;

http://www.cbseboardonline.com
http://www.cbseboardonline.com

f) Write name of the keyword / operator used in following cases:- [3]


i) Operator used to specify two or more conditions
ii) Keyword that eliminates duplicate data in output
iii) Operator used for making range checks in queries
iv) Operator used for making pattern matching checks
v) Operator used to check a list of values
vi) Keyword used to print output of a particular column in descending
g) Define the following and give one example of each :- [3]
i) Primary key ii) Database iii) domain

2) Write SQL commands based on the table MOVIE given below:- [10]
MNO TITLE TYPE RATING STAR QTY PRICE ENTRY_DATE

1 Gone with the wind drama G GABLE 4 39.64 21-01-2001

2 Friday the 13th horror R JASON 2 69.00 27-01-2001

3 Top gun drama PG CRUISE 7 49.00 13-02-2001

4 Splash comedy PG13 HANKS 3 29.572 21-11-2010

5 Independence Day drama R TURNER 3 19.00 01-01-2008

6 Risky business comedy R CRUISE 2 44.00 22-01-2003

7 Cocoon scientific PG AMECHE 2 31.00 14-05-2001

8 Crocodile Dundee comedy PG13 HARRIS 2 69.00 18-07-2004

9 101 Dalmatians comedy G 3 59.00 30-09-2006

10 Tootsie comedy Pg HOFFMAN 1 29.00 11-03-2011

i) Display title, rating and star of type comedy and title starts with C or T
ii) Delete the movie whose quantity is less than 2 and type is scientific
iii) Display title, rating of movie whose price is in range 30 to 50
iv) Display the details of movies whose star is not entered
v) Decrease the price of comedy movies by 10.
vi) Display the details of movies whose rating is G, R and PG
vii) Display MNO, title of all movies with price over 50 in descending order of title
viii) Display title, rating and star of type comedy in order of title and rating
ix) Change the quantity of the movie „Independence Day‟ to 15
x) Show movie number , title and type of all the movies whose price is greater than 50 and
quantity is less than 5

http://www.cbseboardonline.com http://www.a2zSubjects.com
http://www.cbseboardonline.com

3) Write output of the following command based on MOVIE table given above :- [8]
i) Select Concat( title,‟#‟,type,‟ –„,price) , Right( Concat( title,‟#‟,type,‟ –„,price) ,10) from movie
where mno=5;
ii) Select substr(title,4,5) , substr(title, -4,5) from movie where mno=1;
iii) Select Trim(„To‟ from title) from Movie where mno in (3,10);
iv) Select Round(price, 1) from movie where rating =‟PG13‟ ;
v) Select instr(„pen‟, title) from movie where type=‟drama‟ and Qty<5 ;
vi) Select month(entry_date), dayofmonth(entry_date) from movie where type=‟scientific‟ ;
vii) Select dayofyear(entry_date) from movie where star=‟CRUISE‟ ;
viii) Select Length(title) , reverse(type) from movie where mno=9;
4) What will be an output of the following SQL queries: [8]
i) SELECT DAYOFMONTH(CURDATE());
i i ) SELECT LENGTH ( SUBSTRING ( „ X A V I E R - M U S I C F E S T 2 0 1 6 ‟ , 1 1 , 5) ) ;
iii) SELECT MOD(657,9) , POWER(4,2) ;
iv) SELECT SUBSTR( CONCAT(“INTERFACE”,”-ABACUS”), 5);
v) Select UPPER(„Class-11F‟), Right(„Class-11F‟,5) ;
vi) Select Trim(Trailing “ Play-Fest-2016 “) , Trim(„#‟ from „###Play-Fest-2016###‟)
;
vii) Select Length(“Play-Fest-2016”) , Reverse(“Play-Fest-2016”);
viii) Select SUBSTR(“Sony Xperia Z”,-6,8) , SUBSTR(“Sony Xperia Z”,-6,8);
5) Write SQL SELECT statements to do the following: [8]
i) Using the three separate words “Half”, “-Yearly-” and “2016” produce the following output:
“Half-Yearly-2016”
ii) Use the string “11F – F stands for Fabulas” and extract the string “stand”.
iii) Display the length of the string “11F – F stands for Fabulas”.
iv) Display the position of “stand” in “11F – F stands for Fabulas”.
v) Display the name of the day of current month.
vi) Display the date 14 years from now. Label the column “Future.”
vii) Display the number 123.5 as output from the number 123.456
viii) Display the day of week on which your birthday will fall or fell in 2016.
6) Write command to create the following table named STAFF [3]
Column Names Data Types Size

ID Int 5

Name Varchar 20

Department Varchar 15

Gender Char 1

Experience Int 2

Salary float 10,2

http://www.cbseboardonline.com
http://www.cbseboardonline.com

7) Write SQL command for following:


i) Create a database XAVIER and check for its existence also [1]
ii) Open the database XAVIER [½]
iii) Display the structure of table STAFF [½]
iv) Command to see all the tables present in the database XAVIER [½]
v) Command to see all the databases present in MySQL [½]
-x-x-x-x-x-

http://www.cbseboardonline.com http://www.a2zSubjects.com

You might also like