Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
General Instructions:
3 a) What is MySQL? 1
b) Consider the following table "SBOP" with details of account holders. 4
e) Write the contents of jTextField1, jTextField2, jTextField3 and jTextField4 when the 2
following statements are executed:
String x;
String str = "Java";
x = str.concat("study");
double a = 7.8765;
jTextField1.setText(x.length() + " ");
jTextField1.setText(x.toUpperCase());
jTextField1.setText(x.substring(2,5));
jTextField1.setText(Math.round(7.8765) + " ");
f) Ms. Fauzia works as a programmer in "TelTel Mobile Company" where she has 6
designed a software to compute charges to be paid by the mobile phone user. A
screenshot of the same is shown below:
5 a) Sarthya, a student of class XI, created a table 'RESULT'. Grade is one of the column 2
of this table. To find the details of students whose Grades have not been entered,
he wrote the following MySQL query. Which did not give the desired result.
SELECT * FROM RESULT WHERE Grade = 'Null';
Help Sarthya to run the query by removing the errors from the query and write the
correct query.
b) Given below is the 'Department' table: 2
SET AUTOCOMMIT=0;
UPDATE Department SET DEPNAME = 'OFFICE' WHERE DEPNAME='ADMIN';
INSERT INTO Department VALUES(104,'HRD');
UPDATE Department SET DEPNAME = 'FRONT OFFICE' WHERE
DEPNAME='RECEPTION';
COMMIT;
DELETE FROM Department WHERE DEPNAME='FRONT OFFICE';
ROLLBACK;
SELECT * FROM Department;
What will be the output of the above given SELECT statement?
c) Name SQL Single Row functions (for each of the following) that 4
(i) returns a number
(ii) returns lowercase letters
(iii) returns names of days. For eg. "Monday", "Tuesday".
(iv) returns weekday number. For eg. 1 for Sunday, 2 for Monday, 3 for Tuesday.
d) How is HAVING clause similar to WHERE clause? How is HAVING clause different 2
from WHERE clause? Explain with the help of examples of each.
6 a) Write MySQL command to create the Table 'LIBRARY' with given constraints. 2
b) 2
Consider the tables given below :
c) With reference to the above given tables, write commands in SQL for (i) and (ii) and 6
output for (iii)
(i) To display CourseId, TeacherId, Name of Teacher, Phone Number of Teachers
living in Delhi.
(ii) To display Teacher Id, Names of Teachers, Subjects of all teachers with names of
Teachers starting with 'S'.
(iii) SELECT CourseId, Subject, TeacherId, Name, PhoneNumber FROM Faculty,
Course WHERE Faculty.TeacherId = Course.TeacherId AND Fee>=5000
7 a) How does e-governance empower citizens? Write two points. 2
b) Define e-learning. Give one popularly used website of e-learning. 1
c) Ms. Cathy is creating a form for Vidya University Sports Council application. Help 2
her to choose the most appropriate controls from ListBox, ComboBox, TextField,
TextArea, RadioButton, CheckBox, Label and Command Button for the following
entries :