class xii-comm-ip

SUBJECT- INFORMATICS PRACTICES
HOLIDAYS HOMEWORK
CLASS –XII
THEORY-ASSIGNMENTS
Assignment No. 1
COMPUTER NETWORKING
TYPE A: VERY SHORT ANSWER QUESTION
1.
2.
3.
4.
5.
Define a network? Why is it needed?
What is an IP Address? How is it different from MAC address?
What is a domain name? How it is alternatively known?
What is the difference between MAN & WAN?
What is meant by topology? What are the factors that must be considered before making a
choice for the topology?
6. Give two advantages & two disadvantages of :(a) Star (b)Tree (c) Bus 7. Define the following :(a) Hub
(c) Firewall
(b) Switch
(e) Blutooth
8. What is snooping?
9. What is eavesdropping?
10. Define Internet? Name some services offered by the Internet.
TYPE B: SHORT ANSWER QUESTION
1. What do you understand by Domain Name Resolution ?
2. What are communication channels ? Discuss various communication channels available for network
?
3. Write some advantages and disadvantages of the following?
(a) Optical Fiber
(c) Co-axial cable
(e) Twisted Pair wire
(b) Radio Waves
(d) Microwave
(f) Satellites
4. Discuss & compare various types of networks ?
5. Compare and contrast :(a) Star & Bus topologies
(b) Star & Tree topologies
(c) Bus & Ring topologies
6. What are hubs ? How it is different from switch?
7. Briefly discuss the function of :(a) Repeater
(b) Gateway
(c) Switch
8. What do you mean by system Security? What are common threats to network security?
9. What are Denial of Services (DoS) Attacks?
10. How can you can prevent yourself from various threats of network security ?
Assignment No. 14
MySQL Revision Tour
TYPE A : VERY SHORT ANSWER QUESTIONS
1. Define the following terms:
(I) DBMS
(ii) View
(iii) data security
(iv) data integrity
(v) Relation
(vi) domain
(vii) tuple
(viii) attribute
(ix) Degree
(x) cardinality
1. What is data redundancy? What are the problems associated with it?
2. What is data model? Name various data model?
3. How do database management systems ensure data security and privacy?
4. What do you mean by referential Integrity? How it is enforced in DBMS?
5. What is Key? Define the following keys(I) Primary key
(ii) Candidate key
(iii) Alternate key
(IV) Foreign key.
6. What types of commands are used in the following categories?
1. DDL
2. DML
3. TCL
4. System control commands
7. What do you mean by Data dictionary? What it consist of?
8. What is data type? Name some data types available in MySQL.
9. Compare Char and Varchar data types?
10. Which keyword eliminates the redundant data from a query result?
11. How would you display system date as the result of a query?
12. Which function is used to substitute Null values in a query result?
13. Which operator concatenates two strings in a query result?
14. What command is used for1. To change/open a database
2. To view the table structure.
15. Which comparison operator is used for comparing?
(i) Patterns
(ii) character value (iii) null values (iv) ranges (v) list of values
16. Define a function. Why they are useful?
17. Write commands to display the system date.
18. Write a command to display the name of current month.
19. Write command to print the day of the week of your birthday in the year 1999.
20. What is the difference between SYSDATE() and NOW() function?
21. Consider two fields B_date, which stores the birth date and J_date, which stores the joining date
of an employee. Write commands to find out and display the approximate age of an employee as
on joining date.
22. Which is a constraint? Name some constraint that you can apply to enhance database integrity.
23. What is Primary key? What is PRIMARY KEY constraint?
24. What is the role of UNIQUE constraint? How is PRIMARY KEY constraint different from
UNIQUE constraint?
25. What is NOT NULL constraint? What are DEFAULT constraints?
26. When column’s value is skipped in an INSERT command, which value is inserted in the database?
27. How would you view the structure of table Dept?
28. …………… command removes the table along with its structure and indexes.
29. …………… command removes all the row but not table structure.
30. Identify the error in “DELETE ALL FROM TABLE EMPL” command ?
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
22
Class XI - Informatics Practices (065)
TYPE B : SHORT ANSWER QUESTIONS
1. What is Database Management System? Discuss its advantages.
2. What is Data Abstraction? Draw a diagram explaining various levels of data abstraction.
3. What is meant by “Data independence”? Explain difference between Logical and Physical
data independence.
4. What is MySQL? Describe its features?
5. Differentiate between DDL and DML commands?
6. How constraints ensure the validity of data? Explain various types of constraints with example.
7. What is FOREIGN key? How do you define foreign key in your table?
8. How is FOREIGN KEY different from PRIMARY KEY command?
9. What is default value? How do you define it? What is default value for a column for which no value
is defined?
10. Differentiate between:
(i)
DROP TABLE & DROP DATADABASE
(ii)
DROP TABLE & DROP clause of ALTER TABLE.
11. Explain the following functions with syntax, purpose and example.
1) CONCAT()
5) MID()
9) CURDATE()
2) SUBSTR()
6) MOD()
10) NOW()
3) TRIM()
7) POW()
11) SYSDATE()
4) INSTR()
8) ROUND()
12) DAYNAME()
Table: Empl
empno
ename
job
mgr
hiredate
sal
comm
8369
SMITH
CLERK
8902
1990-12-18
800.00
NULL
8499
ANYA
SALESMAN
8698
1991-02-20
1600.00
300.00
8521
SETH
SALESMAN
8698
1991-02-22
1250.00
500.00
8566
MAHADEVAN
MANAGER
8839
1991-04-02
2985.00
NULL
8654
MOMIN
SALESMAN
8698
1991-09-28
1250.00
1400.00
8698
BINA
MANAGER
8839
1991-05-01
2850.00
NULL
8882
SHIVANSH
MANAGER
8839
1991-06-09
2450.00
NULL
8888
SCOTT
ANALYST
8566
1992-12-09
3000.00
NULL
8839
AMIR
PRESIDENT
NULL
1991-11-18
5000.00
NULL
8844
KULDEEP
SALESMAN
8698
1991-09-08
1500.00
0.00
12. Consider the Empl table and write SQL command to get the following.
a. Write a query to display EName and Sal of employees whose salary are greater than or equal
to 2200?
b. Write a query to display details of employs who are not getting commission?
c. Write a query to display employee name and salary of those employees who don’t have
their salary in range of 2500 to 4000?
d. Write a query to display the name, job title and salary of employees who don’t have manager?
e. Write a query to display the name of employee whose name contains “A” as third alphabet?
f. Write a query to display the name of employee whose name contains “T” as last alphabet?
g. Write a query to display the name of employee whose name contains ”M” as First and “L” as
third alphabet?
h. Write a query to display details of employs with the text “Not given”, if commission is null?
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
23
Class XI - Informatics Practices (065)
13. Write SQL command for the following in the basis of given table (Club)?
COACH_ID
1
2
3
4
5
COACH
KUKREJ
RAVINA
KARAN
TARUN
ZUBIN
AGE
35
34
34
33
36
SPORTS
KARATE
KARATE
SQUASH
SWIMMIN
SWIMMIN
Dsteofapp
27/3/1996
20/01/1998
19/02/1998
01/01/1998
12/01/1998
PAY
1000
1200
2000
1500
750
SEX
M
F
M
M
M
a. To show all information about the swimming coaches in the club.
b. To list names of all coaches with their date of appointment in descending order.
c. To display report, showing coachmen pay, age and bonus (15% of pay).
14. Write SQL command for the following in the basis of given table (Student)?
No
Name
Stipend Stream
Avg
Grad Clas
1
Karan
400
Science
78.5
B
12B
2
Diwakar
450
Commerce
89.2
A
11C
…
……….
……
………..
…..
…
….
a. Select all the Non medical stream students from this table.
b. List names of those students who are in class 12 stored in stipend.
c. List all student stored by avg marks in descending order.
d. Display a report, listing name, stipend, stream, and amount of stipend received in a
year assuming that stipend is paid every month.
15. Write SQL commands for the following on the basis of given table.
Table: LIBRARY
No.
1
2
3
4
5
Title
Author
Type
Pub
Qty
Price
Data Structure
Computer studies
Advanced Pascal
Dbase dummies
Mastering C++
Lipschu
French
Schildt
Palmer
Gurewi
DS
FND
PRO
DBM
PRO
McGraw
Galgotia
McGraw
PustakM
BPB
4
2
4
5
3
217
75
350
130
295
a. Select all the PROG type published by BPB from Library.
b. Display a list of all books with Price more than 130 and stored by Qty.
c. Display all the books stored by Price in ascending order.
16. Write SQL commands for the following on the basis of given table relation Teacher.
No.
NAME
Age
Department
Dateofjoin Salary Sex
1
Jugal
33 Computer
10/01//97
12000
M
2
Sharmila
31 History
23/03/98
20000
F
3
Sandeep
32 Maths
12/12/96
30000
M
4
Sanggeta
35 History
01/07/99
40000
F
5
Rakesh
42 Maths
05/09/97
25000
M
6
Shaym
50 History
27/06/98
30000
M
7
Shiv Om
44 Computer
25/02/97
21000
M
8
Shalakha
33 Math
31/07/97
20000
F
a. To show all information about the teacher of history department.
b. To list the names of female teachers who are in Hindi department.
c. To list names of all teachers with their date of joining in ascending order.
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
24
Class XI - Informatics Practices (065)
17. Given the following table:
TABLE: CLUB
COACH_ID COACHNAME AGE
SPORTS
1
KUKREJA
35
KARATE
2
RAVINA
34
KARATE
3
KARAN
34
SQUASH
4
TARUN
33
BASKETBALL
5
ZUBIN
36
SWIMMING
6
KETAKI
36
SWIMMING
7
ANKITA
36
SQUASH
8
ZAREEN
37
KARATE
Give the output of following SQL statements:
DATOFAPP
1996-03-27
1998-01-20
1998-02-19
1998-01-01
1998-01-12
1998-02-24
1998-02-20
1998-02-22
PAY
1000
1200
2000
1500
750
800
2200
1100
SEX
M
F
M
M
M
F
F
F
(i) SELECT LCASE (SPORTS) FROM Club;
(ii) SELECT MOD (Age, 5) FROM CLUB WHERE Sex =’F’;
(iii) SELECT POWER (3, 2) FROM CLUB WHERE Sports=’KARATE’;
(iv) SELECT SubStr (CoachName, 1, 2) FROM CLUB WHERE Datofapp>’1998-01-31’;
18. Consider the following table and answer the following-
Table: Empl
empno
ename
job
mgr
hiredate
sal
comm
8369
SMITH
CLERK
8902
1990-12-18
800.00
NULL
8499
Anya
SALESMAN
8839
1991-02-20
1600.00
300.00
……….
………
…..
……….
…….
….
…..
a) Update all Ename so that it contains the entire name in capital letters.
b) Increase the salary of employee by 10% in Empl table.
c) Give commission of Rs 500 to all employees who joined in year 1982 in Empl table
d) Modify table Empl, add another column called Grade of VARCHAR type size 1 into it.
e) In the added column Grade, assign grade as follows.
if sal is in range 0-2000 then Grade is 1
If sal is in range 2001-3000 then Grade is 2
If sal is in range 3001 or higher then Grade is 3
f) Display the details of employees who are working under the employee named AMIR.
g) Modify the definition of column Grade. Increase its size to 2.
h) Drop the table Empl.
19. Create the table Employee based on the following table instance Chart.
Column name
ID
FirstName
LastName
Data Type
NUMBER VARCHAR
VARCHAR
Length
8
25
25
DeptID
NUMBER
8
20. Write the command for the followinga) Create table CUSTOMER as per following Table structure.
Column Name CustID
CustName CustAdd1
CustAdd2
CustPhone
Data Type
NUMBER VARCHAR VARCHAR VARCHAR VARCHAR
Length
7
30
20
30
10
b) Add one column Email of data type VARCHAR and size 30 to table Customer.
c) Add one more column CustIncomeGroup of data type VARCHAR(10).
d) Insert few records with relevant information in the Customer table.
e) Drop the column CustomerIncomeGroup from table Customer.
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
25
Class XI - Informatics Practices (065)
Assignment No. 15
DATABASE TRANSACTIONS
TYPE A: VERY SHORT ANSWER QUESTION
1. What is a Transaction?
2. Define the followinga) Atomicity
b) Consistency
c) Isolation d) Durability
3. What are two way in which multiple transactions can be executed?
4. What is Savepoint? What is the role of Savepoint in the Transaction?
5. Describe the following command –
a) COMMIT
b) ROLLBACK
c) SAVEPOINT
TYPE B: SHORT ANSWER QUESTION
1.
2.
3.
4.
Describe briefly the ACID Properties of the Transaction?
What are the advantages and limitation of serial execution of transaction?
Why do we use Savepoint? Explain with an example.
What do you understand by All-or-none concept in context of transaction handling?
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
26
Class XI - Informatics Practices (065)
Assignment No. 16
SQL- GROUPING AND JOINING TABLES
TYPE A: VERY SHORT ANSWER QUESTION
1. What are Single Row and Multiple row functions?
2. What is significance of GROUP BY clause in a SQL query?
3. What is difference between Where and Having clause in SQL select command?
4. Write a query to find out Sum, Average, lowest and highest Marks in Student table?
5. Write a query to find out Sum, Average, lowest and highest Marks of the students in
STUDENT table grouped by STREAM?
6. Write a query to find out number of student in each Stream in STUDENT table?
7. What is a Join? How many types of join can you create in MySQL?
8. Can you join two tables without using Join keyword?
9. What id difference between ON and USING join-clause?
10. How is natural join different from an Equi-join?
TYPE B: SHORT ANSWER QUESTION
1. Consider the following EMP and DEPT table -
Table: Emp
EmpNo
EmpName
City
Designation
DOJ
Sal
Comm
DeptID
8369
SMITH
Mumbai
CLERK
1990-12-18
800.00
NULL
20
8499
ANYA
Varanasi
SALESMAN
1991-02-20
1600.00
300.00
30
8521
SETH
Jaipur
SALESMAN
1991-02-22
1250.00
500.00
30
8566
MAHADEVAN
Delhi
MANAGER
1991-04-02
2985.00
NULL
20
………..
……..
………
……….
……..
…..
…
…
Table: DEPT
DeptID
MgrID
Location
10
SALES
DeptName
8566
Mumbai
20
PERSONEL
9698
Delhi
30
ACCOUNTS
4578
Delhi
40
RESEARCH
8839
Banglore
Write the SQL command to get the following.
a. Show the minimum, maximum and average salary of Managers.
b. Count the number of Clerk in the Organization.
c. Display the Designation wise list of employees with name, Sal and Date of Joining.
d. Count the number of employees who are not getting commission.
e. Show the average salary for all departments with more than 5 working people.
f. List the count of Employees grouped by DeptID.
g. Display the maximum salary of employees in each Department.
h. Display the name of Employees along with their Designation and Department Name.
i. Count the number of Employees working in ACCOUNTS department.
j. Display the name of employees working in Delhi.
k. Display the name of employees working in the same city from where they belongs.
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
27
Class XI - Informatics Practices (065)
l.
m.
n.
o.
Display the name of Employees who is managing SALES department.
Display the name of employees who are working in Delhi and getting more than 5000.
Display the details of employees who are working in RESEARCH Department.
Find out the name of all Salesman who are not working in Mumbai.
2. Consider the following structure of TEACHER and STUDENT table -
Table: TEACHER
TeacherID
TName
City
Subject
Qualification
Designation
Pay
Table: STUDENT
StdID
Name
FName
Stream
TeacherID
Write the SQL command to get the following.
a. Show the name of students enrolled in Science stream.
b. Count the number of students in Commerce Stream.
c. Count the number of teachers in each designation.
d. Display the maximum pay of teacher who is teaching English.
e. Display the name of students who are taught by “Anand Mathur”.
f.
Display the name and designation of teachers who are teaching to a student named “Amit”.
g.
h.
i.
j.
Find out the name of teacher who is getting highest pay.
Find out the city of teachers who are teaching Math subject.
Find out the name of teacher who is getting lowest salary in PGTs.
Display the list of students who are taught by PGTs only.
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
28
Class XI - Informatics Practices (065)
Assignment No. 17
TABLES & INTEGRITY CONSTRAINTS
TYPE A: VERY SHORT ANSWER QUESTION
1. What are constraints? Name the different constraints that can apply on a table?
2. Can you have multiple Primary key in a table?
3. Can you have multiple foreign keys in a table?
4. What do mean by Column level and Table level constraints?
5. Which command is used to delete the constraints from the table?
6. Which command is used to see the structure of a table along with Constraints?
7. Which constraint is used to implement user defined policies or conditions?
8. How is Unique constraints different from Primary Key constraints?
9. What is the role of NOT NULL constraints?
10. How you can disable Foreign Key constraints in a table?
TYPE B: SHORT ANSWER QUESTION
1. What are Referential Integrity? Which constraint is used to implement this integrity rule?
2. How you define a Foreign Key constraint? Explain with an example.
3. How you can add a constraint? Explain with an example.
4. What do the following actions do with foreign key constraint:
a. ON DELETE CASCADE
b. ON UPDATE RESTRICT
c. ON DELETE SET NULL
5.
Write the command for the followinga.
Create table CUSTOMER as per following Table structure.
Column Name CustID
CustName
Data Type
NUMBER VARCHAR
Length
7
30
b.
CustAdd1
VARCHAR
20
CustAdd2
VARCHAR
30
CustPhone
VARCHAR
10
Add one column Email of data type VARCHAR and size 30 to table Customer.
c. Add one more column CustIncomeGroup of data type VARCHAR(10).
d.
Insert few records with relevant information in the Customer table.
e. Drop the column CustomerIncomeGroup from table Customer.
6. Write the commands for the followings:
a.
Create table CUSTOMER as per following Table structure
Col. name
EmpID
EmpName
EmpAdd
EmpPhone EmpSal
Key type
Primary
Nulls /Unique
NOT NULL
Fk Table
Fk Column
Datatype
NUMBER VARCHAR
VARCHAR VARCHAR NUMBER
Length
6
20
30
10
9,2
b. Delete the Primary key constraints from the CUSTOMER table.
c.
DeptID
Foreign
Department
Dept_ID
VARCHAR
2
Change the datatype of EmpSal to Number(10,2) from Number (9,2).
By: Rajesh Kumar Mishra, PGT (Comp.Sc.)
29
Class XI - Informatics Practices (065)
Assignment No. 18
IT APPLICATIONS
TYPE A: VERY SHORT ANSWER QUESTION
1. Define the followingb) E-Governance
b) E-Business
c) E-Learning
2. List any five web portal with their purposes involved in E-Governance.
3. List any five web portal with their purposes involved in E-Commerce or Business.
4. List any five web portal with their purposes involved in E-Learning
5. Define the followings1. Entity
2. Attribute 3. Relation 4. Relationship
TYPE B: SHORT ANSWER QUESTION
1.
2.
3.
4.
5.
How has society benefitted from e-governance? What are the limitations of e-governance?
How has society benefitted for e-business? Discuss its limitations?
How has society benefitted for e-learning? Discuss its societal impacts?
Discuss some popular e-business types incorporated through e-business systems.
What is meant by E-governance Model? How E-Government interacts Citizen, Business
and Government.
6. What do mean by Front-end and Back-end?
7. What is GUI Interface? Discuss some guidelines be followed during design of Interface.
8. What do you mean by DDLC? What are the major steps followed during design of a
Database?
9. What is ER-Diagram? How it helps you to model the database?
What types of relationship are found among entities? Discuss with examples.