795 - Data Base Management-MS
795 - Data Base Management-MS
DATABASE
MANAGEMENT APPLICATIONS (795)
XII
Time Allowed: 2.5hours Maximum marks: 50
SECTION – A
Attempt any ten from the following 10 x 1=10
1. The number of attributes in a relation is called the ____________of a relation.
a. Tuple
b. Table
c. Cardinality
d. Degree
Ans Degree
Ans Check
3. _______________ command is used to eliminate duplicate values of an attribute in the select query
a. Update
b. Unique
c. Distinct
d. No Duplicate
Ans Distinct
5. ________________is the use of electronic i.e. information and communication technology (ICT) tools for
governance by the government for the citizens
a. E Learning
b. e Commerce
c. E-Governance
d. E payment
Ans E-Governance
6. E business offers advantages and opportunities, there are also risks and barriers. These include
(a) Violation of customer privacy
(b) Spikes causing websites to fail at peak times
(c) Internet hackers penetrating company security
d) All of the above
8. ____________ translates the byte code into machine code and then executes it.
Ans: Integer.parseInt()
11. ___________ statement is used to use a prebuilt class and associated methods in those
class from the package
a. Include
b. Public
c. Extend
d. Import
Ans Extend
12. ___________ method of a String class converts all of the characters in this String to
lower case
a) e. Lcase()
b)toLowerCase()
c)oLcase()
d) isLower()
Ans toLowerCase()
13. Sana has given the following query but she is unable to execute it successfully. Write the correct query
after rectifying the error (2)
Select Name, Marks
from student Table
Where Name =”P%”
16. List advantages of Work Integrated Learning with a suitable example. (2)
Ans Allows user to Integrate front end and back end Applications
Example Database can be created in any RDBMS package and Front End can be created in Java NetBeans
(2 Marks for correct explanation with valid example)
17. (a) Categorize the following as e-Governance and e-Learning applications. ` (2)
i) On-line experiments in a virtual Chemistry lab of a college.
ii) On-line application submission for change of address in the passport.
iii) On-line bill payment of electricity Charges.
iv) On-line tutorials on w3schools.com
Ans e-Learning – I, iv
e- Governance – ii, iii
(1/2 Mark for each correct answer)
18. Describe any one social and economic impact of eCommerce. (2)
Ans The biggest positive social impact is easier and broader access to that product.
Economic impact – It is reshaping the method of doing business
(1 Mark each for any valid point)
19. Describe how Database management applications can be used in the Banking sector (2)
Database for the Customers (Saving/ Current)
Loan/ Type of Loan
(2 Marks for correct explanation)
Short Answer Questions (5X3=15)
20. Explain main phases of Web Application Development. (3)
Ans Phases in a Web Application Project
2) Design Phase
3) Implementation Phase
4) Testing Phase
Additionally, for all these phases there is a Planning and Monitoring phase
21. Pragya has registered herself on www.swayam.gov.in for a free online course on elementary education.
Mention any three advantages of eLearning. (3)
Ans Advantages
1. It provides freedom to the learner to learn at their convenient location, convenient time and at their own pace
of learning.
2. There is no discrimination of age, caste, gender, background, or the qualification of the learner.
3. The tutorials may be enriched with audio and video information, which makes learning more enjoyable and
attractive.
Also, tutorials and tests are available for almost all topics, sometimes in regional languages also.
Ans: 40
68
23. Write a JAVA program to input a number. If the number is even then Display its square otherwise its
cube.
Ans
(3)
int a, result;
a=Integer.parseInt(jTextField1.getText());
if(a%2==0)
result=a*a;
else if(a%2!=0)
result=a*a*a;
System.out.println(“ “ +result);
24. What are exceptions in Java? Describe the keywords used for handling Exceptions in JAVA (3)
Ans An error situation that is unexpected in the program execution and causes it to terminate unexpectedly is called
an exception.
Java provides the following keywords to handle an exception:
try - A try block surrounds the part of the code that can generate exception(s).
catch – The catch blocks follow a try block. A catch block contains the exception handler - specific code that is
executed when the exception occurs. Multiple catch blocks following a try block can handle different types of
exceptions.
(1 Mark for correct definition, 1 each for try and catch)
26. Illustrate Work Integrated learning with reference to Education Sector (3)
Ans: For storing information such as student details, marks and result.
For storing information about faculty and staff members.
For storing details about school/college such as infrastructure details, department and offered course
details.
Any of the above mentioned points can be explained in detail with suitable front end interface.
(3 Marks for explanation with suitable example)
SECTION B
Long Answer Questions (3X5=15)
27. Consider the following table Doctor and answer the following Queries in SQL (5)
ID Department OPD_DAYS Doctor_Name Fee
H201 ENT MWF Akaash Arora 400
H308 Oncology TTS Dharma Sharma 600
H907 Paediatrics MWF Sanjay Singh 500
H896 ENT TTS Praveen Sethi 400
H675 Gynecology TTS Kavita Sharma 450
H357 Haematology MWF Dinesh Chaudhry 600
II. To display the all the details of Doctors whose Department ends with ‘y’
Ans:
Select *
from Doctor
where Department Like ‘%y’;
IV. To display names and the fee of doctors in the descending order of fee
Ans:
Select Doctor_Name, Fee
From Doctor
Order by Fee Desc;
Advantages
E-governance empowers the citizens socially and economically, and enhances their lives by providing them
with quality information and better services.
It enables citizens to access information directly, without paying any money to a middleman or a tout.
29. Ananya is trying to Book online railway ticket. Mention two precautions she has to take while making
online transaction; also write three advantages of online payment. (5)
Ans: Precautions
Use a strong password like mix case, use numbers and special characters. This decreases ability of automated
attacks by trying different character combinations.
Be cautious not to leave passwords around and do not share them with friends. Never use names of near and
dear ones as passwords.
Advantages
No Bribes
30. (i)Write a JAVA program (method) to develop an application to accept sales of a company for four
quarters. Calculate the total yearly sale and display the same.
Ans :
float q1,q2,q3,q4,total;
q1=Float.parseFloat(jTextField1.getText());
q2=Float.parseFloat(jTextField2.getText());
q3=Float.parseFloat(jTextField3.getText());
q4=Float.parseFloat(jTextField4.getText());
total=q1+q2+q3+q4;
jTextField5.setText(Float.toString(total));
(1 Marks for variable declaration and getText()
1 Mark for Total
1 Mark for displaying the result)
31. (i) Write a JAVA program (method) to develop an application in JAVA to calculate Marks in 5 subjects and
show the percentage of Students.
Ans :
float m1,m2,m3,m4,m5,total,perc;
m1=Float.parseFloat(jTextField1.getText());
m2=Float.parseFloat(jTextField2.getText());
m3=Float.parseFloat(jTextField3.getText());
m4=Float.parseFloat(jTextField4.getText());
m5=Float.parseFloat(jTextField5.getText());
total=m1+m2+m3+m4+m5;
perc=(total/500)*100;
jTextField6.setText(Float.toString(perc));
(1 Marks for variable declaration and getText()
1 Mark for Total
1 Mark for Displaying the result)
A program is collection of objects that interact with other objects to solve a problem. Each object is an
instance of a class.
Once the class is defined, we can create objects of the class and access its members. To create an object of a
class we use the keyword new. We can create objects of the class Book in a Java class file of our package