Page 370 - Information_Practice_Fliipbook_Class11
P. 370
29. Write a program that accepts the size of the list (say, n) from the user. Program should then accept n integer
elements from the user and keep adding the elements in a list. Finally, the program should display the maximum
element from the list.
30. Give the syntax of the SELECT statement in SQL. What is the purpose of ORDER BY clause?
OR
Differentiate between CHAR(n) and VARCHAR(n) datatypes in SQL.
Section D (5 Marks each)
31. Given the Sports table given below:
Table: Sports
Student No Class Name Game 1 Grade 1 Game 2 Grade 2
1 10 Amrit Cricket A Swimming A
2 12 Neeraj Tennis B Basketball C
3 10 Rajiv Swimming A Football B
4 10 Khushbu Tennis C Tennis B
5 12 Aditi Basketabll A Cricket A
6 11 Rishi Cricket A Athletics C
Write SQL statements to perform the following operations:
(i) Display the names of students who have grade ‘C’ in either Game1 or Game2 or both.
(ii) Display the details of students getting grade ‘A’ in Cricket
(iii) Display the names of the students who have same game for both Game1 and Game2
(iv) Display the games taken up by the students, whose name is Rishi.
(v) Add a new column names ‘Marks’.
32. Write a program that accept three numbers (integers) and print the numbers in ascending order.
33. Write a program that accepts the length in inches and prints the length in feet.
Section E (4 Marks each)
34. List and explain any four types of constraints in relational database model.
35. Answer the following questions on the basis of the given table:
Roll_No Name subjectCode Sex
1 Arjun ENG M
2 Aditi COMP F
3 Sumit ECO M
4 Zubair HIN M
a. Give the appropriate type of each attribute of the above table.
b. What is the degree of the above table?
c. What is the cardinality of the above table?
d. Which attribute is most appropriate to be a primary key?
356 Touchpad Informatics Practices-XI

