Students can access the CBSE Sample Papers for Class 12 Computer Science with Solutions and marking scheme Term 2 Set 5 will help students in understanding the difficulty level of the exam.
CBSE Sample Papers for Class 12 Computer Science Term 2 Set 5 with Solutions
Maximum Marks: 35
Time: 2 hours
Instructions:
- The question paper is divided into 3 sections – A, B and C.
- Section A, consists of 7 questions (1-7). Each question carries 2 marks.
- Section B, consists of 3 questions (8-10). Each question carries 3 marks.
- Section C, consists of 3 questions (11-13). Each question carries 4 marks.
- Internal choices have been given for question numbers 7, 8 and 12.
Section – A
(Each question carries 2 Marks)
Question 1.
Write steps of Push operation in stack.
Answer:
There are the following steps of Push operation
Step 1 Begin
Step 2 If (T0P==(MAX -1)) Then
Step 3 Print “Stack is full” goto step 6
Step 4 TOP = TOP +1
Step 5 DATA[TOP]=ITEM Step 6 End
Question 2.
(i) Expand the following
(a) FTP
(b) POP3
Answer:
(a) FTP—File Transfer Protocol
(b) POP3—Post Office Protocol version 3
(ii) In order to allow data transfer from server to only the intended computers, which network device is required in the lab to connect the computers?
Answer:
Switch
Question 3.
What is the difference between DBMS and RDBMS?
Answer:
Differences between DBMS and RDBMS are as follows
DBMS | RDBMS |
In DBMS, relationship between two tables or files are maintained programmatically. | In RDBMS, relationship between two tables or files can be specified at the time of table creation, |
DBMS does not support client- server architecture. | Most of the RDBMS support client-server architecture. |
DBMS does not support distributed databases. | Most of the RDBMS support distributed databases. |
In DBMS, there is no security of data. | In RDBMS, there are multiple levels of security such as command level, object level. |
Question 4.
Answer the following questions.
(i) Which method returns the next row from the result set as tuple?
Answer:
fetchone ()
(ii) If there are no more rows to retrieve, then what is returned?
Answer:
None
Question 5.
Write the output for queries (i) to (iv), which are based on tables TEACHER and COURSE.
(i) SELECT TeacherID, DOJ FROM TEACHER WHERE Salary BETWEEN 35000 AND 45000;
Answer:
(ii) SELECT DISTINCT TeacherlD FROM COURSE;
Answer:
(iii) SELECT TeacherlD, COUNT(*), MIN(Fee) FROM COURSE GROUP BY TeacherlD HAVING COUN(*)>1;
Answer:
(iv) SELECT COUNT(*), SUM(Fee) FROM COURSE;
Answer:
Question 6.
(i) Which command is used to remove the table definition and all data?
Answer:
DROP command
(ii) Which clause is similar to HAVING clause in MySQL?
Answer:
HAVING clause will act exactly same as WHERE clause, i.e. filtering the rows based on certain conditions.
Question 7.
Consider the table Store
On the basis of above table Store, answer the following questions.
(i) Can we define Item as a primary key or not?
(ii) Find the degree and cardinality of the table.
Or
(i) Identify the candidate key(s) from the table Store.
(ii) If there is another table Product whose fields are PId, ItemCode, Manufacturer
Which field will be considered as foreign key, if both tables are related in a database?
Answer:
(i) In the given table, we cannot define Item
as a primary key because there is a possibility of Item name duplication. The main condition for a key to be primary key is that its value cannot be duplicate, e.g. In Item, Sharpener and Eraser can be duplicate company wise.
(ii) Degree = 4
Cardinality =5
Or
(i) ItemCode, Item
(ii) ItemCode
Section – B
(Each question carries 3 Marks)
Question 8.
Abhinav has created a dictionary containing codes and designation as key value pairs of 5 employees. Write a program, with separate user defined functions to perform the following operations
- Insert the keys (designation of the employee into a stack where corresponding code is less than 110.
- Remove and display the content of the stack.
Suppose, dictionary is
Dic={“Manager”:108, “Clerk” : 115, “Analyst”:112, “Operator”:105, “HR”:127}
Output
Manager | Operator |
Or
A linear stack called Status contains the following information
- Phone number of Employee
- Name of Employee
Write the method to push an object containing Phone number of Employee and Name of Employee into the stack.
Answer:
Di c = { “Manager” : 108, "Clerk” : 115, “Analyst” : 112, "Operator” : 105, “HR” : 127} def Insert(E,D): E. append(D) def Remove (E): if E! = [ ]: return E. pop! ) else: return None Stack1 = [ ] for i in A: _ if A[i] < = 110: ’ Insert (Stackl, i) while True: if Stackl! = [ ]: print (Remove!Stackl), end = “ ”) else: break Or def Push_element (Status, Top): phone_no = int( input!“Enter phone number : ”)) emp_name = input! “Enter empl oyee name : ”) St = (phone_no, emp_name) Status. append(St) Top = Top + 1 return Top
Question 9.
(i) Write a command to delete all the records from a table “Product”.
(ii) Gopi Krishna is using a table Employee. It has the following columns Code, Name, Salary, DeptCode
He wants to display maximum salary department wise. He wrote the following command
SELECT DeptCode, MAX(Salary) FROM Employee;
But he did not get the desired result. Rewrite the above query with necessary changes to help him get the desired output. Answer: (i) DELETE FROM Product; (ii) SELECT DeptCode, MAX(Salary) FROM Employee GROUP BY DeptCode;
10.
Ayush has to create a database named School in MySQL. He now needs to create a table named Teacher in the database to store the records of various teachers. The table Teacher has the following structure
Help him to complete the task by suggesting appropriate SQL commands.
Answer:
CREATE DATABASE School ; CREATE TABLE Teacher ( T_No Varchar(3) Primary Key, Name Char(30), Salary Integer, Address Varchar(50), DOJ Date );
Section-C
(Each question carries 4 Marks)
Question 11.
Consider the tables TEACHER and COURSE [From Q.No. (5)] and write the queries for (i) to (iv), which are based on given tables.
(i) Display TeacherlD, Tname and DOJ in descending order of Salary.
Answer:
SELECT TeacherlD, Tname, DOJ FROM TEACHER ORDER BY Salary DESC;
(ii) Display Tname, DOJ, Cname, Startdate of all courses whose fee is less than or equal to 5000.
Answer:
SELECT Tname, DOJ, Cname, Startdate FROM TEACHER, Course WHERE TEACHER.TeacherID=Course. TeacherlD AND Course.Fee<=5000;
(iii) Display number of teachers’ city wise.
Answer:
SELECT City, COUNT(*) FROM TEACHER GROUP BY City;
(iv) Display all the teachers not working in Delhi or Dehradun.
Answer:
SELECT * FROM Teacher WHERE City' NOT IN (‘Delhi’, ‘Dehradun’);
Question 12.
(i) What is Wi-Fi communication? Explain in brief.
Or
Write the advantages and disadvantages of Wi-Fi.
Answer:
Wi-Fi stands for Wireless Fidelity, has a range of about 100 m and allows for faster rate between 10-54 Mbps. Wi-Fi services have been introduced for providing high speed Internet access at convenient public locations such as Airports, Universities etc. Wi-Fi is another name for wireless LAN or WLAN. Home and business networks (private and public hotspots) use it to connect computers and other wireless devices to each other with Internet.
Computers and other devices connect to a Wi-Fi network via a wireless router or access point. For Wi-Fi to work, we need a broadband Internet connection, a wireless router and a laptop or PC having wireless Internet card or external wireless adapter.
Or
Some advantages of Wi-Fi are as follows
- It can be used, while moving within the single range.
- Network can be created where you cannot lay cable network. It is a wireless connection that can merge together multiple devices.
Some disadvantages of Wi-Fi are as follows
- It is more costly than wired network.
- Radiation generated by Wi-Fi can effect human health.
- Power consumption is fairly high.
(ii) Which type of signals are received by the satellite space station from earth station?
Answer:
In a satellite communication, there is a space station that receives the microwave signals from an earth-based station. It amplifies the signals and then broadcasts signals back over a wide area to any number of earth-based stations.
Question 13.
The school in Delhi setting up a network between different wings of campus. There are 4 wings in the campus- Senior (S), Junior (J), Admin (A) and Hostel (H).
Distance between wings are as follows
A to S — 100 m
A to J — 200 m
A to H — 300 m
S to J — 400 m
S to H — 100 m
J to H — 350 m
Number of computers installed at each building
A — 20
S — 150
J — 40
H — 20
(i) Suggest any two best wired media to connect various buildings.
Answer:
Best wired media are optical fibre and Ethernet cable.
(ii) Give the name of most suitable building where server can be installed.
Answer:
Most suitable building is Senior wing to install a server because it has maximum number of computers.
(iii) Suggest any device or software which can be installed for providing security for whole network.
Answer:
Firewall can be placed with the server in senior building for providing the security for whole network.
(iv) Suggest any device and the protocol that will be needed to provide wireless Internet access to all devices phone or laptops in the campus.
Answer:
Device name Wi-Fi Router or Wireless
MODEM.
Protocol WAP or 802.11