Computer Science: Ractical ILE
Computer Science: Ractical ILE
Made by:
Name : ………………………………………………
(same margins, font style & font size in all programs) and presented
ii) There must be a Certificate Page & Index page in the file.
iv) Program headings etc are to be written with black pen and code with
vi) Output presentation should be good & neat (output with pencil or
___________________ ___________________
Teacher’s Signature Principal’s Signature
INDEX FOR C++
Consider the tables given below and answer the questions that follow:
Table: Employee
Table: Department
Create Table
1. Create the table Employee.
2. Create the table Department.
Insert data in a table
3. Insert data in the table Employee
4. Insert data in the table Department.
Simple Select
5. Display the details of all the employees.
6. Display the Salary, Zone, and Grade of all the employees.
7. Display the records of all the employees along with their annual salaries. The
Salary column of the table contains monthly salaries of the employees.
8. Display the records of all the employees along with their annual salaries. The
Salary column of the table contains monthly salaries of the employees. The new
column should be given the name “Annual Salary”.
Conditional Select using Where Clause
9. Display the details of all the employees who are below 30 years of age.
10. Display the names of all the employees working in North zone.
11. Display the salaries of all the employees of department 10.
Using NULL
12. Display the details of all the employees whose Grade is NULL.
13. Display the details of all the employees whose Grade is not NULL.
Using DISTINCT Clause
14. Display the names of various zones from the table Employee. A zone name should
appear only once.
15. Display the various department numbers from the table Employee. A department
number should be displayed only once.
Using Logical Operators (NOT, AND, OR)
16. Display the details of all the employees of department 10 who are above 30 years
of age.
17. Display the details of all the employees who are getting a salary of more than
35000 in the department 30.
18. Display the names and salaries of all the employees who are not working in
department 20.
19. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone.
20. Display the names of all the employees who are working in department 20 or 30.
21. Display the details of all the employees whose salary is between 32000 and
38000.
22. Display the details of all the employees whose grade is between ‘A’ and ‘C’.
23. Display the details of all the employees aged above 30 in West zone.
Using IN Operator
24. Display the names of all the employees who are working in department 20 or 30.
(Using IN operator)
25. Display the names and salaries of all the employees who are working neither in
West zone nor in Centre zone. (Using IN operator)
Using BETWEEN Operator
26. Display the details of all the employees whose salary is between 32000 and
38000.
27. Display the details of all the employees whose grade is between ‘A’ and ‘C’.
Using LIKE Operator
28. Display the name, salary, and age of all the employees whose names start with
‘M’.
29. Display the name, salary, and age of all the employees whose names end with ‘a’.
30. Display the name, salary, and age of all the employees whose names contain ‘a’
31. Display the name, salary, and age of all the employees whose names do not
contain ‘a’
32. Display the details of all the employees whose names contain ‘a’ as the second
character.
Using Aggregate functions
33. Display the sum and average of the salaries of all the employees.
34. Display the highest and the lowest salaries being paid in department 10.
35. Display the number of employees working in department 10.
Using ORDER BY clause
36. Display the details of all the employees in the ascending order of their salaries.
37. Display the details of all the employees in the descending order of their names.
38. Display the details of all the employees in the ascending order of their grades
and within grades in the descending order of their salaries.
Using GROUP BY clause
39. Display the total number of employees in each department.
40. Display the highest salary, lowest salary, and average salary of each zone.
41. Display the average age of employees in each department only for those
departments in which average age is more than 30.
Using UPDATE, DELETE, ALTER TABLE
42. Put the grade B for all those whose grade is NULL.
43. Increase the salary of all the employees above 30 years of age by 10%.
44. Delete the records of all the employees whose grade is C and salary is below
30000.
45. Delete the records of all the employees of department 10 who are above 40 years
of age.
46. Add another column HireDate of type Date in the Employee table.
JOIN of two tables
47. Display the details of all the employees who work in Sales department.
48. Display the Name and Department Name of all the employees.
49. Display the names of all the employees whose salary is out of the specified range
for the corresponding department.
50. Display the name of the department and the name of the corresponding HOD for
all the departments.
INDEX FOR BOOLEAN ALGEBRA
1. Write the equivalent Boolean expression for the following logic circuit.
(a)
(b)
2. Write the POS form of a Boolean Function F, Which is presented by the following
truth table.
X Y Z F
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
3. Give the following truth table, derive a sum of product (SOP) and Product of Sum
(POS). Form of Boolean expression from it.
A B C F(A,B,C)
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
4. Write the equivalent canonical product of sum expression for the following sum of
product expression: F(X, Y, Z) = π(1,3,6,7)
5. Obtain the minimal form for the following Boolean expression using Karnaugh’s
map: F(A,B,C,D) = ∑(1,3,4,5,6,7,12,13)
INDEX FOR COMMUNICATION AND NETWORKING
1. Expand all short terms to full, given in Chapter: Communication and Network
Concepts.
2. Explain Needs of Networking Evolution and Needs of Network
3. Write the types of Networks and draw the comparison table of them.
4. What is topology? Explain all types of topology with diagrams.
5. List out Network devices and write few lines for each device.
6. Knowledge Supplement Organization has set up its new centre at Manglore for its
office and web based activities. It has four buildings as shown in the diagram
below: