TERM - 2 - XII - Computer SC - ANS
TERM - 2 - XII - Computer SC - ANS
com
/
SAMPLE PAPER-4
COMPUTER SCIENCE (083)
Time allowed: 2 hours Maximum Marks: 35
General 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.
(SECTION A)
Each question carries 2 marks
Q5. Write the output of the queries (a) to (d) based on the table SMARTWATCH, given below: (2)
Table: SMARTWATCH
WATCHID NAME PRICE QTY_STORE
W1 Fitbit Versa 21000 100
W2 Apple Watch 55000 150
W3 Garmin Fenix 75000 50
W4 Fitbit Versa 21000 100
W5 Samsung Galaxy 27000 200
W6 Amazfit Watch 17000 100
W7 Fossil Hybrid 15000 50
Q6. (i) Which command is used to see the table structure? (1)
(ii) What is a Cartesian join or product on two tables? (1)
Ans. (i) DESC tablename or DESCRIBE tablename
(ii) The Cartesian join is used to generate a paired combination of each row of the first table with
each row of the second table. This join type is also known as cross join. The resultant rows are a
product of the number of rows in each table.
Q7. In the table Loan below (2)
(a) Identify the candidate key(s) from the table Loan.
(b) Which field will be considered as the foreign key if the tables Customers and Loan are related
in a database?
Table Loan
LoanID LoanDate ID EMI Years
Table Customers:
(SECTION B)
Each question carries 3 marks
Q8. Coach Abhishek stores the races and participants in a dictionary. Write a program, with separate
user defined functions to perform the following operations: (3)
• Push the names of the participants of the dictionary onto a stack, where the distance is more
than 100.
while True:
if stack1!=[]:
print(POP(stack1),end="")
else:
break
Q9. (i) A table, Students has been created in a database with the following (3)
fields: StudentID, NAME, DOB, CITY, MARKS
Give the SQL command to change the datatype of CITY from Varchar(30) to Char(30).
(ii) Which of the following is a DML command?
SELECT...FROM, CREATE TABLE, INSERT, UPDATE
Ans. (i) ALTER TABLE Students MODIFY COLUMN CITY char(30);
(ii) DML: SELECT...FROM, INSERT INTO, UPDATE...SET
Q10. Maniklal Fabrics is creating a database called Stores with a table called City_Store. Write the SQL
commands for doing the same. (3)
Store id INT Primary Key
Manager Varchar(20)
Address Varchar(30)
City Varchar(20)
City_Code Char(5)
Last_update Date
Q11. A database called ecompany has two tables COMPANY and CUSTOMER with the following records.
Write SQL commands for the queries (a)-(d) based on the two tables COMPANY and CUSTOMER: (4)
Table: COMPANY
PID NAME CITY PRODUCTNAME
2101 APPLE DELHI WATCH
102 SAMSUNG BANGALORE MOBILE
2103 PANASONIC DELHI TV
2104 SONY MUMBAI MOBILE
2105 LENOVO INDORE TABLET
2106 DELL MUMBAI LAPTOP
Table: COUSTMER
CUSTID NAME UNITPRICE QTY PID
101 REENA SONI 60,000 10 2102
102 MICHAEL PAUL 50,000 20 2106
103 MEETALI SINGH 70,000 15 2101
104 PARULSOHAL 55,000 3 2103
105 RAJESH DESWAL 45,000 7 2104
a) Write an SQL statement to display the name of the companies in reverse alphabetical order.
b) To add one more column to the table customer called TOTAL_PRICE which can have up to two
decimal places.
c) Write an SQL statement to count the products city wise.
d) Write an SQL statement to display the customer name, product of the unit price and quantity,
product name where the name of the city is Mumbai.
Ans. a) SELECT NAME FROM COMPANY ORDER BY NAME DESC;
b) ALTER TABLE CUSTOMER ADD TOTAL_PRICE DECIMAL(10,2);
c) SELECT COUNT(*), CITY FROM COMPANY GROUP BY CITY;
d) SELECT CUSTOMER.NAME, UNITPRICE*QTY, PRODUCTNAME FROM COMPANY,
CUSTOMER WHERE COMPANY.PID=CUSTOMER.PID AND CITY= 'MUMBAI';
Q12. (i) Give two advantages and two disadvantages of ring topology. (4)
OR
Define the following terms:
Web Browser, Web server
(ii) Differentiate between wired and wireless Transmission Media.
Ans. Ring Topology
Advantages Disadvantages
This arrangement prevents collisions. Needs more cable than bus.
Data packets travel at greater speeds. Any snag in the cable ring crashes the network.
Any problems with device and cable can be The network activity is disturbed when adding
easily located. or removing a node.
OR
Web Browser: This is an application software used to view or browse web pages from a web server.
Have to type the exact URL to view the web page to request for a web page. This has no database.
Google Chrome, Safari, Mozilla Firefox, Microsoft Edge are some popular web browsers.
Web Server: This is a technologically advanced machine that stores all the files containing the web
pages which can be viewed by the web browser. Web Servers store, process and deliver web pages
to the users when they receive a request from a browser. The Web Server provides the storage
space for website files. Apache Server is the most popular server.
(ii) Wired Transmission Media: Wired transmission media are the cables that are used in networking.
Popular wired transmission media are twisted pair cable, co-axial cable and fiber optical cable.
Each of them has its own characteristics like transmission speed, effect of noise, physical
appearance, cost etc.
Wireless Transmission Media: Wireless transmission media are the ways of transmitting data
without using any cables. Nowadays wireless communication is becoming popular as it is not
bounded by physical geography. This transmission uses Microwave, Radio wave, Infrared or a
combination of these.
Q13. Jeevan CareGivers Company has set up its head office with 4 blocks of buildings named Block A,
Block B, Block C and Block D. (4)
The number of computers in each block are:
Block A-25 Block B-50
Block C-125 Block D-10
Shortest distances between various Blocks in meters:
Block A to Block B-60 m Block B to Block C-40 m
Block C to Block A-30 m Block D to Block C-50 m
(i) Suggest the most suitable place (i.e. block) to house the server of this company with a suitable
reason.
(ii) Suggest the type of network to connect all the blocks with suitable reason.
(iii) The company is planning to link all the blocks through a secure and high speed wired medium.
Suggest a way to connect all the blocks.
(iv) Suggest the most suitable wired medium for efficiently connecting each computer installed in
every block out of the following network cables:
• Coaxial Cable • Ethernet Cable • Single Pair Telephone Cable.
Ans. (i) Block C , It has maximum number of computer.
(ii) Since the distance between the blocks is less than 1 Km and LAN can be upto 10 Km
(iii) Star topology (iv) Ethernet Cable