18691ptla - Xii Computer - Part 2
18691ptla - Xii Computer - Part 2
18691ptla - Xii Computer - Part 2
EMPSALRAY
TABLE: SALARY
18) Consider the following tables WORKERS and (v) SELECT FIRSTNAME, SALARY FROM WORKERS,
DESIG. Write SQL commands for the statements (i) to DESIG WHERE DESIGINATION = “MANAGER” AND
(iv) and give outputs for SQL queries (v) to (viii).(OD WORKERS.W_ID = DESIGN.W_ID
2005) Ans: FIRSTNAME SALARY
WORKERS Sam 75000
Manila 70000
George 75000
(vi)SELECT COUNT(DISTINCT DESIGNATION)
FROM DESIGN ;
Ans: 4
(vii) SELECT DESIGNATION, SUM(SALARY) FROM
DESIG GROUP BY DESIGNATION HAVING COUNT
(*) < 3;
Ans: Designation Sum(Salary)
Director 85000
Salesman 60000
(viii) SELECT SUM(BENIFTS) FROM DESIG WHERE
DESIGINATION=”salesman”;
Ans: 15000
DESIG 19. Give the following table for database a LIBRARY.
(2004)
TABLE : BOOKS
TABLE: ADMIN
CODE GENDER DESIGNATION
1001 MALE VICE PRINCIPAL
1009 FEMALE COORDINATOR
1203 FEMALE COORDINATOR
1045 MALE HOD
1123 MALE SENIOR TEACHER
1167 MALE SENIOR TEACHER
1215 MALE HOD
(i) To decrease period by 10% of the teachers of
English subject.
UPDATE SCHOOL SET PERIOD = (b) To select all the information of teacher in computer
PERIOD*0.90; department
(ii) To display TEACHERNAME, CODE and Ans: Select * from Teacher where
Department=”Computer”
DESIGNATION from tables SCHOOL and ADMIN
whose gender is male. (c ) To list the name of female teachers in History
SELECT S.TEACHERNAME,S.CODE, Department.
A.DESIGNATION FROM SCHOOL, ADMIN A Ans: Select Name from Teacher Where Sex=”F” And
Department=”History”
WHERE GENDER=‟MALE‟ AND (d) To list all names of teachers with date of admission in
S.CODE=A.CODE; ascending order.
(iii) To display number of teachers in each subject. Ans: Select Name from Teacher Order By Dateofjoining
SELECT SUBJECT, COUNT(*) FROM SCHOOL Asc
GROUP BY SUBJECT; (e) To display Teacher's Name, Department, and Salary of
(iv) To display details of all teachers who have joined female teachers
the school after 01/01/1999 in descending order of Ans: Select Name,Department,Salary from Teacher
experience. Where Sex=”F”
SELECT S.CODE,S.TEACHERNAME, (f)To count the number of items whose salary is less than
S.SUBJECT, S.DOJ,S.PERIODS, 10000
Ans: Select Count(*) from Teacher Where
S.EXPERIENCE,A.GENDER,A.DESIGNATION
Salary<10000
FROM SCHOOL S, ADMIN A WHERE (g) To insert a new record in the Teacher table with the
DOB>‟01/01/1999‟ AND S.CODE=A.CODE following data:
ORDER BY EXPERIENCE DESC; 8,”Mersha”,”Computer”,(1/1/2000),12000,”M”.
(v) SELECT SUM(PERIODS), SUBJECT FROM Ans: Insert into Teacher values ,”Mersha”,
SCHOOL GROUP BY SUBJECT; ”Computer”,{1/1/2000),12000,”M”);
XII Computer – PART 2 (Refer mrkcomputer.blogspot.in ) 19 PRAISE THE LORD
26) Write the SQL commands for (i) to (vii) on the basis (d) To display a report, showing coachname, pay, age and
of the table SPORTS (2001) bonus(15% of pay) for all coaches.
TABLE: SPORTS Ans:
Select Coachname,Pay,Age,Pay*0.15 from Club
(e) To insert a new row in the CLUB table with following
data: 11,”PRAKASH”,37,”SQUASH”,
{25/02/98},2500,”M”
Ans: Insert into Club Values
(11,”PRAKASH”,37,”SQUASH”,{25/02/98}, 2500,”M”)
(f) Give the output of the following SQL statements:
(i) select COUNT (distinct SPORTS)from CLUB;
Ans: 4
(ii) select MIN(AGE) from CLUB where
SEX =”F”;
Ans: 34
(i) Display the names of the students who have grade „C‟ in (iii) select AVG(PAY) fromCLUB where SPORTS =
either Game1 or Game2 or both. “KARATE”;
Ans: Select Name From Sports Where Grade1=”C” OR Ans: 1100
Grade2=”C” (iv) select SUM(PAY) from CLUB where
(ii) Display the number of students getting grade „A‟ in DATAOFAPP>{31/01/98};
Cricket. Ans: 7800
Ans: Select Count(*) from Sports Where (G) Assuming that there is one more table COACHES in
(Game1=”Cricket” and Grade1=”A”) or the database as shown below:
(Game2=”Cricket” and Grade2=”A”) TABLE:COACHES
(iii) Display the names of the students who have same game
for both game1 and game2
Ans: Select Name From Sports Where Game1=Game2
(iv) Display the games taken up by the students, whose
name starts with „A‟.
Ans: Select Game1,Game2 From Sports Where Name
Like “A%”
(v) Add a new column named „marks‟. What will be the output of the following query:
Ans: Alter Table Sports Add Marks Number(5); SELECT SPORTS PERSON, COACHNAME
(vi) Assign a value 200 for marks for all those who are FROM CLUB,COACHES
getting grade „B‟ or „A‟ in both Game1 and Game2. WHERE COACH_ID=COACH_NO
Ans: (Children, Try This Answer as an assignment)
(vii) Arrange the whole table in the alphabetical order of
name.
Ans: Select * from Sports Order By Name
Ans)
27. Write SQL commands for the (b) to (e) and write the
28) Given the following Teacher relation: Write SQL
outputs for (g) on thse basis of table CLUB. (2000)
commands for questions (b) to (g). (1999)
TABLE: CLUB
TEACHER
(b) To show all information about the swimming coaches in (b)To show all information about the teachers of history
the club. department.
Ans: Select * from Club where SPORTS= ”SWIMMING” Ans:select * from teacher where department=‟history‟;
(c) To list names of all coaches with their date of (c) To list names of female teacher who are in math
appointment (DATOFAPP) in descending order. department.
Ans: Select COACHNAME,DATEOFAPP from Club Ans: select name from teacher where sex=‟female‟ and
order by DATEOFAPP desc; department=‟maths‟;
OR
This is absorption law (In some books it is written as as 8) Verify X‟Y + X.Y‟ + X‟Y‟ = (X‟ + Y‟) using
third distributive law.) truth table. (D2009) 2
Ans)
XII Computer – PART 2 (Refer mrkcomputer.blogspot.in ) 22 PRAISE THE LORD
= X‟.Y‟.(Z+Z‟) + X‟.Y.(Z+Z‟) + X.Y‟.Z
= X‟.Y‟ + X‟.Y + X.Y‟.Z
= X‟.(Y‟+Y) +X.Y‟.Z
= X‟ + X.Y‟.Z
= (X‟ + X).(X‟ + Y‟.Z)
= X‟ + Y‟.Z
= LHS
4.Verify the following using Boolean Laws.
Model 1B: Boolean Laws – Algebraic Method U‟+ V= U‟V‟+U‟.V +U.V (2015)
(2Marks) L.H.S =U‟+ V
1) State and verify De Morgan‟s law in Boolean =U‟.(V+V‟)+ V.(U‟+ U)
Algebra. (MP109-10) (D2008) 2 =U‟.V + U‟.V‟ + U‟.V + U.V
=U‟.V+U‟.V‟+U.V
Ans) (i) (X+Y)‟= X‟.Y‟ (ii) (X.Y)‟= X‟+Y‟ =R.H.S
Verification OR
(X+Y)'.(X+Y) = X'.Y'.(X+Y) R.H.S =U‟V‟+U‟.V +U.V
0 = X'.Y'.X + X'.Y'.Y =U‟.(V‟+ V)+ U.V
0 = X'.X .Y'+ X'.0 =U‟.1 + U.V
0 = 0 .Y'+ 0 =U‟+ U.V
0=0+0 =U‟+ V =L.H.S
0=0 5) Verify the following using Boolean Laws
L.H.S = R.H.S X+Z = X + X‟.Z + Y.Z (2013) 2
2) State and verify Absorption Law in Boolean Ans: RHS X + X‟.Z + Y.Z
= X + Z + YZ (X + X‟Y = X+Y)
algebra.(OD2008) (OD2005)(2004) (MP208-09)2 = X + Z.1 + Z.Y
Ans)(a) X+XY = X (b)X(X+Y) = X = X + Z (1 + Y)
(c)X+X‟Y = X+Y (d) X.(X‟+Y) = X.Y = X + Z.1
Algebraic Verification: =X+Z LHS
(a) X+XY = X 6)Verify the following algebraically 2
LHS X+X.Y = X.1+X.Y (A‟+B‟).(A +B)=A‟.B+A.B‟ (2011)
= X.(1+Y)
=X.1
Ans. LHS
=X RHS (A‟ +B‟ ) . (A+B)
Verified = A‟.A + A‟.B + A.B‟ + B‟.B
OR = 0 + A‟.B + A.B‟+ 0
(b)X(X+Y) = X = A‟.B + A.B‟
LHS X.(X+Y) = XX+X.Y = RHS (Verified)
= X.1+X.Y 7)Verify the following algebraically:(OD 2010)2
= X.(1+Y)
= X.1 X‟.Y + X.Y‟ = (X‟+Y‟).(X+Y)
=X RHS Ans. R. H . S
Verified (X‟+y‟).(x+y)
OR = x‟.(x+y)+y‟.(x+y)
(c)X+X‟Y = X+Y = x.x‟+X‟.y+y‟.x+y‟.y
LHS X+X‟. Y = (X+X‟)(X+Y) = x‟.y+y‟.X
= 1.(X+Y) = x‟.y+x.y‟
= X+Y RHS
So L.H.S=R.H.S
Verified
OR OR
(d) X.(X‟+Y) = X.Y L.H.S.
LHS X(X‟+Y) = XX‟+X.Y X‟.Y + X.Y‟
= 0+X.Y = (X‟.Y+X) (X‟.Y+Y‟)
= X.Y RHS = (X‟+X).(Y+X).(X‟+Y‟).(Y+Y‟)
Verified = 1.(X+Y).(X‟ +Y‟).1 = (X+Y).(X‟+Y‟) = R.H.S.
3. Verify the following using Boolean Laws. (2016)2 8) Verify X.Y‟Z+X.Y‟Z‟+X‟.Y‟Z = X.Y‟ + Y‟.Z
X‟+ Y‟Z = X‟.Y‟.Z‟+ X‟.Y.Z‟+ X‟Y.Z+ X‟.Y‟.Z+ algebraically. (2003)
X.Y‟.Z 9) Prove XY + YZ + Y‟Z =XY + Z, algebraically.
Ans LHS =X‟ + Y‟.Z (2002) 2
= X‟.(Y + Y‟).(Z + Z‟) + (X + X‟).Y‟.Z 10) Prove algebraically:
= X‟.Y.Z + X‟.Y.Z‟ + X‟.Y‟.Z + X‟.Y‟.Z‟ + X.Y‟.Z
x‟y‟z‟+x‟y‟z+x‟yz‟+x.y‟z=x‟+y‟ (2001)
+ X‟.Y‟.Z
= X‟.Y.Z + X‟.Y.Z‟ + X‟.Y‟.Z + X‟.Y‟.Z‟ + X.Y‟.Z
11) Prove X‟.Y+Y‟.Z= X‟.Y.Z+X‟.Y‟.Z‟+
= X‟.Y‟.Z‟ + X‟.Y.Z‟ + X‟.Y.Z + X‟.Y‟.Z + X.Y‟.Z X.Y‟.Z+X‟.Y‟.Z algebraically. (2000)
= RHS 12) Prove x+x'y=x+y algebraically. (1999)
OR 13) Prove X+Y'Z=(X+Y'+Z')(X+Y'+Z)(X+Y+Z)
RHS=X‟.Y‟.Z‟ + X‟.Y.Z‟ + X‟.Y.Z + X‟.Y‟.Z + X.Y‟.Z algebraically. (1998)
= X‟.Y‟.Z + X‟.Y‟.Z‟ + X‟.Y.Z + X‟.Y.Z‟ + X.Y‟.Z
XII Computer – PART 2 (Refer mrkcomputer.blogspot.in ) 23 PRAISE THE LORD
Model 1C: Correct the Boolean Laws/Statements 1) Derive a canonical POS expression for a
(2Marks) Boolean function FN, represented by the
Correct the following boolean statements: following truth table. (2018)
1. X+1 = X 2. (A')'=A' X Y Z FN(X,Y,Z)
3. A+A'=0 4. (A+B)' = A.B (2017 MP) 0 0 0 1
A) 1. X+1 =1 or X+0=X 2. ((A‟)‟) = A 0 0 1 1
3. A + A‟= 1 or A . A‟=0 4. (A+B)‟ = A‟ . B‟ 0 1 0 0
Model 2A: Write SOP Form (1 Mark) 0 1 1 0
(Consider Only 1‟s combinations from the Result Column.
Here Variable Value is 1 ) 1 0 0 1
1.Derive a Canonical SOP expression for a 1 0 1 0
Boolean function F(X,Y,Z) represented by the 1 1 0 0
following truth table: 2019MP1 1 1 1 1
Ans: FN(X,Y,Z)=
(X+Y‟+Z).(X+Y‟+Z‟).(X‟+Y+Z‟).(X‟+Y‟+Z)
OR
FN(X,Y,Z)= Π (2,3,5,6)
2. Write the POS form of a Boolean Function F,
which is represented in a truth table as follows:
(2017 MP)
P Q R F
Ans: F(X,Y,Z)= X‟Y‟Z‟+X‟Y‟Z+XY‟Z‟+XYZ 0 0 0 0
OR 0 0 1 1
F(X,Y,Z)=Σ(0,1,4,7) 0 1 0 1
2) Write the SOP form of a Boolean Function F, 0 1 1 1
Which is represented by the following truth table: 1 0 0 0
(D2005)1 1 0 1 1
1 1 0 0
1 1 1 1
A) F(P,Q,R) = (P+Q+R).(P‟+Q+R).(P‟+Q‟+R)
3) Write the POS form of a Boolean function H,
which is represented in a truth table as follows:
(D2009) 1
Ans) A'.B'.C' + A'.B.C + A.B.C' + A.B.C
3) Write the SOP form of a Boolean function G,
which is represented in a truth table as follows:
(MP208-09)1
Model 2B: Write POS Form (1 Mark) Model 3A: Write the Equivalent Boolean
(Consider Only 0‟s combinations from the Result Column. Expression (2 Marks)
Here Variable Value is 0 )
OD200
P.Q‟ + P.R + Q.R‟ 6
2) Write the equivalent expression for the following
Logic Circuit : (OD2005) 2
MP10
Ans) U.V‟+U‟.V+U‟.V 9-10
3) Write the equivalent Boolean expression for the
following Logic Circuit: (D2005) 2
Ans) F(P,Q)=(P‟+Q).(P+Q‟)
2014
2) Draw the Logic Circuit of the following Boolean
Expression: (U‟+V).(V‟+W‟) (2018)2
2013
OD200
7 4. Draw the Logic Circuit for the following Boolean
Expression : (X‟+Y).Z+W‟ (2015)
D2007
F(A,B,C,D)=(0,1,2,4,5,6,8,10) MP109-10
OR
Administrative Office is connected to Orthopedic,
Radiology, Pediatrics units
directly in a Star Topology
(iii) Suggest the devices to be installed in each of ii) Suggest the most suitable place (i.e. buildings) to
these buildings for connecting computers installed house the server of this organization.
within the building out of the following: Ans) The most suitable place/ building to house the
* Gateway * Modem * Switch server of this organization would be building Research
Ans: Switch Lab, as this building contains the maximum number of
(iv)Suggest the topology of the network and network computers.
cable for efficiently connecting each computer iii) Suggest the placement of the following device
installed in each of the buildings out of the following: with justification: a) Repeater b) Hub/Switch
Topologies: Bus Topology, Star Topology a) For layout1, since the cabling distance between
Network Cable: Single Pair Telephone, Coaxial Accounts to Store is quite large, so a repeater would
Cable, Ethernet Cable. ideally be needed along their path to avoid loss of
Topology : Star Topology signals during the course of data flow in this route.
Network Cable: Ethernet Cable / Coaxial Cable For layout2, since the cabling distance between Store
3) Rehaana Medicos Center has set up its new to Recresearch Lab is quite large, so a repeater would
center in Dubai. It has four buildings as shown in ideally be placed.
the diagram given below: (2017MP) b) In both the layouts, a Hub/Switch each would be
needed in all the buildings to interconnect the group of
cables from the different computers in each building.
iv) Suggest a system (hardware/software) to prevent
unauthorized access to or from the network.
A) Firewall
4) 2014
Option 2:
Wing X to Wing Z 40 m
Wing Z to Wing Y 60 m
Wing Y to Wing X 135 m
Wing Y to Wing U 70 m
OR Wing X to Wing U 165 m
Wing Z to Wing U 80 m
Number of computers
Wing X 50
Wing Z 130
Wing Y 40
Wing U 15
XII Computer – PART 2 (Refer mrkcomputer.blogspot.in ) 41 PRAISE THE LORD
1) Suggest a most suitable cable layout of connections
between the Wings, and topology. 1m
2) Suggest the most suitable place (i.e., Wing) to house the
server of this organization with a suitable reason, with
justification. 1m
Ans) Wing Z as it has largest number of computers
3) Suggest the placement of the following devices with
justification:1m
(i)Repeater (ii) Hub/Switch
4) The organization is planning to link its head office
situated in Delhi with the offices at Srinagar.1m Suggest an e2) Suggest the most suitable place (i.e. block) to
economic way to connect it; the company is ready to house the server of this organization with a suitable
compromise on the speed of connectivity. Justify your reason.
answer. 2m Ans) The most suitable place / block to house the
Ans)TCP/IP Dial Up (Most Suitable answer 1)
server of this organisation would be Block C, as this
OR
Telephone Link (Most Suitable answer 2) block contains the maximum number of computers,
OR thus decreasing the cabling cost for most of the
Microwave computers as well as increasing the efficiency of the
OR maximum computers in the network.
Radio Link/Radio Wave e3) Suggest the placement of the following devices
OR with justification
Satellite Link (i) Repeater (ii) Hub/Switch
OR Ans) (i) For Layout 1, since the cabling distance
WAN between Blocks A and C, and that between B and C
11)Knowledge Supplement Organisation has set up its are quite large, so a repeater each, would ideally be
new center at Mangalore for its office and web based
activities. It has 4 blocks of buildings as shown in the
needed along their path to avoid loss of signals during
diagram below: (MP109-10)4 the course of data flow in these routes.
Ans)
XII Computer – PART 2 (Refer mrkcomputer.blogspot.in ) 42 PRAISE THE LORD
e4) The organization is planning to link its front office
situated in the city in a hilly region where cable
connection is not feasible, suggest an economic way
to connect it with reasonably high speed?
Ans)The most economic way to connect it with a
reasonable high speed would be to use radio wave
transmission, as they are easy to install, can travel
long distances, and penetrate buildings easily, so they
are widely used for communication, both indoors and
outdoors. Radio waves also have the advantage of e2) Suggest the most suitable place (i.e. building) to
being omni directional, which is they can travel in all house the server of this organization with a suitable
the directions from the source, so that the transmitter reason.
and receiver do not have to be carefully aligned Ans)The most suitable place / block to house the
physically. server of this organisation would be Raj Building, as
this block contains the maximum number of
12) Ravya Industries has set up its new center at computers, thus decreasing the cabling cost for most
Kaka Nagar for its office and web based activities. of the computers as well as increasing the efficiency
The company compound has 4 buildings as shown of the maximum computers in the network.
in the diagram below: (MP209-10) 4 e3) Suggest the placement of the following devices
with justification:
(i) Internet Connecting Device/Modem
(ii) Switch
Ans)(i)Raj Building
(ii) In both the layouts, a hub/switch each would be
needed in all the buildings, to interconnect the group
of cables from the different computers in each block
e4) The organisation is planning to link its sale
counter situated in various parts of the same city,
which type of network out of LAN, MAN or WAN
will be formed? Justify your answer.
Ans)The type of network that shall be formed to link
the sale counters situated in various parts of the same
city would be a MAN, because MAN (Metropolitan
Area Networks) are the networks that link computer
facilities within a city.
Layout Option 2:
Since the distance between Block A and Block B is
quite short e4) The organization is planning to link its front office
situated in the city in a hilly region where cable connection
is not feasible, suggest an economic way to connect it with
reasonably high speed? 1
Ans) The most economic way to connect it with a
reasonable high speed would be to use radio wave
transmission, as they are easy to install, can travel long
distances, and penetrate buildings easily, so they are widely
used for communication, both indoors and outdoors. Radio
e2) Suggest the most suitable place (i.e. block) to waves also have the advantage of being omni directional,
house the server of this organisation with a suitable which is they can travel in all the directions from the
reason. 1 source, so that the transmitter and receiver do not have to be
Ans) The most suitable place / block to house the carefully aligned physically.
server of this organisation would be Block C, as this 4Marks Problem : Model 2 (Between 2 distant places)
block contains the maximum number of computers, 1)Hi Standard Tech Training Ltd is a Mumbai based
thus decreasing the cabling cost for most of the organization which is expanding its office set-up to
computers as well as increasing the efficiency of the Chennai. At Chennai office compound, they are
maximum computers in the network. planning to have 3 different blocks for Admin,
e3) Suggest the placement of the following Training and Accounts related activities. Each block
devices with justification 1 has a number of computers, which are required to be
i)Repeater ii)Hub/Switch connected in anetwork for communication, data and
Ans) For Layout 1, since the cabling distance resource sharing.
between Blocks A and C, and that between B and C As a network consultant, you have to suggest the best
are quite large, so a repeater each, would ideally be network related solutions for them for issues/problems
needed along their path to avoid loss of signals during raised by them in (i) to (iv), as per the distances
the course of data flow in these routes between various blocks/locations and other given
parameters. (2017)