=0; J) cout<7/2->3 2,3,2,3 2,3->2^3->8 2,3,8 2->3*8->24 2,24,2 2->24/2->12 2,12 2+12 Result of evaluation = 14
Equivalent postfix expression: = (A+B) *C+D/E-F = (((A+B)*C) + (D/E)) – F = (((AB+)*C) + (DE/)) – F = AB+ C* DE/ + FF, T, NOT, AND, F, OR, T, AND Scanned Element Operation Stack Status F Push F T Push F, T NOT Pop one operand from stack F NOT T = F Push F, F AND Pop two operands from stack F AND F = F Push F F Push F, F OR Pop two operands from stack F OR F = F Push F T Push F, T AND Pop two operands from stack F AND T = F Push Pop all F
Result
F
67. T, F, NOT, AND, T, OR, F, AND Scanned Element Operation Stack Status T Push T F Push T, F NOT Pop one operand from stack T NOT F = T Push T, T AND Pop two operands from stack T AND T = T Push T T Push T, T OR Pop two operands from stack T OR T = T Push T F Push T, F AND Pop two operands from stack T AND F = F Push F Result F
68.
5, 2, *, 50, 5, /, 5, –, + Scanned Element Stack Status 5 5 2 5.2 * 10 50 10, 50 5 10, 50, 5 / 10, 10 5 10, 10, 5 – 10, 5 + 15
69.
60, 6, /, 5, 2, *, 5, –, + Scanned Element Stack Status 60 60 6 60, 6 / 10 5 10, 5 2 10, 5, 2 * 10, 10 5 10, 10, 5 – 10, 5 + 15
70.
*
5, 3, 2, *, 4, 2, /, –, * Scanned Element Stack Status 5 5 3 5, 3 2 5, 3, 2 * 5, 6 4 5, 6, 4 2 5, 6, 4, 2 / 5, 6, 2 5, 4 20
71.
False, NOT, True, AND, True, False, OR, AND Scanned Operation Stack Element Status False Push onto stack. False NOT Pop one element from the stack i.e. False. Apply NOT on False we get true, push ontostack. True Push onto stack. True, True AND Pop two elements from the stack. Apply AND between them. Push result onto stack. True Push True onto stack True, True False Push False onto stack. True, True, False OR Pop two elements from the True, True stack. Apply OR between them and push result onto stack. AND Pop two elements from the True stack. Apply and between them and push result onto stack.
72.
True, False, NOT, AND, False, True, OR, AND Scanned Operation Stack Element Status True Push onto stack. True NOT Pop one element from the True, False stack. Apply NOT onFalse and push onto stack. AND Pop two elements from the True stack. Apply AND between them. Push the result onto stack. False Push False onto stack. True, False True Push True onto stack True, False, True OR Pop two elements from the True, True stack. Apply OR between them and push result onto stack. AND Pop two elements from the True stack. Apply and between them and push result onto stack.
73.
50, 60, +, 20, 10, –, * Scanned Element Stack Status 50 50 60 50, 60 + 110 20 110, 20 10 110, 20, 10 – 110, 10 * 1100 Pop all
74.
True, False, NOT, AND, True, True, AND, OR Scanned Element Stack Status True True False True, False NOT True, True AND True True True, True True True, True, True AND True, True OR True
75.
False, True, NOT, OR True, False, AND, OR Scanned Element Stack Status False False True False, True NOT False, False OR False True False, True False False, True, False AND False, False OR False
76.
True, False, NOT, OR, False, True, OR, AND Scanned Element Stack Status True True False True, False NOT True, True OR True False True, False False True, False True True, False, True OR True, True AND True
77.
Let us rewrite like Scanned Element ( X – Y /
(X – Y / (Z + U) * V Stack Status Expression ( ( X ( – X ( – XY (
Answers to 4 marks Question 78.
void STACK::POP() { if (Top!=NULL) { TEXTBOOKS *Temp; Temp=Top; cout<ISBN<TITLE<<”deleted”< Link; delete Temp; } else cout<<”Stack Empty”<ISBN); gets(Temp->TITLE); Temp->Link=Top; Top=Temp; } #include #include struct Node { char Country [20] ; Node *Link; }; class Stack { Node *Top; public: Stack( ) { Top = NULL; } void Push() ; void Pop() ; void Display() ; ~Stack () ; }; void Stack::Push( ) { Node *Temp = new Node; gets(Temp -> Country); Temp -> Link = Top; Top = Temp; } void Stack::Pop( ) { if (Top !=NULL) { Node *Temp = Top;
80.
81.
Top = Top -> Link; delete Temp; } else cout<<“stack Empty”; } void Stack::Display( ) { Node *Temp = Top; while (Temp! = NULL) { cout< Country < Link; } } Stack::~Stack ( ) { while (Top!=NULL) { NODE *Temp=Top; Top=Top->Link; delete Temp; } } void main ( ) { Stack ST; charCh; do { cout<<“p/O/D/Q” ; cin>>Ch; switch (Ch) { case ‘P’ : ST.Push( ); break; case ‘O’ :ST.Pop(); break; case ‘D’ :ST.Disp(); } } while (Ch!=’Q’); } #include #include struct NODE { char City[20]; NODE *Next; }; class Queue { NODE *Rear,*Front; puplic: Queue( ) { Rear=NULL;Front=NULL; } voidQinsert( ); voidQdelete( ); voidQdisplay( );
~Queue( ); } ; void Queue::Qinsert( ) { NODE *Temp; Temp=new NODE; cout<<”Data:”; gets (Temp->City); Temp->Next=NULL; if (Rear==NULL) { Rear=Temp; Front=Temp; } else { Rear–>Next=Temp; Rear=Temp; } } void Queue::Qdelete( ) { if (Front!=NULL) { NODE *Temp=Front; cout<City<<”Deleted \n”; Front=Front->Next; delete Temp; if (Front==NULL) Rear=NULL; } else cout<<”Queue Empty..”; } Queue::Qdisplay( ) { NODE *Temp=Front; while (Temp!=NULL) { cout<City<Next; } } Queue:: ~Queue( )//Destructor Function { while (Front!=NULL) { NODE *Temp=Front; Front=Front->Next; delete Temp; } } void main( ) { Queue QU; charCh; do
82.
83.
84.
{ : : } while (Ch!=’Q’); } void QUEINS (Node *&Front, Node *&Rear) { Node *Temp = new Node; cin>>Temp->PId; gets (Temp->Pname); //or cin>>Temp->Pname; //cin.get1ine(Temp->Pname); Temp->Next = NULL; if(Rear == NULL) Front = Temp; e1se Rear -> Next = Temp; Rear = Temp; } class Queue {Node *Front, *Rear; public: QUEUE( )//Constructor to initialize Front and Rear { Front = NULL; Rear = NULL; } void QUEINS( ); //Function to insert a node void QUEDEL( ); //Function to delete a node void QUEDISP( ); //Function to displaynodes ~Queue(); //Destructor to delete allnodes }; void Queue::QUEDEL( ) { if (Front!=NULL) {NODE *Temp=Front; cout<Itemno<<” “; cout<Itemname<<”Deleted“; Front=Front->Link; delete Temp; if (Front NULL) Rear=NULL; } else cout<<”Queue Empty..”; }
struct Book { intBNo ; charBName[20] ;
Book *Next ; } ; class Stack { Book *Top; public: Stack( ) { Top = NULL; } void Push( ); void Pop( ); void Display( ); }; void Stack::Pop( ) { Book *Temp; if( Top= = NULL) cout<<”Stack Underflow…”; else { cout<<”\nThe Book number of the element to delete: “<BNo; cout<<”\nThe Book name of the element to delete: “<BName; Temp=Top; Top=Top->Next; delete Temp; } } 85.
class Queue { NODE *front,*rear; public: Queue( ) { front = rear = NULL; } void Insert( ); void Delete( ); void Display( ); }; void Queue::Insert( ) { NODE *ptr; ptr=new NODE; if(ptr= = NULL) { cout<<”\nNo memory to create a new node….”; exit(1); } cout<<”\nEnter the name….”; gets(ptr->Name); ptr->Link=NULL;
if(rear= = NULL) front=rear=ptr; else { Rear->Link=ptr; rear=ptr; } } 86.
struct Node {int X,Y ; Node *Link ; } ; class STACK {Node *Top ; public : STACK( ) { Top = NULL; } void PUSH( ) ; void POP( ) ; ~STACK( ) ; } ; void STACK::PUSH( ) {Node *Temp; Temp=new Node; if(Temp= =NULL) {cout<<”\nNo memory tocreate the node…”; exit(1); }cout<<”Enter the value of X and Y”; cin>>Temp->X>>Temp->Y; Temp->Link=Top; Top=Temp; }
87. void QINSERT() { NODE *P=new NODE(); cout<<"Enter the client number"; cin>>P->Cno; cout<<"enter the client name"; gets(P->Cname); P->Next=NULL; if(front==NULL && rear==NULL) { front=P; rear=P; } else { rear->Next=P; rear=P; } } 88. void PUSHBOOK(NODE *top) { NODE *NEW=new NODE; cout<<"Enter the book number"; cin>>NEW->Book_No;
89.
cout<<"Enter book title"; gets(NEW->Book_Title); NEW->Next=NULL; if(top==NULL) top=NEW; else { NEW->Next=top; top=NEW;} } void POPBOOK(NODE *top) { cout<<"deleting top element from stack\n"; cout<<"Book No"<Book_No<Book_Title<Link; delete(temp); }
90. void DELETE() { Node *temp; if(front==NULL) // No element in the queue { cout<<”UNDERFLOW………………..”; } else { temp=front; front=front->Link;// Making the second node as the first one temp->Link = NULL; delete temp; // deleting the previous first node. } } 91. voidstackpop( ) { Node *temp; if(top==NULL) { cout<<”UNDERFLOW……………….”; } else { temp=Top; Top=Top->Link; temp->Link = NULL; delete temp; }}
// Pop from the beginning
92. Algorithm for user choice: 1. ch=0 // Initialize a variable for user choice 2. Read ch //Enter, user choice 1 for push and 2 for pop 3. If(ch == 1) then /* if top is at end of Array-Queue */ 4. call insert function 5. Else 6. call delete function 7. End Algorithm for inserting in Linked-Queue: /* Allocate space for ITEM to be inserted */ 1. NEWPTR = new node 2. NEWPTR -> INFO = ITEM; NEWPTR -> LINK=NULL /* Insert in the queue */ 3. If rear = NULL Then { 4. front = NEWPTR 5. rear = NEWPTR 6. else { 7. rear -> LINK = NEWPTR 8. rear=NEWPTR } 9. END. 93. Algorithm for user choice: 1. ch=0 // Initialize a variable for user choice 2. Read ch //Enter, user choice 1 for push and 2 for pop 3. If(ch == 1) then /* if top is at end of Array-Queue */ 4. call insert function 5. Else 6. call delete function 7. End Algorithm for deleting in Linked-Queue: 1. If front==NULL Then 2. Print "Queue Empty" 3. Else { 4. ITEM=front->INFO 5. If front=rear Then { 6. front=rear=NULL } 7. Else 8. front = front + 1 } 9. END
94. Algorithm for user choice: 1. ch=0 // Initialize a variable for user choice 2. Read ch //Enter, user choice 1 for push and 2 for pop 3. If(ch == 1) then /* if top is at end of stack-array */ 4. call push function 5. Else 6. call pop function 7. End Algorithm for pushing in Linked-Stack Step-1: If the Stack is empty go to step-2 or else go to step-3 Step-2: Create the new element and make your "stack" and "top" pointers point to it and quit. Step-3: Create the new element and make the last (top most) element of the stack to point to it Step-4: Make that new element your TOP most element by making the "top" pointer point to it. Algorithm for popping in Linked-Stack: Step-1: If the Stack is empty then give an alert message "Stack Underflow" and quit; or else proceed Step-2: If there is only one element left go to step-3 or else step-4 Step-3: Free that element and make the "stack", "top" and "bottom" pointers point to NULL and quit Step-4: Make "target" point to just one element before the TOP; free the TOP most element; make "target" as yourTOP most element 95. Let Q be a Queue having size N. DATA be the element to be inserted. F and R denote front and rear positions in the queue. 1. If (R=N-1) then R=0 else R=R+1 2. If (F=R) { write (‘Queue overflow’) Goto step 5 } 3. Q[R]=DATA 4. If (F=-1)then F=F+1 5. End
96.
Let Q be a Queue having size N. DATA be the temporary variable which stores the deleted element (if possible). F and R denote front and rear positions in the queue. 1. If (F<0) then { write(“Queue Underflow”) goto step 4 } 2. DATA=Q[F] 3. If(F=R) then { F=R=-1 } else { if(F=N-1) F=0 else F=F+1 } 4. End
DATABASE MANAGEMENT SYSTEM & SQL 2 MARK QUESTIONS 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14.
15.
16.
What is a relation? What is the difference between a tuple and an attribute? What is primary key in a table? What is data redundancy? What are the problems associated with it? Define the following terms: (i) Degree (ii) Cardinality. Define first, second and the third normal forms. What are views? How are they useful? Differentiate between Candidate Key and Primary Key in context of RBDMS. Differentiate between Candidate key and Alternate key in context of RDBMS. Differentiate between primary key and alternate key. What are candidate keys in a table? Give a suitable example of candidate keys in a table. Differentiate between Data Definition language and Data Manipulation language. What is the different between WHERE and HAVING clause? Write the SQL statement to create EMPLOYEE relation which contains EMPNO, Name, Skill, PayRate. Create a table with undermentioned structure (Table name is EMP) EMPNo NUMBER(4) DeptNo NUMBER(2) EmpName CHAR(10) Job CHAR(10) Manager NUMBER(4) Hiredate DATE Salary NUMBER(7,2) Commission NUMBER(7,2) Create a table with the undermentioned structure (Table name is DEPT) DeptNo NUMBER(2) DeptName CHAR(12) Location CHAR(12) Create a table called PROJECT with the columns specified below.
17.
18. 19. 20. 21.
ProjId NUMBER(4) ProjDesig CHAR(20) ProjStartDT DATE ProjEndDT DATE BudgetAmount NUMBER(7) MaxNoStaff NUMBER(2) Create a table called SALGRADE with the columns specified below: LowSal NUMBER(7,2) HighSal NUMBER(7,2) Grade NUMBER(2) Insert a record with suitable data in the table EMP, having system date as the Hiredate. Illustrate Cartesian product operation between the two tables/relations using a suitable example. What is the purpose of key in a table? Give an example of key in a table. Explain the concept UNION between two tables, with the help of appropriate example.
6
MARKS QUESTIONS
1. Note: Write SQL commands for (b) to (e) and write the outputs for (f) on the basis of table GRADUATE. Table: GRADUATE S.NO. 1 2 3 4 5 6 7 8 9 10.
NAME KARAN DIVAKAR DIVYA ARUN SABINA JOHN ROBERT RUBINA VIKAS MOHAN
STIPEND 400 450 300 350 500 400 250 450 500 300
SUBJECT PHYSICS COMPUTER SC CHEMISTRY PHYSICS MATHEMATICS CHEMISTRY PHYSICS MATHEMATICS COMPUTER SC MATHEMATICS
AVERAGE 68 68 62 63 70 55 64 68 62 57
DIV 1 1 2 1 1 2 1 1 1 2
(a) List the names of those students who have obtained DIV 1 sorted by NAME. (b) Display a report, listing NAME, STIPEND, SUBJEZCT and amount of stipend received in a year assuming that the STIPEND is paid every month. (c) To count the number of students who are either PHYSICS or COMPUTER SC graduates. (d) To insert a new row in the GRADUATE table: 11, “KAJOL”, 300, “COMPUTER SC”, 75, 1 (e) Give the output of following SQL statement based on table GRADUATE: (I) Select MIN(AVERAGE) from GRADUATE where SUBJECT= “PHYSICS”; (II) Select SUM(STIPEND) from GRADUATE where DIV=2; (III) Select AVG(STIPEND) from GRADUATE where AVERAGE>=65; (IV) Select COUNT(distinct SUBJECT) from GRADUATE;
(f) Assume that there is one more table GUIDE in the database as shown below: Table: GUIDE MAINAREA ADVISOR PHYSICS VINOD COMPUTER SC ALOK CHEMISTRY RAJAN MATHEMATICS MAHESH What will be the output of the following query: SELECT NAME, ADVISOR FROM GRADUATE, GUIDE WHERE SUBJECT = MAINAREA
2. Write SQL commands for (a) to (d) and write the outputs for (f) on the basis of table CLUB. Table: CLUB COACH ID 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. (a) (b) (c) (d)
COACH NAME KUKREJA RAVINA KARAN TARUN ZUBIN KETAKI ANKITA ZAREEN KUSH SHAILYA
AGE 35 34 34 33 36 36 39 37 41 37
SPORTS KARATE KARATE SQUASH BASKETBALL SWIMMING SWIMMING SQUASH KARATE SWIMMING BASKETBALL
DATEOFAPP 27/03/1997 20/01/1998 19/02/1998 01/01/1998 12/01/1998 24/02/1998 20/02/1998 20/02/1998 13/01/1998 19/02/1998
PAY 1000 1200 2000 1500 750 800 2200 1100 900 1700
SEX M F M M M F F F M M
To show all information about the swimming coaches in the club. To list names of all coaches with their date of appointment (DATOFAPP) in descending order. To display a report, showing coachname, pay, age and bonus (15% of pay) for all the coaches. To insert in a new row in the CLUB table with the following data: 11, “PRAKASH”, 37, “SQUASH”, {25/02/98}, 2500, “M” (e) Give the output of following SQL statements: (i) Select COUNT(distinct SPORTS) from CLUB: (ii) Select MIN(AGE) from CLUB where SEX = “F”; (iii) Select AVG(PAY) from CLUB where SPORTS = “KARATE”; (iv) Select SUM(PAY) from CLUB where DATOFAPP > {31/01/98}; (f) Assume that there is one more table COACHES in the database as shown below: Table: COACHES SPORTS SEX COACH_NO
PERSON AJAY SEEMA VINOD TANEJA
M F M F
1 2 1 3
What will be the output of the following query: SELECT SPORTSPERSON, COACHNAMEFROMCLUB, COACHES WHERECOACH_ID = COACH_NO
3. (a) Write SQL commands for (i) to (vii) on the basis of the table SPORTS Table: SPORTS Student No. Class Name Game1 Grade Game2 Grade 10 7 Sammer Cricket B Swimming A 11 8 Sujit Tennis A Skating C 12 7 Kamal Swimming B Football B 13 7 Venna Tennis C Tennis A 14 9 Archana Basketball A Athletic C (i) Display the names of the students who have grade ‘C’ in either Game1 or Game2 or both. (ii) Display the number of students getting grade ‘A’ in Cricket. (iii) Display the names of the students who have same game for both Game1 and Game2. (iv) Display the games taken up by the students, whose name starts with ‘A’. (v) Add a new column named ‘Marks’. (vi) Assign a value 200 Marks for all those who are getting grade ‘B’ or grade ‘A’ in both Game1 and Game2. (vii) Arrange the whole table in the alphabetical order of Name. (b) Explain Cartesian product of two relations. 4. Given the following Teacher relation: Write SQL commands for question (a) to (f) No. 1. 2. 3. 4. 5. 6. 7.
Name Raja Sangita Ritu Kumar Venkatraman Sidhu Aishwarya
Department Computer History Sociology Linguistics History Computer Sociology
Dateofjoining 21/05/98 21/05/97 29/08/98 13/06/96 31/10/99 21/05/86 11/1/98
(a) To select all the information of teacher in computer department.
Salary 80000 9000 8000 10000 8000 14000 12000
Sex M F F M M M F
(b) (c) (d) (e) (f)
To list the name of the female teacher in History department. To list all names of teachers with date of admission in ascending order. To display Teacher’s name, Department, and Salary of female teachers. To count the number of teachers whose salary is less than 10,000. To insert a new record in the Teachers table with the following data: 8, “Mersa”, “Computer”, {1/1/2000}, 12000, “M”. (g) Give the output of the following SQL commands: (i) SELECT MIN(DISTINCT Salary) FROM Teacher (ii) SELECT MIN(Salary) FROM Teacher WHERE Sex = “M” (iii) SELECT SUM(Salary) FROM Teacher WHERE Department = “History” (iv) SELECT ACG(Salary) FROM Teacher WHERE dateofjoining< {1/1/98}.
5. Given the following tables for a database INTERIORS : Note: Write SQL command for (a) to (f) and write the outputs for (g) on the basis of tables INTERIORS and NEWONES. Table: INTERIORS NO. ITEMNAME TYPE DATEOFSTOCK PRICE DISCOUNT 1 Red rose Double bed 23/02/02 32000 15 2 Soft touch Baby cot 20/01/02 9000 10 3 Jerry’s home Baby cot 19/02/02 8500 10 4 Rough wood Office Table 01/01/02 20000 20 5 Comfort zone Double bed 12/01/02 15000 20 6 Jerry look Baby cot 24/02/02 7000 19 7 Lion king Office Table 20/02/02 16000 20 8 Royal tiger Sofa 22/02/02 30000 25 9 Park sitting Sofa 13/12/01 9000 15 10 Dine Paradise Dining Table 19/02/02 11000 15
NO. 11 12 13
ITEMNAME White wood James 007 Tom look
Table: NEWONES TYPE DATEOFSTOCKS Double bed 23/03/03 Sofa 20/02/03 Baby cot 21/02/13
PRICE 20000 15000 7000
DISCOUNT 20 15 10
(a) To show all information about the sofas from the INTERIORS table. (b) To list the ITEMNAME which are priced at more than 10,000 from the INTERIORStable. (c) To list ITEMNAME and TYPE of those items, in which DATEOFSTOCK is before 22/01/02 from the INTERIERS table in the descending order of ITEMNAME. (d) To display ITEMNAME and DATEOFSTOCK of those items, in which the discount percentage is more than 15 from INTERIORS table. (e) To count the number of items, whose type is “Double Bed” from INTERIORtable.
(f) To insert a new row in the NEWONES table with the following data: 14, “True Indian”, “Office Table”,{28/03/03}, 15000,20 (g) Give the output of following SQL statement: Note: outputs of the below mentioned queries should be based in original data given in both the tables i.e., without considering the insertion done in (f) part of this question. (i) Select COUNT(distinct TYPE) from INTERIORS; (ii) Select AVG(DISCOUNT) from INTERIORS, where TYPE = “Baby cot”, (iii) Select SUM(Price) from INTERIORS where DATEOFSTOCK < {12/02/02}.
6. Given the following tables for a database FURNITURE : NOTE: Write SQL command for (a) to (f) and write the outputs for (g) on the bases of tables FURNITURE AND ARRIVALS. Table: FURNITURE NO. 1 2 3 4 5 6 7 8 9 10
ITEMNAME White lotus Pink feather Dolphin Decent Comfort zone Donald Royal Finish Royal tiger Econo sitting Eating paradise
Table: ARRIVALS NO. ITEMNAME 11 Wood Comfort 12 Old Fox 13 Micky
TYPE Double Bed Baby cot Baby cot Office Table Double Bed Baby cot Office Table Sofa Sofa Dining Table
TYPE Double Bed Sofa Baby cot
DATEOFSTOCK 23/02/02 20//01/02 19/02/02 01/01/02 12/01/02 24/02/02 20/02/02 22/02/02 13/12/01 19/02/02
DATEOFSTOCK 23/03/03 20/02/03 21/02/02
PRICE 30000 7000 9500 25000 25000 6500 18000 31000 9500 11500
PRICE 25000 17000 7500
DISCOUNT 25 20 20 30 25 15 30 30 25 25
DISCOUNT 25 20 15
(a) To show all information about the baby cots from the FURNITURE table. (b) To list the ITEMNAME which are priced at more than 15000 from the FURNITURE table. (c) To list ITEMNAME AND TYPE of those items, in which DATEOFSTOCK is before 22/01/02 from the FURNITURE table in descending order of ITEMNAME. (d) To display ITEMNAME and DATEOFSTOCK of those items, in which the DISCOUNT percentage is more than 25 from FURNITURE table.
(e) To count the number of items, whose TYPE is “Sofa” from FURNITURE table. (f) To insert a new row in the ARRIVALS table with the following data: 14, “Velvet touch”, Double bed”, {25/03/03}, 25000, 30 (g) Give the output of following SQL statement: Note:outputs of the below mentioned queries should be based on original data given in both the tables i.e., without considering the insertion done in (g) part of this question. (i) Select COUNT(distinct TYPE) from FURNITURE; (ii) Select MAX(DISCOUNT) from FURNITURE,ARRIVALS; (iii) Select AVG(DISCOUNT) from FURNITURE where TYPE = “Baby cot”; (iv) Select SUM(PRICE) from FURNITURE where DATEOFSTOCK < {12/02/02}.
7. Given the following tables for a database LIBERARY: Table: Books Book_Id Book_Name Author_Name Publishers F0001 The Tears William First Publ. Hopkins F0002 Thunderbolts Anna Roberts First Publ. T0001 My First C++ Brian & Brooke EPB T0002 C++ A.W.Rossaine TDH Brainworks C0001 Fast Cook LataKapoor EPB
Price 750
Type Fiction
Qty. 10
700 250 325
Fiction Text Text
5 10 5
350
Cookery
8
Table: Issued Book_Id F0001 T0001 C0001
Quantity Issued 3 1 5
Write SQL queries for (a) to (f): (a) To show Book name, Author name and Price of books of EPB publishers. (b) To list the names of the books of Fiction Type. (c) To display the names and price of the books in descending order of their price. (d) To increase the price of all books of first publisher by 50. (e) To display the Book_Id, Book_Name and Quantity issued for all books which have been issued. (The query will require contents from both the tables). (f) To insert a new row in the table Issued following the data: “F0002”,4 (g) Give the output of the following queries based on the above tables: (i) SELECT COUNT(DISTINCT Publishers) FROM Books. (ii) SELECT SUM(Price) FROM Books WHERE Quantity > 5. (iii) SELECT BOOK_NAME,AUTHOR_NAME FROM Books WHERE Price < 500.
(iv) SELECT COUNT (*) FROM Books.
8. Write SQL commands for (a) to (f) and write output for (g) on the basis of Teacher relation given below: relation Teacher No. Name Age Department Date of join Salary Sex 1. Jugal 34 Computer 10/01/97 12000 M 2. Sharmila 31 History 24/03/98 20000 F 3. Sandeep 32 Maths 12/12/96 30000 M 4. Sangeeta 35 History 01/07/99 40000 F 5. Rakesh 42 Maths 05/09/97 25000 M 6. Shyam 50 History 27/06/98 30000 M 7. Shiv Om 44 Computer 25/02/97 21000 M 8. Shalakha 33 Maths 31/07/97 20000 F (a) (b) (c) (d) (e) (f)
To show all information about the teacher of history department To list the names of female teacher who are in Hindi department To list names of all teachers with their date of joining in ascending order. To display student’s Name, Fee, Age for male teacher only To count the number of teachers with Age>23. To inset a new row in the TEACHER table with the following data: 9, “Raja”, 26, “Computer”, {13/05/95}, 2300, “M” (g) Give the output of following SQL statements: (i) Select COUNT (distinct department) from TEACHER; (II) Select MAX (Age) from TEACHER where Sex = “F” (iii) Select AVG (Salary) from TEACHER where Date of join < {12/07/96}; (iv) Select SUM (Salary) from TEACHER where Date of join < {12/07/96}; 9. Write SQL commands for (a) to (f) and Write the outputs for (g) on the basis of table HOSPITAL Table: HOSPITAL No. Name Age Department Dateofadm Charges Sex 1 Arpit 62 Surgery 21/01/98 300 M 2 Zarina 22 ENT 12/12/97 250 F 3 Kareem 32 Orthopedic 19/02/98 200 M 4 Arun 12 Surgery 11/01/98 300 M 5 Zubin 30 ENT 24/02/98 250 M 6 Ketaki 16 ENT 12/01/98 250 M 7 Ankita 29 Cardiology 20/02/98 800 F 8 Zareen 45 Gynecology 22/02/98 300 F 9 Kush 19 Cardiology 13/01/98 800 M 10 Shilpa 23 Nuclear Medicine 21/02/98 400 F (a) (b) (c) (d) (e) (f)
To select all the information of patients of cardiology department. To list the names of female patients who are in ENT department. To list name of all patients with their date of admission in ascending order. To display Patient’s Name, Charges, Age for only female patients. To count the number of patients with Age<30. To inset in a new row in the HOSPITAL table with the following data: 11, “Aftab”, 24, “Surgery”, {25/02/98}, 300, “M” (g) Give the output of following SQL statements: (i) Select COUNT (DISTINCT charges) from HOSPITAL; (ii) Select MIN (Age) from HOSPITAL where Sex = “F”
(iii) Select SUM (Charges) from HOSPITAL where Department = “ENT” (iv) Select AVG (Charges) from HOSPITAL where Datofadm< {12/08/98} 10. Answer the questions (a) and (b) on the basis of the following tables STORE and ITEM. TABLE STORE SNo SName Area S01 ABC Computronics GK II S02 All Infotech Media CP S03 Tech Shoppe Nehru Place S04 Geeks Techno Soft Nehru Place S05 Hitech Tech Store CP
INo T01 T02 T03 T04 T05 T06 T07 T08 T09 T10 (a)
(b)
TABLE ITEM IName Price Mother Board 12000 Hard Disk 5000 Keyboard 500 Mouse 300 Mother Board 13000 Keyboard 400 LCD 6000 LCD 5500 Mouse 350 Hard Disk 4500
SNo S01 S01 S02 S01 S02 S03 S04 S05 S05 S03
Write the SQL queries (i) to (iv): (i) To display IName and Price of all the items in ascending order of their Price. (ii) To display SNo and SName of all store location in CP. (iii) To display Minimum and maximum Price of each IName from the table ITEM. (iv) To display IName, Price of all items and their respective SName where they are available. Write the output of the following SQL commands (i) to (iv): (i) SELECT DISTINCT IName FROM ITEM WHERE Price >=5000; (ii) SELECT Area, COUNT (*) FROM STORE GROUP BY Area; (iii) SELECT COUNT (DISTINCT Area) FROM STORE: (iv) SELECT IName, Price * 0.05 DISCOUNT FROM ITEM WHERE SNo IN (‘S02’, ‘S03’);
11. Answer the questions (a) and (b) on the basis of the following tables SHOPPE and ACCESSORIES. TABLE SHOP ID SName S0001 ABC Computeronics S0002 All Infotech Media S0003 Tech Shoppe S0004 Greeks Techno Soft S0005 Hitech Tech Store
No
TABLE ACCESSORIES Name Price
Area CP GK II CP Nehru Place Nehru Place
ID
A01 A02 A03 A04 A05 A06 A07 T08 T09 T10
Mother Board Hard Disk Keyboard Mouse Mother Board Keyboard LCD LCD Mouse Hard Disk
12000 5000 500 300 13000 400 6000 5500 350 4500
S01 S01 S02 S01 S02 S03 S04 S05 S05 S03
(a) Write the SQL queries: (i) To display Name and Price of all the accessories in ascending order of their Price. (ii) To display Id and SName of all Shoppe in Nehru Place. (iii) To display Minimum and Maximum Price of each Name of accessories. (iv) To display Name, Price of all accessories and their respective SName where they are available. (b) (i) SELECT DISTINCT Name FROM ACCESSORIES WHERE Price>=500; (ii) SELECT Area, COUNT (*) FROM GROUP BY Area; (iii) SELECT COUNT (DISTINCT Area) FROM SHOPPE; (iv) SELECT Name, Price*0.05 DISCOUNT FROM ACCESSORIES WHERE SNo IN (‘S02, ‘S03’); 12. Write SQL queries for (a) to (f) and write the outputs for the SQL queries mentioned shown in (g1) to (g4) parts on the basis of tables PRODUCTS AND SUPPLIERS TABLE PRODUCTS PID SNAME QTY PRICE COMPANY SUPCODE 101 DIGITAL CAMERA14X 120 12000 RENIX S01 102 DIGITAL PAD lli 100 22000 DIGI POP S02 104 PEN DRIVE 16 GB 500 1100 STOREKING S01 106 LED SCREEN 70 28000 DISEXPERTS S02 105 CAR GPS SYSSTEM 60 12000 MOVEON S03
SUPCODE S01 S03 S02
TABLE SUPPLIERS SNAME CITY GET ALL INC KOLKATA EASY MARKET CORP DELHI DIGI BUSY GROUP CHENNAI
(a) To display the details of all the products in ascending order of product names (i.e. PNAME). (b) To display product name and price of all those products, whose price is in the range of 10000 and 15000 (both values inclusive). (c) To display the number of products which are supplied by each supplier i.e. the expected output should be S01 2 S02 2 S03 1 (d) To display the price, product name (i.e. PName) and quantity (i.e. QTY) of those which have quantity more than 100. (e) To display the names of those suppliers, who are either from DELHI or from CHENNAI. (f) To display the name of the companies and the name of the products in descending order of company names.
(g) Obtain the outputs of the following SQL queries based on the data given in tables PRODUCTS and SUPPLIERS. (g1) SELECT DISTINCT SUPCODE FROM PRODUCTS; (g2) SELECT MAX(PRICE), MIN (PRICE) FROM PRODUCTS; (g3) SELECT PRICE * QTY AMOUNT FROM PRODUCTS WHERE PID = 104; (g4) SELECT PNAME, SNAME FROM PRODUCTS P, SUPPLIERS S WHERE P. SUPCODE = S. SUPCODE AND QTY>100;
13. Write SQL queries for (a) to (f) and write the outputs for the SQL queries mentioned shown in (g1) to (g4) parts on the basis of tables ITEMS and TRADERS. TABLE ITEMS CODE INAME QTY PRICE COMPANY TCODE 1001 DIGITAL PAD12i 120 11000 XENITA T01 1006 LED SCREEN 40 70 38000 SANTORA T02 1004 CAR GPS SYSTEM 50 21500 GEOKNOW T01 1003 DIGITAL CAMERA 12X 160 8000 DIGICLICK T02 1005 PEN DRIVE 32 GB 600 1200 STOREHOME T03
TCODE T01 T03 T02
TABLE TRADERS TNAME CITY ELECTRONIC SALES MUMBAI BUSY STORE CORP DELHI DISP HOUSE INC CHENNAI
(a) To display the details of all the items in ascending order of item names (i.e. INAME). (b) To display item name and price of all those items, whose price is in the range of 10000 and 22000 (both values inclusive). (c) To display the number of items, which are traded by each trader. The expected output of this query should be T01 2 T02 2 T03 1 (d) To display the price, item name (i.e. INAME) and quantity (i.e. QTY) of those items which have quantity more than 150. (e) To display the names of those traders, who are either from DELHI or from MUMBAI. (f) To display the name of the companies and the bane of the items in descending order of company names.
(g) Obtain the outputs of the following SQL queries based on the data given in tables ITEMS and TRADERS. (g1) SELECT MAX (PRICE), MIN (PRICE) FROM ITEMS; (g2) SELECT PRICE * QTY AMOUNT FROM ITEMS WHERE CODE = 1004; (g3) SELE CT DISTINCT TCODE FROM ITEMS; (g4) SELECT INAME, TNAME FROM ITEMS I, TRASERS T WHERE I, TCODE AND QTY<100;
14. Write SQL queries for (a) to (f) and write the outputs for the SQL queries mentioned shown in (g1) to (g4) parts on the basis of tables APPLICANTS and COURSES. TABLE APPLICANTS NO NAME FEE GENDER C_ID JOINYEAR 1012 Amandeep 30000 M A01 2012 1102 Avisha 25000 F A02 2009 1103 Ekant 30000 M A02 2011 1049 Arun 30000 M A03 2009 1025 Amber 40000 M A02 2011 1106 Ela 40000 F A05 2010 1017 Nikita 35000 F A03 2012 1108 Arleena 30000 F A03 2012 2109 Shakti 35000 M A04 2011 1101 Kirat 25000 M A01 2012 TABLE COURSES C_ID COURSE A01 FASHION DESIGN A02 NETWORKING A03 HOTEL MANAGEMENT A04 EVENT MANAGEMENT A05 OFFICE MANAGEMENT (a) (b) (c) (d)
To display name, fee, gender, joinyear about the applicants, who have joined before 2010. To display the names of applicants, who are paying fee more than 30000. To display name of all applicants in ascending order of their joinyear. To display the year and the total number of applicants joined in each YEAR from the table APPLICANTS. (e) To display the C_ID (i.e. Course ID) and the number of applicants registered in the course from the APPLICANTS table.
(f) To display the applicant’s name with their respective course’s name from the tables APPLICANTS and COURSES. (g) Give the output of following SQL statements: (g1) SELECT NAME, JOIN YEAR FROM APPLICANTS WHERE GENDER= ‘F’ AND C_ID= ‘02’; (g2) SELECT MIN(JOINYEAR) FROM APPLICANTS WHERE Gender= ‘M’; (g3) SELE CT AVG(FEE) FROM APPLICANTS WHERE C_ID= ‘A01’ OR C_ID= ‘A05’; (g4) SELECT SUM (FEE), C_ID FROM APPLICATIONS GROUP BY C_ID HAVING COUNT (*)=2;
15. Consider the following tables CABHUB and CUSTOMER and answer (a) and (b) parts of this question: TABLE CABHUB Vcode VehicleName Make Color Capacity Charges 100 Innova Toyota WHITE 7 15 102 SX4 Suzuki BLUE 4 14 104 C-Class Mercedes RED RED 4 35 105 A-Star Suzuki WHITE 3 14 108 Indigo Tata SILVER 3 12
Code 1 2 3 4
TABLE CUSTOMER CName VCode HemantSahu 101 Raj Lal 108 Feroza Shah 105 Ketan Dhal 104
(a) Write SQL commands for the following statements: (i) To display the names of all the white colored vehicles. (ii) To display name of vehicle, make the capacity of vehicles in ascending order of their sitting Capacity. (iii) To display the highest charges at which a vehicle can be hired from CABHUB. (iv) To display the customer and the corresponding name of the vehicle hired by them. (b) (i) SELECT COUNT (DISTINCT Make) FROM CABHUB; (ii) SELECT MAX (CHARGES), MIN (Charges) FROM CABHUB; (iii) SELECT COUNT(*), Make FROM CABHUB; (iv) SELECT VehicleName FROM CABHUB WHERE Capacity = 4; 16. Consider the following tables CARDEN and CUSTOMER and answer (a) and (b) parts of this question: TABLE CARDEN Ccode CarName Make Color Capacity Charges
501 503 502 509 510
A-star Indigo Innova SX4 C-Class CCode 1001 1002 1003 1004
Suzuki Tata Toyota Suzuki
RED 3 SILVER WHITE SILVER Mercedes RED TABLE CUSTOMER Cname Ccode HamantSahu 501 Raj Lal 509 Feroja Shah 503 Ketan Dhal 502
14 3 7 4 4
12 15 14 35
(a) Write SQL commands for the following statements: (i) To display the name of all the SILVER colored cars. (ii) To display name of car, make and capacity of cars in descending order of their sitting capacity. (iii) To display the highest Charges at which a vehicle can be hired from CARDEN. (iv) To display the customer name and the corresponding name of the cards hired by them. (b) Give the output of the following SQL queries: (i) SELECT COUNT (DISTINCT Make) FROM CARDEN; (ii) SELECT MAX (Charges), MIN (Charges) FROM CARDEN; (iii) SELECT COUNT (*), Make FROM CARDEN; (iv) SELECT CarName FROM CARDEN WHERE Capacity = 4; 17. Consider the following tables EMPLOYEE and SALGRADE and answer (a) and (b) parts of this question: TABLE EMPLOYEE ECODE NAME DESIG SGRADE DOJ DOB 101 Abdul Ahmad EXECUTIVE S03 23-MARCH-2003 13-JAN-1980 102 Ravi Chander HEAD-IT S02 12-FEB-2010 22-JUL-1987 103 John Ken Receptionist S03 24-JUN-2009 24-FEB-1983 105 NazarAmeen GM S02 11-AUG-2006 03-MAR-1984 108 PriyamSen CEO S01 29-DEC-2004 19-JAN-1982 TABLE SALGRADE SGRADE SALARY HRA S01 56000 18000 S02 32000 12000 S03 24000 8000 (a) Write SQL commands for the following statements: (i) To display the detail of all the EMPLOYEE in descending order of DOJ. (ii) To display name and design of those EMPLOYEE, whose sgrade is either S02 or S03. (iii) To display the content of all the EMPLOYEE table, whose DOJ is in between ’09-FEB-2006’ and ’08-AUG-2009’. (iv) TO add a new row in the EMPLOYEE table with the following data: 109, ‘Harish Roy’, ‘HEAD-IT’, ‘S02’, ’09-SEP-2007’, ’21-APR-1983’. (b) Give the output of the following SQL queries: (i) SELECT COUNT (SGRADE), SGRADE FROM EMPLOYEE GROUP BY SGRADE; (ii) SELECT MIN (DOB), MAX (DOJ) FROM EMPLOYEE; (iii) SELECT NAME, SALARY FROM EMPLOYEE E, SALGRADE S WHERE E. SGRADE = S. SGRADE AND E. ECODE<103; (iv) SELECT SGRADE, SALARY+HRA FROM SALGRADE WHERE SGRADE = ‘S02’; 18. Consider the following tables WORKER and PAYLAVEL and answer (a) and (b) parts of this question:
ECODE DOB 11 12 13 15 18
NAME RadheShyam ChanderNath Fizza Ahmeen Ahmad Sanya
TABLE WORKER DESIGN PLEVEL Supervisor Operator Operator Mechanic Clerk
P001 P003 P003 P002 P002
DOJ
13-SEP-2004 22-FEB-2010 14-JUN-2009 21-AUG-2006 19-DEC-2005
23-AUG-1981 12-JUL-1987 14-OCT-1983 13-MAR-1984 09-JUN-1983
TABLE PAYLEVEL PLEVEL PAY ALLOWANCE P001 26000 12000 P002 22000 10000 P003 12000 6000 (a) Write SQL commands for the following statements: (i) To display the detail of all WORKER in descending order of DOB. (ii) To display name and design of those WORKER, whoseplevel is either P001 to P002. (iii) To display the content of all the WORKER table, whose DOB is in between ‘19-JAN-1984’ and ‘18-JAN-1987’. (iv) To add a new row with the following: 19, ‘Daya Kishore’, ‘Operator’, ‘P003’, ’19-JUN-2008’, ’11-JUL-1984’. (b) Give the output of the following SQL queries: (i) SELECT COUNT (PLEVEL), PLEVEL FROM WORKER GROUP BY PLEVEL; (ii) SELECT MAX (DOB), MIN (DOJ) FROM WORKER; (iii) SELECT NAME, PAY FROM WORKER W, PAYLEVEL P WHERE W. PLEVEL= P.LEVEL AND W. ECODE<13; (iv) SELECT PLEVEL, PAY+ALLOWANCE FROM PLEVEL WHERE PLEVEL = ‘P003’; 19. Consider the following tables STORE and SUPPLIERS and answer (a) and (b) parts of this question: TABLE STORE iteemNo Item Scode Qty Rate LastBuy 2005 Sharpener Classic 23 60 8 31-JUN-09 2003 Ball pen 0.25 22 50 25 01-FEB-09 2002 Gel Pen Premium 21 150 12 24-FEB-10 2006 Gel Pen Classic 21 250 20 11-MAY-09 2001 Eraser Small 22 220 6 19-JAN-09 2004 Eraser Big 22 110 8 02-DEC-09 2009 Ball Pen 0.5 21 180 18 03-NOV-09
Scode 21 23 22
TABLE SUPPLIERS Sname Premium Stationers Soft Plastics Tetra Supply
(a) Write SQL commands for the following statements: (i) To display details of all the items in the Store table in ascending order of LastBuy. (ii) To display ItemNo and Item name of those items from STORE table whose Rate is more than15 Rupees. (iii)To display the details of those items whose Supplier code (Scode) is 22 or Quantity in
Store (Qty) is more than 110 from the table STORE. (iv)To display minimum Rate of items for each supplier individually as per Scode from the table STORE. (b) Give the output of the following SQL queries: (i) SELECT COUNT (DISTINCT Scode) FROM STORE; (ii)SELECT Rate * Qty FROM STORE WHERE ItemNo=2004; (iii)SELECT Item,Sname FROM Store S, SUPPLIERS P WHERE S.Scode=P.ScodeAND ItemNo=2006; (iv) SELECT MAX(LastBuy) FROM STORE;
20. Consider the following table GARMENT and FABRIC, Write SQL commands for the statements (i) to (iv) and give outputs for the SQL queries (v) to (viii).
GCODE 10023 10001 10012 10024 10090 10019 10009 10007 10020 10089
TABLE GARMENT DESCRIPTION PRICE PENCIL SKIRT 1150 FORMAL SHIRT 1250 INFORMAL SHIRT 1550 BABY TOP 750 TULIP SKIRT 850 EVENING GOWN 850 INFORMAL PANT 1500 FORMAL PANT 1350 FROCK 850 SLACKS 750
FCODE F 03 F 01 F 02 F 03 F 02 F 03 F 02 F 01 F 04 F 03
READYDATE 19-DEC-08 12-JAN-08 06-JUN-08 07-APR-07 31-MAR-07 06-JUN-08 20-OCT-08 09-MAR-08 09-SEP-07 20-OCT-08
TABLE FABRIC FCODE TYPE F 04 POLYSTER F 02 COTTON F 03 SILK F01 TERELENE (i) To display GCODE and DESCRIPTION of each GARMENT in descending order of GCODE. (ii) To display the details of all the GARMENT, which have READYDATE in between 08-DEC-07 and 16-JUN-08 (inclusive if both the dates). (iii) To display the average PRICE of all the GARMENT, which are made up of fabric with FCODE as F03. (iv) To display fabric wise highest and lowest price of GARMENT from GARMENT table. (Display FCODE of each GARMENT along with highest and lowest Price). (v) SELECT SUM (PRICE) FROM GARMENT WHERE FCODE = ‘F01’; (vi) SELECT DESCRIPTION, TYPE FROM GARMENT, FABRIC WHERE GARMENT, FCODE = FABRIC.FCODE AND GARMENT.PRICE >=1260; (vii) SELECT MAX (FCODE) FROM FABRIC;
(viii) SELECT COUNT (DISTINCT PRICE) FROM GARMENT;
21. Consider the following DEPT and WORKER tables. Write SQL queries for (i) to (iv) and find outputs for SQL queries (v) to (viii) :
(i) To display Wno, Name, Gender from the table WORKER in descending order of Wno. (ii) To display the Name of all the FEMALE workers from the table WORKER. (iii) To display the Wno and Name of those workers from the table WORKER who are born between ‘1987-01-01’ and ‘1991-12-01’. (iv) To count and display MALE workers who have joined after ‘1986-01-01’. (v) SELECT COUNT(*), DCODE FROM WORKER GROUP BY DCODE HAVING COUNT(*)>1; (vi) SELECT DISTINCT DEPARTMENT FROM DEPT; (vii) SELECT NAME, DEPARTMENT, CITY FROM WORKER W,DEPT D WHERE W.DCODE=D.DCODE AND WNO<1003; (viii) SELECT MAX(DOJ), MIN(DOB) FROM WORKER;
DATABASE MANAGEMENT SYSTEM & SQL 2 MARK QUESTIONS 1. 2.
A relation is table having atomic values, unique rows and unordered rows and columns. A row in a relation is known as tuple whereas a column of a table is known as an attribute. A Primary Key is a set of one or more attributes that can be uniquely identify tuples within the relation.
3.
Duplication of data is data redundancy. It leads to the problems like wastage of space and data inconsistency. 4. (i) Degree: The numbers of attributes (columns) in a relation determine the degree of a relation. (ii) Cardinality: The number of tuples (rows) in a relation is called the cardinality of the relation. 5. A relation R is in first normal form (INF) if and only if all underlying domains of the relation contain atomic (indivisible) values. A relation R is in second normal form (2NF) if and only if it is in 1 NF and every nonkey attribute is fully dependent on the primary key. A relation R is said to be in third normal form (3NF) if only and if it is in 2 NF and every nonkey attribute is non-transitively dependent upon the primary key. 6. A view is a virtual table that does not really exist in its own right but it instead derived from one and more underlying base table(s). The view is kind of table whose contents are taken upon other tables depending upon a given query condition. No stored file is created to store contents of a view rather its definition is stored only. The usefulness of views lies in the fact that they provide an excellent way to give people access to some but not all of the information in a table. 7. Candidate Key. A candidate key is the one that is capable of becoming primary key. i.e., a field or attribute that has unique value for each row in the relation. Primary Key is a designed attribute or a group of attributes whose values can uniquely identify the tuples in the relation. 8. Candidate Key. A candidate key is the one that is capable of becoming primary key i.e., a field or attribute that has unique value for each row in the relation. A candidate key that is not a primary key is called an Alternate key. 9. Primary Key. It is the set of one or more attributes that can uniquely identify tuples within a relation. Alternate Key. It is a candidate key which is not primary key. 10. A candidate key is the one that is capable of becoming primary key i., a field or attribute that has unique value for each row in the relation. Example Table: ITEM Ino Item Quantity 101 Pen 560 102 Pencil 340 104 CD 540 10 DVD 200 110 Floppy 400 {Candidate Keys} 11. The SQL DDL provides commands for defining relation schemas, deleting relationship, creating indexes and modifying schemas. The SQL DML includes a query language to insert, delete and modify tuples in the database. Data Manipulation Language (DML) is used to put values and manipulate them in tables and other database objects and Data Definition language (DDL) is used to create tables and other database objects. 12. The HAVING clause places conditions on groups in contrast to WHERE clause, which places conditions ` on individual rows. 13. CREATE TABLE Employee ( EmpNo CHAR(4) NOT NULL PRIMARY KEY, Name CHAR(20) NOT NULL, Skill CHAR(1), PayRate REAL); 14. CREATE TABLE Emp ( EmpNo Number(4) NOT NULL PRIMARY KEY DeptNo Number(2),
15.
16.
17.
18.
19.
EmpName Char(10), Job Char(10), Manager Number(4), Hiredate Date, Salary Number(7,2); Commission Number(7,2) ); CREATE TABLE Dept ( DeptNo NUMBER(2) NOT NULL PRIMARY KEY, DeptName CHAR(12), Location CHAR(12); CREATE TABLE Project ( ProjId Number(4) NOT NULL PRIMARY KEY, ProjDesig Char (20) NOT NULL, ProjStartDT Date, ProjEndDT DATE, BudgetAmount Number(7,2) MaxNoStaff Number(2) ); CREATE TABLE Salgrade ( LowSal NUMBER(7,2), HighSal NUMBER(7,2), Grade NUMBER(2) ); Date ( ) function gives the system date. INSERT INTO Emp VALUES (3008, 18, “XAVIER”, “Manager”, Date( ), 3250, NULL); The two table GABS1 and GABS are as follows:
ROLL NO
GAB 1 NAME
1 2
ABC GABS
MARKS
GAB 2 SROLL NO
90 92
AGE
1 3
19 17
The certesian product of above two tables is as follows:
RollNo 1 1 2 2
Cartesian Product Name Marks ABC 90 ABC 92 GABS 90 GABS 92
1 3 1 3
SRollNo 19 17 19 17
Age
20.
A key is used to identify a tuple uniquely with in the relation. The value of key is unique. No rows in the relation can have same value. e.g.In an Employee relation EmpCode is a key using EmpCode one can obtain the information of a particular employee.
21.
The UNION operator is used to combine the result-set of two or more tables, without returning any duplicate rows.
e.g. Table CUSTOMERS ID SNAME CITY 1 A London 2 B Berlin 3 C Mexico Table SUPPLIER ID 3 4 5 6
SNAME D E F G
CITY Mexico London UK Germany
SELECT CITY FROM CUSTOMERS UNION SELECT CITY FROM SUPPLIER: The resultant table will be: CITY London Berlin Mexico UK Germany
6 MARKS QUESTIONS 1.
(a)
(b) (c)
(d) (e) (f)
2.
(a) (b)
Select Name From GRADUATE Where DIV = 1 Order by Name; Select Name, stipend, subject, stepend * 12 From GRADUATE Select count (*) From GRADUATE Where subject IN (“PHYSICS”, “COMPUTER SC”); Insert into GRADUATE Values (11, “KAJOL”, 300, “COMPUTER SC”, 75,1); (i) 63 (ii) 1000 (iii) 450 (iv) 4 KARAN VINOD DIVAKAR ALOK DIVYA RAJAN ARUN VINOD SABINA MAHESH JOHN RAJAN ROBERT VINOD RUBINA MAHESH VIKAS ALOK MOHAN MAHESH Select * From CLUB Where sports = “SWIMMING”; Select COACHNAME From CLUB Order by DATOFAPP desc ;
(c)
3.
4.
Select coachname, pay, age, 0.15 * pay From CLUB; (d) Insert into CLUB Value (11, “PRAKASH”, 37, “SQUASH”, {25/02/98], 2500, “M”); (e) (i) 4 (ii) 34 (iii) 1100 (iv) 7800 (f) AJAY KUKREJA SEEEMA RAVINA VINOD KUKREJA TANEJA KARAN (a) Note: In a given table, two fields are having the same name GRADE, which is a mistake in the paper. So, we are assuming these names to be GRADE1 and GRADE2 respectively where GRADE1 pertains to grade of GAME1 and GRADE2 pertains to grade of GAME2. (i) SELECT Name FROM Sports WHERE Grade1 = “C” OR Grade2 = “C”; (ii) SELECT Count (*) FROM Sports WHERE (Grade1 = “A”) AND Game1 = “Cricket”) OR (Grade2 = “A” and Game2 = “Cricket”); (iii) SELECT Name FROM Sports Game1 = Game2; Where Game1 = Game2 (iv) SELECT Game1, Game2 FROM Sports WHERE Name like “A”; (v) ALTER TABLE Student ADD Marks float (6, 2); (vi) UPDATE Student SET Marks = 200 Where grade1 < = “B” AND grad2 < = “B”; (vii) SELECT * FROM Sports ORDER BY Name; (b) The Cartesian product is a binary operation and is denoted by a cross(x). The Cartesian product of two relations A and B is written as A x B. The Cartesian product yields a new relation which has (degree number of attributes) equal to the sum of the degrees of the two relations operated upon. The number of tuples (cardinality) of the new relation of the product of the number of tuples of the two relations operated upon. The Cartesian product of two relations yields a relation with all possible combinations of the tuples of the two relations operated upon. (a) SELECT * FROM Teacher WHERE Department = “Computer”; (b) SELECT Name FROM Teacher WHERE Department = “History” and Sex = “F”; (c) SELECT Name FROM Teacher ORDERBY Dateofjoining; (d) SELECT Name, Department, Salary, FROM Teacher WHERE Sex = “F”; (e) SELECT Count(*), FROM Teacher
(f) (g) 5.
(a) (b) (c) (d) (e) (f) (g)
6.
(a) (b) (c) (d) (e) (f) (g)
7.
(a)
(b)
(c)
(d)
(e)
(f) (g)
8.
(a) (b) (c)
WHERE Salary < 10,000; INSERT into Teacher Values (8, “Mersha”, “Computer”, {1/1/2000}, 12000, “M”); (i) 8000 (ii) 8000 (iii) 17000 (iv) 11250 Select * From INTERIORS Where TYPE = “Sofa”; Select ITEMNAME From INTERIORS Where PRICE > 10000; Select ITEMNAME, TYPE From INTERIORS Where DATEOFSTOCK < {22/01/02} Order by ITEMNAME; Select ITEMNAME, DATEOFSTOCK From INTERIORS Where DISCOUNT > 15; Select Count (*) From INFERIORS Where TYPE = “Double Bed”; Insert into NEWONES Values (14, “True Indian”, “Office Table”, {28/03/03}, 15000, 20}; (i) 5 (ii) 13 (iii) 43000 Select * From FURNITURE Where TYPE = “Baby cot”; Select ITEMNAME From FURNITURE Where PRICE > 15000; Select ITEMNAME, TYPE From FURNITURE Where DATEOFSTOCK < {22/01/02} Order by ITEMNAME; Select ITEMNAME, DATEOFSTOCK From FURNITURE Where DISCOUNT > 25. Select Count (*) From FURNITURE Where TYPE = “Sofa”; Insert Into ARRIVALS Values (14, “Velvet touch”, “Double bed”, {25/03/03}, 25000, 30); (i) 5 (ii) 30 (iii) 18.33 (iv) 66500. SELECT Book_Name, Author_Name, Price FROM Books WHERE Publishers = “EPB”; SELECT Book_Name FROM Books WHERE Type = “Fiction”; SELECT Book_Name, Price FROM Books ORDER BY Price DESC; UPDATE Book SET Price = Price + 50 WHERE Publishers = “First Publ.”; SELECT Books.Book_Id, Book_Name, Quantity_Issued FROM Books, Issued WHERE books.Book_Id = Issued.Book_Idf; INSERT INTO Issued VALUES(“F0002”,4); (i) 3 (ii) 1350 (iii) MY First C++ Brain & Brooke C++ Brainworks A.W. Rosssaine Fast Cook LataKapoor (iv) 5 SELECT * FROM Teacher WHERE Department = “History”; SELECT Name FROM Teacher WHERE Department = “Hindi” and Sex = “F”; SELECT Name, Dateofjoin FROM Teacher ORDER BY Dateofjoin;
(d)
(e) (f) (g)
9.
(a) (b) (c) (d) (e) (f)
10.
(g) (a)
(b)
(The given query is wrong as no. information about students and fee etc. is available. The query should actually be To display teacher’s Name, Salary, Age for male teacher only) SELECT Name, Salary, Age FROM Teacher WHERE Age > 23 AND Sex = ‘M’; SELECT COUNT (*) FROM Teacher WHERE Age > 23; INSERT INTO Teacher VALUES (9, “Raja”, 26, “Computer”, {13/05/95}, 2300, “M”); (i) 3 (ii) 35 (iii) 23600 (AVG (Salary)) (iv) 2300 – after insertion (It is SUM (Salary)) SELECT * FROM Hospital WHERE Department = “Cardiology; SELECT Name FROM Hospital WHERE Department = “ENT” AND Sex = “F”; SELECT Name, Datofadm FROM Hospital ORDER BY Datofadm; SELECT Name, Charges, Age FROM Hospital WHERE Sex = “F”; SELECT COUNT (*) FROM Hospital WHERE Age < 30; INSERT INTO Hospital VALUES (11, “Aftab”, 24, “Surgery”, {25/02/98}, 300, “M”; (i) 5 (ii) 16 (iii) 750 (iv) 340. (i) SELECT IName, Price FROM ITEM ORDER BY Price ASC; (ii) SELECT IName FROM STORE WHERE Area = ‘CP’; (iii) SELECT IName, MIN (Price) “Minimum Price”, MAZ (Price) “Maximum Price” FROM ITEM GROUP BY IName; (iv) SELECT IName, Price, SName FROM ITEM I, STORE S WHERE I, SNo = S.No (i) INAME Mother Board Hard Disk LCD (ii)
AREA GK II CP Nehru place
COUNT(*) 1 2 2
(iii)
Count (DISTINCT Area) 3
(iv)
11.
INAME DISCOUNT Keyboard 25 Mother Board 650 Keyboard 20 Hard Disk 225 (a) (i) SELECT Name, Price FROM ACCESSORIES ORDER BY Price ASC; (ii) SELECT ID, Price FROM SHOPPE WHERE Area = ‘Nehru Place’; (iii) SELECT MIN (Price) “Minimum Price”, MAX (Price) “Maximum Price”, Name FROM ACCESSORIES GROUP BY Name; (iv) SELECT Name, Price, SName FROM ACCESSORIES A. SHOPPE S WHERE A. ID = S. ID (b) (i) NAME Mother Board Hard Disk LCD (ii) AREA COUNT(*) CP 2 GK II 1 Nehru Place 2
(iii)
12.
(a)
(b)
(c)
(d)
(e)
(f)
COUNT (DISTINCT Area) 3 (iv) The given query will result in an error as there is no column named SNo in Accessories table. SELECT * FROM PRODUCTS ORDER BY NAME; SELECT PNAME’ PRICE FROM PRODUCTS WHERE PRICE BETWEEN 10000 AND 15000; SELECT SUPCODE, COUNT (*) FROM PRODUCTS GROUP BY SUPCODE; SELECT PRICE, PNAME, QTY FROM PRODUCTS WHERE QTY > 100; SELECT SNAME FROM SUPPLIERS WHERE CITY IN (‘DELHI’, CHENNAI’); SELECT COMPANY, PNAME
(g)
FROM PRODUCTS ORDER BY COMPANY DESC; (g1) SUPCODE S01 S02 S03 (g2) (g3)
(g4)
13.
(a) (b)
(c)
(d)
(e)
(f)
(g)
MAX(PRICE) MIN(PRICE) 28000 1100 AMOUNT 550000 PNAME DIGITAL CAMERA 14X PEN DRIVE 16 GB
SELECT * FROM ITEMS ORDER BY INAME; SELECT INAME, PRICE FROM ITEMS WHERE PRICE BETWEEN 10000 AND 22000; SELECT TCODE, COUNT (*) FROM ITEMS GROUP BY TCODE; SELECT PRICE, INAME, QTY FROM ITEMS WHERE QTY >150; SELECT TNAME FROM TRADERS WHERE CITY = ‘MUMBAI’ OR CITY =’DELHI’; SELECT COMPANY, INAME FROM ITEMS OREDER BY COMPANY DESC; (g1) MAX (PRICE) MIN (PRICE) 38000 1200 (g2)
AMOUNT 1075000
(g3)
TCODE T01 T02 T03
(g4)
14.
(a)
SNAME GET ALL INC GET ALL INC
INAME TNAME LED SCREEN 40 DISP HOUSE INC CAR GPS SYSTEM ELECTRONIC SALES
SELECT NAME, FEE, GENDER, JOINYEAR FROM APPLICANTS
(b)
(c)
(d)
(e)
(f)
(g)
WHERE JOINYEAR<2010; SELECT NAME FROM APPLICANTS WHERE FEE >30000; SELECT NAME FROM APPLICANTS ORDER BY JOINYEAR; SELECT JOINYEAR, COUNT (*) FROM APPLICANTS GROUP BY JOINYEAR SELECT C_ID, COUNT (*) FROM APPLICANTS ORDER BY C_ID; SELECT NAME, COURSE FROM APPLICANTS, COURSES WHERE APPLICANTS. C_ID=COURSES.C_ID; (g1) NAME JOINYEAR Avisha 2009 (g2)
MIN (JOINYEAR) 2009
(g3)
AVG(FEE) 31666.666
(g4) 15.
SUM(FEE) 55000
C_ID A01
(a) (i) SELECT VehicleName FROM CABHUB WHERE Color = ‘WHITE’; (ii) SELECT VehicleName, Make, Capacity FROM CABHUB ORDER BY Capacity; (iii) SELECT MAX (Charges) FROM CABHUB; (iv) SELECT CName, VehicleName FROM CABHUB, CUSTOMER WHERE CABHUB, Vcode = CUSTOMER, Vcode;
(b) (i) COUNT (DISTINCT Make) 4 (ii)
MAX (Charges) MIN (Charges) 35 12 (iii) This query will execute but count (*) will result one row and Make will give more than one row so both are not compatible together. But on removing Make from select clause it will give following result. COUNT(*) 5 (iv) VehicleName
SX4 C-Class 16. (a) (i) SELECT CarName FROM CARDEN WHERE Color = ‘SILVER’; (ii) SELECT CarName, Make, Capacity FROM CARDEN; ORDER BY Capacity DESC; (iii) SELECT MAX (Charges) FROM CARDEN; (iv) SELECT CName, CarName FROM CARDEN, CUSTOMER WHERE CARDEN.Ccode = CUSTOMER.Ccode; (b)
(ii)
(i)
COUNT (DISTINCT Make) 4 MAX (Charges) 35
MIN (Charges) 12
(iii) This query will execute but count (*) will result one row and Make will give more than one row so both are not compatible together. But on removing Make from select clause it will give compatible result: COUNT(*) 5 (iv) CarName SX4 C-Class
17. (a) (i) SELECT * FROM EMPLOYEE ORDER BY DOJ DESC; (ii) SELECT NAME, DESIG FROM EMPLOYEE WHERE SGRADE= ‘S02’ OR SGRADE = ‘S03’; (iii) SELECT * FROM EMPLOYEE WHERE DOJ BETWEEN ’09-FEB-2006’ AND ’08-AUG-2009’; (iv) INSERT INTO EMPLOYEE VALUES (109, ‘Harish Roy’, ‘HEAD-IT’, ‘S02’, ’09-SEP-2007’, ’21-APR-1983’); (b) (i) COUNT (SGRADE) SGRADE 1 S01 2 S02 3 S03 (ii) MIN(DOB) MAX(DOJ) 13-JAN-1980 12-FEB-2010
(iii) NAME Abdul Ahmad Ravi Chander (iv)
18.
SGRADE S02
SALARY+HRA 44000
(a) (i) SELECT * FROM WORKER ORDER BY DOB DESC; (ii) SELECT NAME, DESIG; FROM WORKER WHERE PLEVEL = ‘P001’ OR PLEVEL = ‘P002’; (iii) SELECT * FROM WORKER WHERE DOB BETWEEN ’19-JAN-1984’ AND ’18-JAN-1987’; (iv) INSERT INTO WORKER VALUES (19, ‘Daya Kishore’, Operator’, ‘P003’ ’19-JUN-2008’, ’11-JUL-1984’); (b) (i) COUNT (PLEVEL) PLEVEL 1 P001 2 P002 3 P003 (ii)
MAX(DOB) 12-JUL-1987
MIN (DOJ) 13-SEP-2004
(iii)
NAME RadheShyam ChanderNath
26000 12000
PLEVEL P003
PAY+ALLOWANCE 18000
(iv)
19.
SALARY 24000 32000
(a)
(i)SELECT *
FROM STORE ORDER BY LastBuy; (ii) SELECT itemNo. Item FROM STORE WHERE Rate>15; (iii) SELECT * FROM STORE WHERE Scode = 22 OR Qty>110; (iv)SELECT MIN(Rate) FROMSTORE GROUP BY Scode; (b) (i) COUNT (DISTINCT Scode) 3 (ii)
(iii)
Rate * Qty 880 Item
Sname
PAY
Gel Pen Classic Premier Stationers (iv)
20.
MAX(Lastbuy) 24-FEB-10
(i) SELECT GCODE, DESCRIPTION FROM GARMENT ORDER BY GCODE DESC; (ii) SELECT * FROM GARMENT WHERE READY DATE BETWEEN ’08-DEC-07’ AND ’16-JUN-08’; (iii) SELECT AVG (PRICE) FROM GARMENT WHERE FCODE = ‘F03’; (iv) SELECT FCODE, MAX (PRICE), MIN (PRICE) FROM GARMENT GROUP BY FCODE; (v) SUM (PRICE) 2600 (vi) DESCRIPTION TYPE INFORMAL SHIRT COTTON INFORMAL PANT COTTON FORMAL PANT TERELENE (vii) MAX (FCODE) F04 (vii) COUNT (DISTINCT PRICE) 7
21. (i)
SELECT Wno,Name,Gender FROM Worker ORDER BY Wno DESC; (ii) SELECT Name FROM Worker WHERE Gender=’FEMALE’; (iii)SELECT Wno, Name FROM Worker WHERE DOB BETWEEN ‘ 19870101’ AND ‘ 19911201’; (iv) SELECT COUNT(*) FROM Worker WHERE GENDER=’MALE’ AND DOJ > ‘19860101’; (v) COUNT(*) DCODE 2 D01 2 D05 (vi)Department MEDIA MARKETING INFRASTRUCTURE FINANCE HUMAN RESOURCE (vii) NAME George K RymaSen
DEPARTMENT CITY MEDIA DELHI INFRASTRUCTURE MUMBAI
(viii) MAX(DOJ) 2014-06-09
MIN(DOB) 1984-10-19
BOOLEAN ALGEBRA 1 MARK QUESTIONS 1. Write the Sum of Product form of the function F (P,Q,R) for the following truth table representation of F: P Q R F 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 2. Write the Product of Sum form of the function F(X,Y,Z) for the following truth table representation of F: X Y Z F 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1
3. Write the Product of Sum of the function G(U,V,W) for the following truth table representation of G: U V W G 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 4. Write the Product of Sum form of the function G (U, V, W) for the following truth table representation of G: U V W G(U, V, W) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 0 5. Write the Sum of Product form of the function F(A, B, C) for the following truth table representation of F: A B C F 0 0 0 0 0 0 1 0 0 1 0 1
0 1 1 1 1
1 0 0 1 1
1 0 1 0 1
1 1 0 0 1
6. Write the POS form of boolean function G, which is represented in a truth table as follows: A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
G 0 1 1 0 0 0 1 1
7. Write the SOP form of Boolean function F, which is represented in a truth table as follows: X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
F 1 0 1 0 1 0 0 1
8. Write the POS form of a boolean function F, which is represented in truth table as follows: A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
F 0 1 1 0 1 0 0 1
9. Write the SOP form of a boolean function F, which is represented in a truth table as follows: A 0 0 0 0 1 1 1
B 0 0 1 1 0 0 1
C 0 1 0 1 0 1 0
F 1 0 0 1 0 0 1
1
1
1
1
10. Write the SOP form of a boolean function F, which is represented in a truth table as follows: X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z F(X,Y, Z) 0 1 1 0 0 0 1 1 0 0 1 0 0 1 1 1
11. Write the POS form of boolean function H, which is represented in a truth table as follows:
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
H 1 0 1 1 1 0 0 1
12. Write the SOP form of boolean function G, which is represented in truth table as follows: P 0 0 0 0 1 1 1 1
Q 0 0 1 1 0 0 1 1
R 0 1 0 1 0 1 0 1
G 0 0 1 1 1 0 1 1
13. Write the POS form of boolean function H, which is represented in a truth table as follows: A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
H 0 1 1 1 1 0 0 1
14. Write the POS form a boolean function G, which is represented in a truth table as follows:
u 0 0 0 0 1 1 1 1
v 0 0 1 1 0 0 1 1
w 0 1 0 1 0 1 0 1
G 1 1 0 0 1 1 0 1
15. Draw a logic circuit diagram for the boolean expression: X.(Y + Z) 16. Draw a logic circuit diagram for the boolean expression: A.(B+C) 17. Draw a logic circuit diagram for the boolean expression: A.(B+C) 18. Prove that X . (X + Y) = X by truth table method. 19. Find the complement of the following Boolean function: F1 = AB’ C’D’ 20. In the Boolean Algebra, verify using truth table that X + XY for each X, y in (0, 1). 21. In the Boolean Algebra, verify using truth table that (X + Y)’ + X’Y’ for each X’ Y in (0, 1). 22. Give the dual of the following result in Boolean Algebra X . X’ = for each X. 23. Define the followings: (a) Minterm (b) Maxterm (c) Canonical form 24. Interpret the following logic Circuit as Boolean expression:
25. Interpret the following Logic Circuit as Boolean Expression:
26. Write the dual of the Boolean expression A + B’ .C. 27. Write the dual of the Boolean expression (B’ + C) . A. 28. Represent the boolean expression X (Y’ + Z) with help of NOR gates only.
29. State Demorgan’s Laws: 30. Which gates are called Universal gates and why? 2 Marks Questions 1. Name the law shown below and verify it using a truth table. A + B. C = (A + B) .(A + C) 2. Obtain the Boolean expression for the logic circuit shown below:
Name the law shown below and verify it using a truth table. X + X’. Y = X + Y 3 Obtain the Boolean expression for the logic circuit shown below:
4 Verify the following using boolean laws X + Z = X + X’.Z + Y.Z 5 Verify the following using boolean laws A + C = A + A’.C + B.C 6 Obtain the Boolean expression for the logic circuit shown below:
7 State DeMorgan’s laws. Verify one of the DeMorgan’s laws using a truth table. 8 Draw a logic circuit for the following boolean expression. A.B’ +(C +B’) .A’ 9 Obtain the Boolean expression for the logic circuit shown below:
10 Verify the following using boolean expression using truth table: (i) X+0=X (ii) X + X’ = 1
11 Write the equivalent Boolean expression for the following logic circuit:
12 Verify the following boolean expression using truth table: (i) X . X’ = 0 (ii) X + 1 = 1 13 Write the equivalent boolean expression for the following logic circuit:
14 Verify the following boolean expression using truth table: u.(u’ + v) = (u + v) 15. Write the equivalent boolean expression for the following logic circuit:
16. Verify the following boolean expression using truth table: X + Y .Z = (X + Y) . (X +Z) 17.Write the equivalent boolean expression for the following logic circuit:
18. State and prove DeMorgan’s laws in booleanalgebra. 19. Write the equivalent boolean expression for the following logic circuit:
20. Write the equivalent boolean expression for the following logic circuit:
21. Verify the following algebraically: X’.Y + X . Y’ = (X’ + Y’) . (X + Y) 22. Verify the following algebraically: (A’ + B’) . (A + B) = A’.B + A . B’ 23. Write the equivalent boolean expression for the following logic circuit: 24. Write the equivalent boolean expression for the following logic circuit:
25.
Verify X’.Y + X . Y’ + X’.Y’ = (X’ + Y’) using truth table.
26. Write the equivalent boolean expression for the following logic circuit:
27. Represent (P + Q’. R) in POS form. 28. State the verify absorption law in boolean algebra. 29. Convert the following boolean expression into its equivalent canonical Sum of Product (SOP) form: (X’+Y + Z’).(X’+Y + Z).(X’+Y’+Z).(X’+Y’+Z’) 30. Convert the following boolean expression into the equivalent canonical product of Sum (POS) form. A. B’ .C + A’ .B.C + A’.B.C’ 31. State and verify distributive law in boolean algebra. 32. Convert the following boolean expression into its equivalent canonical Sum of Product (SOP): (u’ + v + w’).(u + v’ + w’).(u + v + w)
33.
Given the following truth table, write the sum of products from of the function F (x, y, z):
x y z F 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 34. Prove the algebraically x’ y ‘ z’ + x’ y’ z + x’ yz’ +x’yz’ + xy’z’ + xy’z = x’ + y’. 35. Convert X + Y to minterms 36. Convert the following three input F denoted by the expression F= ∑(0, 1, 2, 5) into its canonical Sumof-Products form. 37. Simplify ABCD + ABCD + ABCD + ABCD. 38. Provide that X. (X + Y) = X by algebraic method. 39.Verify X . Y’ + Y’ .Z = X. Y’ .Z’ + X .Y’ .Z’ + X’ .Y’ .Z algebraically. 40. Perform the following: (a) State and prove the De Morgan’s Theorem (Any One) Algebraically. 41. State and prove the absorption algebraically. 42. Given the following truth table, derive a Sum of Product (SOP) and Product of Sum (POS) form of Boolean expression from it: X Y Z G (X, Y ,Z) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 43.
Given 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 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 0
44. Represent the Boolean expression X. Y’ + Z with the help of NOR gates only. 45. Represent the Boolean expression (X + Y’) .Z with the help of NAND gates only. 3 Marks Questions
1. Obtain the minimal form for the following boolean expression using Karnaugh’s Map: F(A, B, C, D) = ∑(1, 4, 5, 9, 11, 12, 13, 15) 2. 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) 3. Obtain a simplified form for the following boolean expression using Karnaugh’s Map: F(P, Q, R, S) = ∑(0, 2, 4, 5, 6, 7, 8, 10, 13, 15) 4. Obtain the minimal form for the following boolean expression using Karnaugh’s Map: H(P, Q, R, S) = ∑(0, 1, 2, 3, 5, 7, 8, 9, 10, 14, 15) 5. Obtain the minimal form for the following boolean expression using Karnaugh’s Map: F(U, V, W, Z) = ∑(0, 1, 2, 3, 6, 7, 8, 9, 10, 13, 15) 6. Reduce the following boolean expression using K-map: F(P, Q, R, S) = ∑(1, 2, 3, 4, 5, 6, 7, 8, 10) 7. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(2, 3, 4, 5, 6, 7, 8, 10, 11) 8. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(0, 1, 2, 4, 5, 6, 8, 10,) 9. Reduce the following boolean expression using K-map: F(P, Q, R, S) = ∑(0, 1, 2, 4, 5, 6, 8, 12) 10. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(3, 4, 5, 6, 7, 13, 15) 11. Reduce the following boolean expression using K-map: F(u, v, w, z) = ∑(3, 5, 7, 10, 11, 13, 15) 12. Reduce the following boolean expression using K-map: F(P, Q, R, S) = ∑(1, 2, 3, 5, 6, 7, 9, 11, 12, 13, 15) 13. Reduce the following boolean expression using K-map: H(u, v, w, z) = ∑(0, 1, 4, 5, 6, 7, 11, 12, 13, 14, 15) 14. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(0, 1, 2, 3, 6, 7, 8, 11, 14, 15) 15. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(0,2, 3, 4, 6, 7, 8, 10, 12,) 16. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(0, 1, 2, 4, 5, 8, 9, 10, 11,)
17. Reduce the following boolean expression using K-map: F(A, B, C, D) = ∑(1, 3, 4, 5, 7, 9, 11, 12, 13, 14) 18. If F(a, b, c, d) = ∑ (0, 2, 4, 5, 7, 8, 10, 12, 13, 15), obtain the simplified form using K-Map. 19. What is the simplified Boolean equation for the following K-map.
20. Minimise the following function using a Karnaugh map. F (W, X, Y, Z) = ∑(0, 4, 8, 12). 21. Obtain the simplified form a Boolean expression: F (u, v, w, z) = ∑(0, 1, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15) usingKarnaugh Map. 22. Obtain a simplified form for a Boolean expression F (x, y, z, w) = ∑(0, 1, 3, 4, 5, 6, 7, 9, 10, 11,13, 15) usingKarnaugh Map. BOOLEAN ALGEBRA-SOLUTION 1 MARK QUESTIONS 1. P 0 0 0 0 1 1 1 1
Q 0 0 1 1 0 0 1 1
R 0 1 0 1 0 1 0 1
F 1 0 0 1 0 0 1 1
Minterm P’Q’R’ P’Q’R P’Q R’ P’Q R P Q’R’ P Q’R P O R’ PQR
Sum of Product form of function F(P, Q, R) is F(P,Q, R) = P’Q’R’+P’QR +PQ R’+P Q R 2. X 0
Y 0
Z 0
F 1
Maxterm X+Y+Z
0 0 0 1 1 1 1
0 1 1 0 0 1 1
1 0 1 0 1 0 1
0 0 1 0 0 1 1
X + Y + Z’ X + Y’+ Z X + Y’+ Z’ X’ + Y + Z X’ + Y+ Z’ X’ + Y’+ Z X’ + Y’+ Z’
So, F = (X + Y + Z’). (X + Y’ + Z). (X’ + Y + Z).(X’ + Y + Z’). 3. U 0 0 0 0 1 1 1 1
V 0 0 1 1 0 0 1 1
W 0 1 0 1 0 1 0 1
G 1 0 1 0 1 0 0 1
Maxterm U + V +W U + V + W’ U + V’+ W U + V’+ W’ U’ + V + W U’ + V+ W’ U’ + V’+ W U’ + V’+ W’
To get the Product of Sum form, we need to product maxterms for all those input combinations that product output as 0. Thus, G(U, V, W) = (U + V + W’). (U + V’ + W’). (U’ + V + W’). (U’ + V’ + W) 4.
U 0 0 0 0 1 1 1 1
V 0 0 1 1 0 0 1 1
W 0 1 0 1 0 1 0 1
G 0 1 0 1 1 0 1 0
Maxterm U + V +W U + V + W’ U + V’+ W U + V’+ W’ U’ + V + W U’ + V+ W’ U’ + V’+ W U’ + V’+ W’
To get the Product of Sum (POS) form, we need to product maxterms for all those input combinations that produce output as 0. Thus, G(U, V, W) = (U + V + W).(U + V + W). (U + V + W). (U + V + W) 5. A
B
C
F
0 0 0 0 1
0 0 1 1 0
0 1 0 1 0
Minterm 0 A’BC’ 0 A’B’C 1 A’BC’ 1 A’BC 1 AB’C’
1 1 1
0 1 1
1 0 1
0 0 1
AB’C ABC’ ABC
To get the SOP form, we need to sum minterms for all those input combinations that produce output as 1. Thus, F(A,B,C) = A’BC’+A’BC + AB’C+ABC 6.
A
B
C
G
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
0 1 1 0 0 0 1 1
Maxterm A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C
To get the Product of Sum (POS) form, we need to product maxterms for all those input combinations that produce output as 0. Thus, G (A,B,C) = (A + B + C). (A + B + C) .(A + B + C).(A + B + C) 7.
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
F 1 0 1 0 1 0 0 1
Minterm X+Y+Z X+Y+Z X + Y+ Z X+Y+Z X+Y+Z X + Y+ Z X + Y+ Z X + Y+ Z
To get the SOP form, we need to sum minterms for all those input combinations that produce outputs as 1. Thus, F(X, Y, Z) = (X. Y. Z) + (X. Y. Z) + (X. YZ) + (X. Y. Z) 8. A
B
C
F
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
0 1 1 0 1 0 0 1
Maxterm A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C
To get the POS form, we need to product maxterms for all those input combinations that produce output as 0. Thus, F(A, B, C) = (A + B + C). (A + B + C).(A + B + C). (A + B + C) 9.
A
B
C
F
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
1 0 0 1 0 0 1 1
Minterm A .B .C A .B .C A .B .C A .B .C A .B .C A .B .C A .B .C A .B .C
To get the SOP form, we need to sum minterms for all those input combinations that produce output as 1. Thus, F(A, B, C) = (A .B . C) + (A . B. C)+ (A .B . C) + (A .B . C) 10. X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
F(X, Y,Z) 1 1 0 1 1 0 0 1
Minterm X+Y+Z X+Y+Z X + Y+ Z X+Y+Z X+Y+Z X + Y+ Z X + Y+ Z X + Y+ Z
To get the SOP form, we need to sum minterms for all those input combinations that produce output as 1. Thus, F(X, Y, Z) = (X. Y. Z) + (X. Y. Z) + (X. Y. Z)+ (X. Y Z) + (X. Y. Z) 11.
X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
H 1 0 1 1 1 0 0 1
Maxterm X+Y+Z X+Y+Z X + Y+ Z X+Y+Z X+Y+Z X + Y+ Z X + Y+ Z X + Y+ Z
To get the POS form, we need to maxterms for all those input combinations that produce output as 0. Thus,
H(X, Y, Z) = (X + Y + Z) .(X + Y + Z).(X + Y + Z) 12.
P 0 0 0 0 1 1 1 1
Q 0 0 1 1 0 0 1 1
R 0 1 0 1 0 1 0 1
GMinterm 0 P .Q . R 0 P .Q . R 1 P .Q . R 1 P .Q . R 1 P .Q . R 0 P .Q . R 1 P .Q . R 1 P .Q . R
To get the SOP form, we need to sum minterms for all those combinations that produce output as 1. Thus, G(P, Q, R) = (P .Q .R) + (P .Q.R)+ (P .Q . R) + (P .Q. R)+ (P .Q. R) 13.
A
B
C
H
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
0 1 1 1 1 0 0 1
Maxterm A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C A+B+C
To get the POS from, we need to product maxterms for all those input combinations that produce output as 0. Thus, H(A, B, C) = (A + B + C). (A + B + C) .(A + B + C). 14.
u 0 0 0 0 1 1 1 1
v 0 0 1 1 0 0 1 1
w 0 1 0 1 0 1 0 1
GMaxterm 1 u + v +w 1 u+v+w 0 u + v+ w 0 u + v+ w 1 u+v+w 1 u + v+ w 0 u + v+ w 1 u + v+ w
To get the POS form, we need to product maxterms for all those input combinations that produce output as 0. Thus,
G(u, v, w)= (u + v + w).(u + v + w). (u + v + w) ).(u + v + w)
15.
16.
17.
18. X 0 0 1 1
Y 0 1 0 1
X+Y 0 1 1 1
X. (X + Y) 0 0 1 1
From the above table it is obvious that X . (X + Y) = X because both the columns are identical. 19.
20.
(AB’ +CD’) = (AB’)’ . (C’D’)’ (De Morgan’s first theorem) = (A’ + B’’) . (C’’ + D’’) (De Morgan’s second theorem i.e. A.B = A + B) = (A’ + B) .(C + D) (X’’ = X) As the expression X + XY is a two variable expression, so we require possible combinations of values of X, Y. Truth Table will be as follows: X 0 0 1 1
21.
Y 0 1 0 1
X+Y 0 0 0 1
X. (X + Y) 0 0 1 1
Comparing the columns X + XY and X, we find, contents of both the columns are identical, hence verified. As it is a 2 variable expression, truth table will be as follows: X
Y
X+Y
(X + Y)’
X’
Y’
X’Y’
0
0 0 1 1
0 1 0 1
1 1 1
1 0 0 0
1 1 0 0
1 0 1 0
1 0 0 0
Comparing the columns (X + Y)’and X’Y’, both of the columns are identical, hence verified. 22.
Using duality principle, dual of X . X’ = 0 is X + X’ = 1 (By changing (.) to (+) and viceversa and by replacing 1’s by 0’s and vice versa).
23.
(a) A Minterm is a product of all the literals (with or without the bar) within the logic system. (b) A Maxterm is a sum of all the literals (with or without the bar) within the logic system. (c) Aboolean expression composed entirely either of minterms or Maxterms is referred to as canonical expression.
24.
F = AB + CD
25.
F =(W + X) (Y + Z).
26.
Dual of the Boolean expression A + B’ .C is A .(B’ + C).
27. 28.
Dual of the Boolean expression (B’ + C) . A is (B’ .C) + A. The given expression may also be written as
29.
De Morgan’s first theorem. It states that De Morgan’s second theorem. It states that
30.
NAND and NOR gates are less expensive and easier to design. Also, other switching functions and (AND, OR) can easily be implemented using NAND/NOR gates. Thus, these (NAND/NOR) gates are also referred to as Universal Gates.
X+Y=X.Y X.Y= X+Y
2 1.
Marks Questions A + B.C =(A+B).(A+C) The above stated law is called distributive law. A B C B.C A+B.C A+B A+C(A+B).(A+C) 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 Since, the column 5 and column 8 are equal. Hence, the given law A+B.C = (A + B).(A + C) is verified.
2.
So, the obtained boolean expression is F= XY + (W + Z) 3.
4.
5.
So, the obtained boolean expression is F = AB + (C + D) X + Z = X + X’.Z + Y. Z RHS = X + X’ .Z + Y.Z = (X + X’). (X + Z) + Y. Z = 1.(X + Z) + Y.Z = X + Z + Y. Z = X + Z(1+Y) =X+Z = LHS A + C = A + A’.C + B.C RHS = A + A’ .C + B.C = (A + A’). (A + C) + B.C = 1.(A + C) + B.C = A + C + B. C
(by using distributive law) (by using X + X’ = 1)
(by using absorption law) Hence proved
(by using distributive law) (by using A + A’ = 1)
= A + C. (1+B) =A+C = LHS
(by using absorption law) Hence proved
6.
So, the obtained boolean expression is F= (X’ + Y) + Y. Z’ 7.
DeMorgan’s Laws: It states that (i) (A + B) = A.B (ii) (A. B) = A + B Truth table for A + B = A .B A 0 0 1 1
8.
B 0 1 0 1
A+B (A+B) 0 1 1 0 1 0 1 0
A 1 1 0 0
B 1 0 1 0
A.B 1 0 0 0
Column 4 and Column 7 are equal, first law is proved. F= A . B’ + (C + B’) . A’
9.
So, the obtained boolean expression is F = P’Q + (Q + R’)
10. X
(i) X + 0 = X 0 0 0
0 1
(ii) X + X’ = 1 X X’ 0 1 1 0
X+0 0 1
So, X + 0 + X
X + X’ 1 1
As X + X’ = 1. Hence proved.
11.
So, the obtained boolean expression if F= (u + v).(u + w) 12. (i) X.X’ = 0 X 0 1
X’ X.X’ 1 0
(ii) X + 1 = 1 X 1 X+1 0 1 1 1
0 0
As X. X’ = 0. Hence proved.
1 1
As X + 1 =1.Hence proved.
13.
So, the obtained boolean expression is Y = (u, v) + (u . w) 14.
u .(u’+ v) =u +v u 0 0 1 1
v 0 1 0 1
u’ 1 1 0 0
u’+ v u + v u.(u’ + v) 1 0 0 1 1 0 0 1 0 1 1 1
As u.(u’ + v) and u + v columns are not equal. Hence, terms on RHS and LHS are not equal.
Hence,
u .(u’ + v) # u + v
15.
So, the obtained boolean expression isF= (X + Y). (X + Z)
16.
X + Y.Z= (X + Y). (X + Z) X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
YZ 0 0 0 1 0 0 0 1
X + YZ X + Y X + Z 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
(X + Y).(X + Z) 0 0 0 1 1 1 1 1
As columns X + Y .Z and (X + Y). (X + Z) are equal. So, X + Y.Z = (X +Y). (X +Z).Hence proved. 17.
So, the obtained boolean expression isF= (P. Q) + (P. R) 18.
DeMorgan’s Laws The two DeMorgan’sthrorems are: (i) XY = X + Y This theorem states, that the complement of a product is equal to sum of complements, i.e. complement of two or more variables used in AND gate is the same as the OR gate of the complement of each individual variables. Truth Table X Y X Y XYXYX + Y
0 0 1 1
0 1 0 1
1 1 0 0
1 0 1 0
0 0 0 1
1 1 1 0
1 1 1 0
XY = X + Y . Hence approved (ii) X+ Y = X .Y This theorem states, that the complement of sum of equal to product of complements, i.e. complement of two or more variables used in OR gate is the same as the AND gate of the complements of each individual variables.
X 0 0 1 1
Y 0 1 0 1
Truth Table X+Y X 0 1 1 1 1 0 1 0
Y 1 0 1 0
X+Y 1 0 0 0
X.Y 1 0 0 0
X + Y = X .Y. Hence proved. 19.
So, the obtained Boolean expression is F = (A .B) + (B .C) 20.
So, the obtained Boolean expression is F= (P . Q) + (P . R) 21.
X’.Y + X.Y’ = (X’ + Y’) . (X + Y) Taking RHS (X’ + Y’) . (X + Y) = X’ X + X’ Y + Y’ X + Y’ Y = 0 + X’ Y + Y’ X + 0
[X.X' = 0]
22.
= X’Y + X . Y’ = RHS
[X.Y’ = Y’.X] Hence proved
(A’ + B’) .(A + B) = A’B + AB’ LHS (A’ + B’) .(A + B) =A’.A + A’B + B’A + B’B = 0 + A’B + B’A + 0 = A’B + AB’ = RHS
[as A’.A = 0] [as A.B’ = B’.A] Hence proved
23.
So, the obtained Boolean expression is F = (P + Q).(Q+R) 24. So, the obtained Boolean expression is F = (u + v) (v + w)
So, the obtained Boolean expression F= (u + v) .(v + w) 25.
X’Y +XY’ +X’Y’ + X’ + Y’ X 0 0 1 1
Y 0 1 0 1
As columns So,
X’ 1 1 0 1
Y’X’Y 1 0 1 0
XY’ 0 1 0 0
X’Y’ 0 0 1 0
X’Y + XY’ + X’Y’ 1 1 0 1 0 1 0 0
X’ + Y’ 1 1 1 0
X’Y +XY’ +X’Y’ + X’ + Y’ and X’ + Y’ are equal. X’Y +XY’ +X’Y’ = X’ + Y’ Hence proved
26.
So, the obtained Boolean expression is F = (X + Y).(X + Z)
27.
28.
P 0 0 0 0 1 1 1 1
Q 0 0 1 1 0 0 1 1
R 0 1 0 1 0 1 0 1
Q’Q’R 1 1 0 0 1 1 0 0
P + Q’RMaxterm 0 0 1 1 0 0 0 0 0 1 1 1 0 1 0 1
P+Q+R P + Q + R’ P + Q’+ R P + Q’ + R’ P’ + Q + R P + Q + R’ P + Q’+ R P + Q’ + R’
The POS form of P + Q’R will be (P + Q + R).(P + Q’ + R).(P + Q’ + R’) Absorption law states (i) X + XY = X (ii) X (X + Y) = X Truth table for X + XY = X X Y XY X + XY 0 0 0 0 0 1 0 0 1 0 0 1 1 1 1 1 Hence, columns 1 and 4 are equal. As X + XY = X Truth table for X (X + Y) = X X Y X+Y X(X + Y) 0 0 0 0 0 1 1 0 1 0 1 1 1 1 1 1 Hence, columns 1 and 4 are equal. As X (X + Y) = X
29.
F= (X’ + Y + Z’).(X’ + Y + Z) .(X’ + Y’ + Z) .(X’ + Y’ + Z’) = (10 1). (100). (110). (111) = M5 .M4 .M6 . M7 = ∏ (4, 5, 6, 7) Thus, equivalent SOP expression will be (incorporating the missing terms from POS expression) = ∑ (0, 1, 2, 3)
i.e.
m0 + m1 + m2 +m3 = (X. Y. Z) +(X. Y. Z) +(X. Y. Z) +(X. Y. Z)
30.
A.B’.C + A’.B. C + A’.B C’ i.e. (1 0 1) (0 1 1) (0 1 0) = m5 + m3 +m2=∑(2, 3, 5) POS is equal to = ∏(0, 1, 4, 6, 7) = M0 .M1 .M4. M6.M7 = (A + B + C). (A + B + C) .(A + B + C). (A + B + C) .(A + B + C).
31.
Distributive law states (i) X (Y + Z) = XY + XZ and (ii) X + YZ = (X + Y) (X + Z) Truth table for X (Y + Z) = XY + XZ X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
Y + Z X.(Y + Z) 0 0 1 0 1 0 1 0 0 0 1 1 1 1 1 1
XY 0 0 0 0 0 0 1 1
As columns X .(Y + Z) and XY + XZ are equal. As X .(Y + Z) = XY + XZ Truth table for X + YZ) = (X + Y) + (X + Z) X 0 0 0 0 1 1 1 1
Y 0 0 1 1 0 0 1 1
Z 0 1 0 1 0 1 0 1
YZ X + YZ 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1
(u’ + v + w’) .(u + v’ + w’) .(u + v + w)
XY + XZ 0 0 0 0 0 1 1 1
Hence proved
X+Y
As columns (X + YZ) and (X + Y) + (X + Z) are equal. As X + YZ = (X + Y) (X + Z) 32.
XZ 0 0 0 0 0 1 0 1
0 0 1 1 1 1 1 1
X + Z(X + Y)(X + Z) 0 1 0 1 1 1 1 1
0 0 0 1 1 1 1 1
Hence proved
33. 34.
35.
36.
37.
38.
39.
= (1 0 1) .(0 1 1) . (0 0 0) = M5 .M3 .M0 =∏(0, 3, 5) So, SOP expression will be = ∑(1, 2, 4, 6, 7) = (u’ .v’ .w) + (u’ .v .w’) + (u . v’ .w’) + (u .v .w’) + (u .v .w) x y z + x y z + x y z + xyz x’ y ‘ z’ + x’ y’ z + x’ yz’ + x’yz’ + xy’z’ + xy’z = x’ + y’ L.H.S. = x’y’ (z’ + z) + x’y (z + z’) +xy’ (z’ + z) = x’y’ + x’y + xy’ (z’ + z = 1, z + z’ = 1) = x’ (y’ + y) + xy’ = x’ + xy’ (y’ + y = 1) = x’ + (x’ )’ y’ (x = (x’ )’) = x’ + y’ (a + a’b = a + b As x’ + xy’ = x’ + y’) = R.H.S. Hence proved. X + Y = X .1 +Y .1 = X . (Y + Y) + Y(X + X) (X + X = 1 complementarity law) = XY + XY + XY + XY = XY + XY + XY + XY = XY + XY + XY (XY + XY + XY Idempotent law) If three inputs we take as X, Y and Z then F= m0 + m1 + m2 + m5 m0= 000X Y Z m1 = 001 XYZ m2 = 010 XYZ m5 = 101 XYZ Canonical S-O-P form of the expression is XYZ+XYZ+XYZ+XYZ ABCD + ABCD + ABCD + ABCD = ABC(D + D) + ABC(D + D) = ABC .1 + ABC .1 (D + D = 1) = AC(B + B) = AC .1 = AC (B + B = 1) L.H.S = X . (X + Y) =X.X+X.Y = X + X .Y = X . (1 + Y) = X .1 = X = R.H.S = X .1 = X = R.H.S 32.
LHS = X .Y’ + Y’ . Z = X . Y’ (Z + Z’) + (X + X’) Y’ . Z = XY’ Z + XY’Z + XY’Z + X’Y’Z
(X . X = X) (1 + Y = 1)
(Z + Z’ = 1 and X + X’ = 1)
40.
41.
42.
43. 44.
= XY’Z + XY’Z + X’Y’Z = RHS, Hence Proved. (a) DeMorgan’s Theorem’s state that (i) X + Y = X . Y (ii) X . Y = X + Y Proof.Assuming that DeMorgan’s laws are true. That means, all Boolean laws should hold on it. Let X+Y=P As from given theorem (i), we get Q=X.Y Since Boolean laws on hold on it, complementarity law should also hold on it. P + P = 1 and P . P = 0 P+P=1 Replacing value of P, we get P+X.Y+1 LHS = (P + X) (P + Y) Replacing value of P, we get ( X + Y + X) (X + Y + Y) = (X + X + Y) (X + 1) = (1 + Y) (X + 1) (X + X = Y + Y = 1) =1.1 (1 + Y = 1 + X = 1) = 1 = RHS Similarly, replacing P and P in P .P = 0, we get (X + Y) X . Y = 0 LHS = XXY + YXY =0+0 (XX = 0, YY = 0) = 0 = RHS. Thus, complementarity law fully holds on it. DeMorgan theorem is a legal Boolean algebra theorem. Absorption law states that (i) X + XY = X and (ii) X (X + Y) = X Proof. (i) X + XY = X LHS + XY = X (1 + Y) =X.1 = X = RHS Hence Proved. In SOP F = ∑(1, 2, 5, 7) = X YZ + XYZ + XYZ + XYZ In POS F = ∏(0, 3, 4, 6) = (X + Y + Z) (X + Y + Z) (X + Y + Z) (X + Y + Z) SOP : F = A B C + A B C + ABC + ABC + ABC POS : F = (A + B + C) (A + B + C) (A + B + C) X . Y’ + Z = Z + XY’
[1 + Y = 1]
[X + Y = Y + X]
= (Z + X) (Z + Y’)
45
. (X + Y’) . Z =X . Z + Y’ . Z
[X + YZ = (X + Y) (X + Z)]
3 Marks Questions 1. F(A, B, C, D) = ∑(1, 4, 5, 9, 11, 12, 13, 15)
There are 3 Quads: Quad 1 (m1 + m5 +m9 + m13) reduces to C’D Quad 2 (m4 + m5 +m12+ m13) reduces to BC’ Quad 3 (m9 + m11 +m13 + m15) reduces to AD Hence, the final expression is: F(A, B, C) = C’D + BC’ + AD 2. F(A, B, C, D) = ∑(1, 3, 4, 5, 6, 7, 12, 13)
There are 3 Quads: Quad 1 (m1 + m3 +m5+ m7) reduces to A’D Quad 2 (m4 + m5 +m6+ m7) reduces to A’B Quad 3 (m4 + m5 +m12+ m13) reduces to BC’ Hence, the final expression is: F(A, B, C,D) = A’D + A’B + B C’
3. F(P, Q, R, S) = ∑(0, 2, 4, 5, 6, 7, 8,10, 13, 15)
There are three Quads: Quad 1 (m4 + m5 +m6+ m7) reduces to PQ Quad 2 (m5 + m7 +m13+ m15) reduces to QS Quad 3 (m0 + m2 +m8+ m10) reduces to QS Hence, the final expression is: F(P, Q, R, S) = PQ + QS +QS 4. H(P, Q, R, S) = ∑(0, 1, 2, 3, 5, 7, 8, 9, 10, 14, 15)
There are three Quads and 1 Pair: Quad 1 (m0 + m2 +m8 + m10) reduces to QS Quad 2 (m1 + m3 +m5+ m7) reduces to PS Quad 3 (m0 + m1 +m8 + m9) reduces to QR Pair 1 (m14 + m15) reduces to PQR Hence, the final expression is: H(P,Q,R,S) = Q’ S’ + P’ S + Q’ R’ + PQR 5. F(U,V, W, Z) = ∑(0, 1, 2, 3, 6, 7, 8, 9, 10, 13, 15)
There are three Quads and 1 Pair: Quad 1 (m0 + m2 +m8 + m10) reduces to V Z Quad 2 (m0 + m1 +m8+ m9) reduces to V W Quad 3 (m2 + m3 +m6+ m7) reduces to U W Pair 1 (m13+ m15) reduces to UVZ Hence, the final expression is: F(U,V,W,Z)= V’ Z’ + V’ W’ + U’ W +UVZ 6. F(P, Q, R, S) = ∑ (1, 2, 3, 4, 5, 6, 7, 8, 10)
There are three Quads and 1 Pair: Quad 1 (m1 + m3 +m5 + m7) reduces to P’S Quad 2 (m4 + m5 +m6+ m7) reduces to P’Q Quad 3 (m2 + m3 +m6+ m7) reduces to P’R Pair 1 (m8+ m10) reduces to PQ’S’ Hence, the final expression is: F(P,Q,R,S) = P’S + P’Q + P’R + PQ’S’ 7. F(A, B, C, D) = ∑ (1, 3, 4, 5, 6, 7, 12, 13)
There are 2 Quads and 1 Pair: Quad 1 (m4 + m5 +m6 + m7) reduces to AB Quad 2 (m2 + m3 +m10 + m11) reduces to B C Pair 1 (m8 + m10) reduces to ABD Hence, the final expression is: F(A, B, C,D) = AB +BC + ABD 8. F(A, B, C, D) = ∑ (1, 2, 4, 5, 6, 8, 10)
There are 3 Quads: Quad 1 (m0 + m1 +m4 + m5) reduces to A’C’ Quad 2 (m0 + m2 +m8 + m10) reduces to B’ D’ Quad 3 (m0 + m2 +m4+ m6) reduces to A’ D’ Hence, the final expression is: F(A, B, C,D) = A’C’ +B’ D’ + A’ D’ 9. F(P, Q, R, S) = ∑ (1, 2, 4, 5, 6, 8, 10, 12)
There are 3 Quads: Quad 1 (m0 + m4 +m8+ m12) reduces R S Quad 2 (m0 + m1 +m4+ m5) reduces P R Quad 3 (m0 + m2 +m4+ m6) reducesS P Hence, the final expression is: F(P, Q, R, S) = RS + P R + S P 10. F(A, B, C, D) = ∑ (3, 4, 5, 6, 7, 13, 15)
There are 2 Quads and 1 Pair: Quad 1 (m4 + m5 +m6 + m7) reduces to AB Quad 2 (m5 + m7 +m13+ m15) reduces to BD Pair 1 (m3 + m7) reduces to ACD Hence, the final expression is: F(A, B, C,D) = AB +BD + ACD 11. F(u, v, w, z) = ∑ (3, 5, 7, 10, 11, 13, 15)
There are 2 Quads and 1 Pair: Quad 1 (m3 + m7 +m11+ m15) reduces to wz Quad 2 (m5 + m7 +m13 + m15) reduces to vz Pair 1 (m10 + m11) reduces to u v w Hence, the final expression is: F(u, v, w,z) = w z + v z + u v w 12. F(P, Q, R, S) = ∑ (1, 2, 3, 5, 6, 7, 9, 11, 12, 13, 15)
There are 1 Octet, 1 Quad and 1 Pair: Octet 1 (m1 + m3 +m5 + m7 + m9 + m11 +m13 + m15 ) reduces to S Octet 1 (m3 + m2 +m6 + m7) reduces to P R Pair 1 (m12 + m13) reduces to PQR Hence, the final expression is: F(P, Q, R, S) = S + P R + PQR 13. H
(u, v, w, z) = ∑ (0, 1, 4, 5, 6, 7, 11, 12, 13, 14, 15)
There are 1 Octet, 1 Quad and 1 Pair: Octet 1 (m4 + m5 +m6+ m7 + m12 + m13 +m14+ m15 ) reduces to v Octet 1 (m0 + m1 +m4+ m5) reduces to u w Pair 1 (m11+ m15) reduces to u w z Hence, the final expression is: H(u, v, w, z) = v + u w + u w z 14. F(A, B, C, D) = ∑ (0, 1, 2, 3, 6, 7, 8, 11, 14, 15)
There are 3 Quads and 1 Pair: Quad 1 (m0 + m1 +m2+ m3) reduces to AB Quad 2 (m3 + m7 +m11+ m15) reduces to CD Quad 3 (m6 + m7 +m14+ m15) reduces to BC Pair 1 (m0+ m8) reduces to BCD Hence, the final expression is: F(A, B, C,D) = B’C’ D’ + A’ B’ + CD + BC 15. F(A, B, C, D) = ∑ (0, 2,3, 4, 6, 7, 8, 10, 12)
There are 3 Quads: Quad 1 (m0 + m4 +m8 + m12) reduces to CD Quad 2 (m2 + m3 +m6 + m7) reduces to AC Quad 3 (m0 + m2 +m 8 + m10) reduces to BD Hence, the final expression is: F(A, B, C,D) = CD + AC + BD 16. F (A, B, C, D) = ∑ (0, 1, 2, 4, 5, 8, 9, 10, 11)
There are 3 Quads: Quad 1 (m0 + m1 +m4+ m5) reduces to AC Quad 2 (m0 + m2 +m8+ m10) reduces to BD Quad 3 (m8 + m9 +m10+ m11) reduces to A B Hence, the final expression is: F(A, B, C,D) = AC + BD + AB 17. F (A, B, C, D) = ∑ (1, ,3, 4, 5,7, 9,11, 12, 13, 14)
There are 3 Quads and 1 Pair: Quad 1 (m1 + m3 +m5+ m7) reduces to A D Quad 2 (m1 + m3 +m9+ m11) reduces to B D Quad 3 (m4 + m5 +m 12+ m13) reduces to BC Pair 1 (m12 + m14) reduces to ABD Hence, the final expression is: F(A, B, C,D) = AD’ + BD + BC +ABD 18.
Three non-redundant groups in the K-map Quad 1 (m0 + m4 + m8 + m12) reduces to cd Quad 2 (m5 + m7 + m13 + m15) reduces to bd Pair 1 (m2 + m10) reduces to b c d. Hence the final reduced expression is F= c d + bd + b c d 19. Completing the Karnaugh map by entering 0’s in the empty squares with their minterm’s subscripts and then by encircling all possible groups, we get the following K-map.
3 Quads and a pair is marked: Quad 1 (m12 + m13 + m14 + m15) reduces to ab Quad 2 (m9 + m11 + m13 + m15) reduces to ad Quad 3 (m10 + m11 + m14 + m15) reduces to ac Pair 1 (m2 + m10) reduces to b c d. Hence the final reduced expression is F= ab + ad + ac + bcd 20. Given function F(W, X, Y, Z) = ∑(0, 4, 8, 12) = m0 + m4 + m8 + m12 m0 = 0000 = W X Y Z; m4 = 0100 = W X Y Z m0 = 1000 = W X Y Z; m12 = 1100 = W X Y Z Mapping the given function on a K-map, we get
Only 1 group is here, a Quad (m0 + m4 + m12 + m8) Reduced expression for this quad is Y Z thus, final reduced expression is F = Y Z. 21. There are 4 gps: 1 octet, 2 Quads and 1 pair Octet (m1 + m3 + m5 + m7 + m9 + m11 + m13 + m15) reduces to z. Quad 1 (m12 + m13+ m14 + m15) reduces to uv. Quad 2 (m10 + m11 + m14 + m15) reduces to uw. Pair (m0 + m1) reduces to u v w The final reduced expression is u v w + uv + uw + z
22.
There are 4 groups: 1 octet, 2 Quads and 1 pair. The octet (m1 + m3 + m5 + m7 + m9 + m11 + m13 + m15) reduces to w. The quad 1 (m0 + m1 + m4 + m5) reduces to x z The quad 2 (m4 + m5 + m6+ m7) reduces to x y. The pair (m0 + m11) reduces to x y z The final reduced expression is F(x, y, z, w) w + x z + x y + x y z
COMMUNICATION AND NETWORK CONCEPTS 1 mark Questions 1. Define a network. 2. Define the following terms: (i) Node (ii) Workstation 3. Define the following terms: (i) server (ii) NIU 4. What are the uses of microwave signals? 5. Define the following: (i) Data channel 6. Define the following: (i) Baud 7. Define the following (i) Bandwidth 8. What is a Gateway?
9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44.
45. 46. 47. 48.
What do you by a backbone network? What do you understand by GSM? What is CDMA? What is WLL? What are 3G and EDGE technologies? Define the following: (i) Hub (ii) Switch. What is RJ-45 connector? What are cookies? What is Telnet? Give the full form for the following: (i) Modem (ii) FTP What are repeaters? What are routers? What is the purpose of using FTP? What is URL? What is HTML. What is DHTML. What is XML? What is difference between HTML and XML? What is firewall? What are cookies? Who are hackers? Who are crackers. What do you understand by Cyber Law? What are non-dedicated servers? What is dedicatedserver? What is 80-20 rule of network design? Which of the following is not a broadcast device? Write the characteristics each for 2G and 3G mobile technologies. What is the difference between the video conferencing and Chat? Expand the following: (i) GPRS Write the two characteristics of Wi-Fi. What is the difference between e-mail and chat? Which type of network(out of LAN, PAN and MAN) is formed, why you connect two mobiles using Bluetooth to transfer a picture file? Write names of any two popular open source software, which are used as operating. Write any two important characteristics of cloud computing. Write two advantages of using open source software over proprietary software. Which of the following crime(s) does not come under cybercrime? (i) Copying some important data from a computer without taking permission from the owner of the data. (ii) Stealing keyboard and mouse from a shop. (iii) Getting into unknown person’s social networking account and start messaging on his behalf. What is the difference between HTTP and FTP? What is the difference between domain name and IP address? Write two advantages of using an optical fibre cable over an Ethernet cable to connect two service stations, which are 190 m away from each other. Write two advantages of using proprietary software over open source software.
49. What is the difference between packet switching and circuit switching techniques? 50. (i) Expand the following abbreviations: (a) HTTP (b) VolP 51. Name one commonly used open source Internet browser and one commonly used open source operating system. 52. Which of the following crime(s) is/are covered under cybercrime? (i) Stealing brand new hard disk from a shop. (ii) Getting into unknown person’s social networking account and start messaging on his behalf. (iii) Copying some important data from a computer without taking permission from the owner of the data. 53. What out of the following, you will use to have an audio visual chat with an expert sitting in a far away place to fix-up technical issue? (i) e-mail (ii) VoIP (iv) FTP 54. Name the client side scripting language and one server side scripting language. 55. Which out of the following does not come under cyber crime? (i) Stealing a mouse from someone’s computer. (ii) Operating someone’s Internet banking account without his knowledge. (iv) Entering in someone’s computer remotely and copying data, without seeking his permission. 56. Write one advantage of star topology of network? Also, illustrate how 5 computers can be connected with each other using star topology of network. 57. Give one suitable example of each URL and Domain name. 58. Name the two open source software along with its application. 59. Which of the following come under cyber crime? (i) Operating someone’s Internet banking account, without his knowledge. (ii) Stealing a keyboard from someone’s computer. (iii) Working on someone’s computer his/her permission. 60. Write one advantage of bus of network. Also, illustrate how four computers can be connected with each other using star topology of network. 61. Name two proprietary software along with their application. 62. Message switching technique in network communication. 63. Differentiate between bus and star topology of networks. 64. Out of the following identity client side script(s) and server side scripts(s). (i) ASP (ii) Java script (iii) VB script (iv) JSP 67. In networking, what is WAN? How is it different from LAN? 68. Differentiate between XML and HTML. 69. What is web 2.0? 70. What is the function of modem? 71. Name any two components required for networking? 72. What are repeaters? 73. What was the role of ARPANET in the computer network? 74. Which of the following is notan unit for data transfer rate? (i) Bps (ii) Abps (iii) Gbps(iv) Kbps 75. What is the difference between Trojan horse and virus in terms of computer? 76. What term we use for a software/hardware device, which is used to block, unauthorized access while permitting authorized communications. This term is also used for a device or set of
devices configured to permit, deny, encrypt, decrypt, or proxy for all(in and out) computer traffic between different security domains based upon a set of rules and other criteria. 77. Write the full forms of the following. (i) GNU (ii) XML 78. Which of the following is not a unit for data transfer rate? (i) Mbps (ii) Kbps (iii) Sbps(iv) Gbps 79. What is the difference between virus and worms in the computer? 80. Write the full forms of the following: (FSF) 81. Name any two common web browsers: 82. What is protocol? Which protocol is used to search information from internet using an internet browser? 83. Name the two switching techniques used to transfer data between two terminals (computers). 84. What is the difference between LAN and WAN? 85. Expand the following abbreviations: (i) HTTP (ii) ARPANET 86. Distinguish between web site and web browser? 87. What is Firewall? 88. How is coaxial cable different of optical fibre? 89. How is hacker different from a cracker? 90. Write two advantage and disadvantage of networks. 91. What is ARPAnet ? What is NSFnet ? 92. What do you understand by InterSpace? 93. Name two switching circuits and explain any one. 94. What is communication channel? Name the basic types of communication channels available. 95. What are the factors that must be considered before making a choice for the topology? 96. What are the similarities and differences between bus and tree topologies? 97. What are the limitations of star topology? 98. When do you think, ring topology becomes the best choice for a network? 99. Write the two advantages and two disadvantages of Bus Topology in network. 100. Briefly mention two advantages and two disadvantages of Star Topology in network. 101. Write two disadvantages of twisted pair cables. 102. What is remote login? 103. What is structure of an E-mail message? 104. What is web scripting?
4 Marks Questions 1. XcelenciaEdu Services Ltd. is an educational organization. It is planning to set up its India campus at Hyderabad with its head office at Delhi. The Hyderabad campus has 4 main buildings - ADMIN, SCIENCE, BUSINESS and ARTS. You as a network expert have to suggest the best network related solutions for their problems raised in (i) to (iv), keeping in mind the distances between the buildings and other given parameters.
(i)
(ii)
Suggest the most appropriate location of the server inside the HYDERABAD campus (out of the 4 buildings), to get the best connectivity for maximum number of computers. Justify your answer. Suggest and draw the cable layout to efficiently connect various buildings within the HYDERABAD campus for connecting the computers.
(iii)
Which hardware device will you suggest to be procured by the company to be installed to protect and control the internet uses within the campus ? (iv) Which of the following will you suggest to establish the online face-to-face communication between the people in the Admin Office of HYDERABAD campus and DELHI Head Office ? a) E-mail b) Text Chat c) Video Conferencing d) Cable TV
2. Trine Tech Corporation (TTC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub Hyderabad. As a network advisor, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (iv) below. Physical locations of the blocks of TTC Human Resource Block
Conference Block
Finance Block
Block to block distance(in m.) (Block From) Block (To) Distance Human Resource Conference 110 Human Resource Finance 40 Conference Finance 80 Expected number of computers to be installed in each block Block Computers Human Resource 25 Finance 120 Conference 90 (i) What will be the most appropriate block, where TTC should plan to install their server? (ii) Draw a block to block cable layout to connect all the buildings in the most appropriate manner for efficient communication. (iii) What will be the most possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office. Satellite Link Ethernet Infrared (iv) Which of the following device will be suggested by you to connect each computer in each of the buildings? Swtich Modem Gateway
3. Tech up Corporation (TUC) is a professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As a network advisor, you have to understand their
requirement and suggest to them the best available solutions. There queries are mentioned as (i) and (iv) below you have to understand their requirement and suggest to them the best available solutions. Their queries are mentioned as (i) and (iv) below. Physical locations of the blocks of TUC
Conference Block
Human Resource Block Finance Block
Block to block distances (in m.) (Block From) Block (To) Distance Human Resource Conference 60 Human Resource Finance 120 Conference Finance 80 Expected number of computers to be installed in each block Block Computers Human Resource 125 Finance 25 Conference 60 (i) What will be the most appropriate block, where TUC should plan to install their server? (ii) Draw a block to block cable layout to connect the buildings in the most appropriate manner for efficient communication. (iii) What will be the best possible connectivity out of the following, you will suggest to connect the new setup of offices in Bangalore with its London based office? Infrared Satellite Link Ethernet Cable (iv) Which of the following devices will be suggested by you to connect each computer in each of the buildings? Gateway Switch Modem
4. G.R.K International Inc. is planning to connect its Bengaluru Office Setup with its Head Office in Delhi. The Bengaluru G.R.K International Inc. is spread across an area if approx.. 1 square kilometers consisting of 3 blocks. Human Resources, Academics and Administration. You as network expert have to suggest answers to the four queries (i) to (iv) raised by them. NOTE keep the distances between blocks and number of computers in each block in mind, while providing them the solutions. Bengaluru office setup
Human Resources
Delhi Head Office
Administration
Academics
Shortest distances between various blocks Human Resources to administration 100m Human resources to Administration 65m Academics to Administration 110m Delhi Head office to Bengaluru Office 2350km Setup Number of computers Installed at various blocks Block Number of Computers Human Resources 155 Administration 20 Academics 100 Delhi Head Office 20 (i) Suggest the most suitable block in the Bengaluru Office Setup, to host the server. Give a suitable reason with your suggestion. (ii) Suggest the cable layout among the various blocks within the Bengaluru Office Setup for connecting the blocks. (iii) Suggest a suitable networking device to be installed in each of the blocks essentially required for connecting computers inside the blocks with fast and efficient connectivity. (iv) Suggest the most suitable media to provide secure, fast and reliable data connectivity between Delhi Head Office and the Bengaluru Office setup.
5.
Expertia Professional Global (EPG) in an online corporate training provider company for IT related courses. The company is setting up their new courses in Mumbai. You as a network expert have to study the physical locations of various buildings and number of computer to be installed in the planning phase, provide the best possible answers for the queries (i) to (iv) raised by them. Physical locations of the buildings of EPG
Finance Building
Facility Studio Building Building to building distance(in m.) From To Administrative Finance Building Building Administrative Faculty Studio Building Building Finance Faculty Studio Building Building
Administrative Building
Distance 60 120 70
Expected computers to be installed in each building Buildings Computers Administrative Building 20 Finance Building 40 Faculty Studio Building 120 (i) Suggest the most appropriate building, where EPG should plan to install the server. (ii) Suggest the most appropriate building to building cable layout to connect all three buildings for efficient communication. (iii) Which type of network out of the following is formed by connection the computers of these three buildings? (a) LAN (b) MAN (WAN) (iv) Which wireless channel out of the following should be opted by EPG to connect to students of all over the world? (a) Infrared (b) Microwave (iii) Satellite
6. Granuda consultants are setting up a secured network for their office campus at Faridabad for their day-to-day office and web based activities. They are planning to have connectivity between three buildings and the head office situated in Kolkata. Answer the questions (i) to (iv) after going throw the building positions in the campus and other details, which are given below. Faridabad Campus
Building RAVI Building JAMUNA
Head Office KOLKATA
Building GANGA
Distance between various buildings Building RAVI to Building JAMUNA 120 m Building RAVI to Building GANGA 50 m Building GANGA to Building JAMUNA 65 m Faridabad Campus to Head Office 1460 km Number of computers Building RAVI 25 Building JAMUNA 150 Building GANGA 51 Head Office 10 (i) Suggest the most suitable place (I.e. block) to house the server of this organization. Also, give a reason to justify your suggested location. (ii) Suggest a cable layout of connections between the buildings inside the campus. (iii) Suggest the placement of the following devices with justification: (a) Switch (b) Repeater (iv) The organization is planning to provide a high speed link with its head office situated in the Kolkata using a wired connection. Which of the following cable will be most suitable for this job? (a) Optical fibre (b) Coaxial cable (c) Ethernet cable
7. Work a lot consultants are setting up a secured network for their office campus of Gurgaon for their day-toDay office and web based activities. They are planning to have connectivity between three buildings and
the Head office situated in Mumbai. Answer the questions (i) to (iv) after going through the building positions in the campus and other details, which are given below: Faridabad Campus
Head Office MUMBAI
Building GREEN Building RED Building Blue
Distance between various buildings Building GREEN to Building RED Building GREEN to Building BLUE Building BLUE to Building RED Gurgaon Campus to Head Office
110 m 45 m 65 m 1760 km
Number of computers Building GREEN 32 Building RED 150 Building BLUE 45 Head Office 10 (i) Suggest the most suitable place (i.e. building) to house the server of this organization. Also, given a reason to justify your suggested location. (ii) Suggest a cable layout of connections between the buildings inside the campus. (iii) Suggest the placement of the following (a) Switch (b) Repeater (iv) The organization is planning to provide a high speed link with its head office situated in the Mumbai using a wired connection. Which of the following cables will be most suitable for this job? (a) Optical fibre (b) Coaxial cable (c) Ethernet cable
8.
Quick learn university is setting up its academic blocks at Prayag Nagar and planning to set up a network. The university has three academic blocks and one human resource Centre as shown in diagram below:
Business Block
Law Block
Technology Block
HR Centre
Centre to center distance between various blocks/center is as follows: Law Block to Business Block 40 m Law Block to Technology Block 80 m Law Block to HR Centre 105 m Business Block to technology Block 30 m Business Block to HR Centre 35 m Technology Block to HR Centre 15 m Nubmer of computers in each of the blocks/centre is follows: Law Block 15 Technology Block 40 HR Centre 115 Business Block 25 (i) Suggest the most suitable place (i.e. block/centre) to install the server of this university with a suitable reason. (ii) Suggest an ideal layout for connecting this block/centre for a wired connectivity. (iii) Which device you will suggest to be placed/installed in each of this blocks/centre to efficiently connect allthe computers with in this blocks/centre? (iv) The university is planning to connect its admission office in the closest big city, which is more than 350 kmfrom university, which type of network out of LAN, MAN or WAN will be formed? Justify your answer.
9. Great Studies University is setting up its academic schools at Sunder Nagar and planning to set up a network. The university has three academic schools and one administration center as shown in the diagram:
Business School
Technology School
Admin Centre
Law School
Centre to centre distance between various buildings is as follows: Law School to Business School 60 m Law School to Technology School 90 m Law School to Admin Centre 115 m Business School to Technology School 40 m Business School to Admin Centre 45 m Technology School to Admin Centre 25 m Nubmer of computers in each of the school/centre is follows: Law School 25 Technology School 50 Admin Centre 125 Business School 35 (i) Suggest the most suitable place (i.e. school/centre) to install the server of this university with a suitable reason. (ii) Suggest an ideal layout for connecting this block/centre for a wired connectivity. (iii) Which device you will suggest to be placed/installed in each of these school/centre to efficiently connectall the computers with in these school/centre? (iv) The university is planning to connect its admission office in the closest big city, which is more than 350 kmfrom university, which type of network out of LAN, MAN or WAN will be formed? Justify your answer.
10. Learn Together is an educational NGO. It is setting up its new campus at Jabalpur for its web based activities. The campus has four compounds as shown in the diagram below:
Resource Compound
Main Compound
Training Compound
Finance Compound
Centre to centre distance between various compounds as per architectural drawing (in m.) is as follows: Main Compound to Resource Compound 110 m Main Compound to Training Compound 115 m Main Compound to Finance Compound 35 m Resource Compound to Training Compound 25 m Resource Compound to Finance Compound 135 m Training Compound to Finance Compound 100 m Expected numbers of computers in compound is as follows: Main Compound 5 Resource Compound 15 Training Compound 150 Finance Compound 20 (i) Suggest a cable layout of connections between the compounds. (ii) Suggest the most suitable place (i.e. compound) to house the server for this NGO. Also, provide a suitable reasonfor your suggestion. (iii) Suggest the placement of the following devices with justification. (iv) The NGO is planning to connect its International office situated in Mumbai, communication link, will you suggestfor a very high speed connectivity? (a) Telephone Analog line (b) Optical fibre (c) Ethernet cable.
11. ‘Vidya for All’ is an educational NGO. It is setting up its new campus at Jaipur for its web-based activities. The campus has four building as shown in the diagram below:
Main Building
Resource Building
Training Building
Accounts Building
Centre to centre distance between various buildings as per architectural drawing (in m) is as follows: Main Building to Resource Building 120 m Main Building to Training Building 40 m Main Building to Accounts Building 135 m Resource Building to Training Building 125 m Resource Building to Accounts Building 45 m Training Building to Accounts Building 110 m Expected number of computers in each building is as follows: Main Building 15 Resource Building 25 Training Building 250 Accounts Building 10 (i) Suggest a cable layout of connections between the buildings. (ii) Suggest the most suitable place (i.e. building) to house the server for this NGO. Also, provide a suitablereason for your suggestion. (iii) Suggest the placement of the following devices with justification (a) Repeater (b) Hub/Switch. (iv) The NGO is Planning to connect its international office situated in Delhi. Which out of the following wired communication links, will you suggest for a very high speed connectivity? (a) Telephone analog line (b) Optical fibre (c) Ethernet cable
12. Freshminds University of India is starting its first campus in Ana Nagar of South India with its centre admission office in Kolkata. The University has three major blocks comprising of Office block, Science blockand Commerce is in 5 km area campus. As a network expert, you need to suggest the network plan as per (i) to (iv) to the authorities keeping in mind the distance and other given parameters.
Kolkata Admission Office
Freshminds University Ana Nagar Campus
Commerce Block RAVI
Office Block
Science Block
Expected wire distance between various locations Office Block to Science Block 90 m Office Block to Commerce Block 80 m Science Block to Commerce Block 15 m Kolkata admission office to Ana Nagar Campus 2450 km Expected numbers of computers to be installed at various locations in the university are as follows Office block 10 Science Block 140 Commerce Block 30 Kolkata Admission 8 Office (i) Suggest the authorities, the cable layout amongst various blocks inside university campus for connecting the blocks. (ii) Suggest the most suitable place (i.e. block) to house the server for this university with a suitable reason. (iii) Suggest an efficient device from the following to be installed in each of the block to connect all the computers. Telephone line Fixed line dial-up connection Coaxial cable network GSM Leases line Satellite connection
13. Eduminds University of India is starting its campus in a small town Parampur of Central India with its centre admission office in Delhi. The University has three major buildings comprising of admin building academicbuildings and research building in 5 km area campus. As a network expert, you need to suggest the network plan as per (i) to (iv) to the authorities keeping in mind the distances and other given parameters.
Eduminds University Parampur Campus
Delhi Admission Office
Research Building RAVI
Academic Building
Admin Building
Expected wire distance between various locations Research Building to Admin Building 90 m Research Building to Academic Building 80 m Academic Building to Admin Building 15 m Delhi Admission Office to Parampur 1450 km Expected numbers of computers to be installed at various locations in the university are as follows: Research Building 20 Academic Building 150 Admin Building 35 Delhi Admission Office 5 (i) Suggest the authorities, the cable layout amongst various buildings inside the university campus for connecting the buildings. (ii) Suggest the most suitable place (i.e. building) to house the server of this organization, with a suitable reason. (iii) Suggest an efficient device for the following to be installed in each of the building to connect all the computers (a) Gateway (b) Modem (c) Switch (iv) Suggest the most suitable (very high speed) service to provide date connectivity between admissions building located in Delhi and the campus located in Parampur form the following options: Telephone line Fixedline dial-up connection Coaxial cable network GSM Leased line Satellite connection
14. Institute of Distance Learning is located in Pune and is planning to go in four networking in four wings for better interaction. The details are shown below: Lib Wing
Student Wing
Admission Wing
Admin Wing
The distance between various wings Student Wing to Admin Wing
150 m
Student Wing to Admission Wing 100 m Student Wing to Lib Wing 325 m Admission Wing to Admin Wing 100 m Admission Wing to Lib Wing 125 m Admin Wing to Lib Wing 90 m Number of computers Student Wing 225 Admission Wing 50 Admin Wing 10 Lib Wing 25 (i) Suggest the type of networking (LAN, MAN, WAN) for connecting Lib Wing to Admin Wing justify your answer. (ii) Suggest the most suitable place (i.e. wing) to house the server, with a suitable reason. (iii) Suggest and placement of the following devices with reasons (a) Repeater (b) Switch (iv) The institute is planning to link its study centre situated in Delhi. Suggest an economic way to connectit with reasonably high speed justify your answer. COMMUNICATION AND NETWORK CONCEPTS Answers to 1 mark Questions 1. A network is an interconnected collection of autonomous computers. 2. (i) Node. A computer that is attached to a network is known as node. (ii) Workstation. A node is also called workstation 3. (i) Server. A computer that facilitates resource sharing on a network. (ii) NIU. NIU means Network Interface Unit. It is an interpreter that helps establish communicationbetween the server and the work stations. 4. Microwave signals are used to transmit data without the use of cables. These signals prove cheaper than dragging trenches for laying cables and their maintenance. 5. (i) A data channel is the medium used to carry information or data from one point to another. 6. (i) Baud is the unit of measurement for the information carrying capacity of a communication channel. It is synonymous with bps (bits per second). 7. (i) Bandwidth – it refers to the difference between the highest and lowest frequencies of transmission channel. The term is also sometimes used to refer to the amount of informationtravelling through a single channel at any one point of time. 8. A gateway is a device that connects dissimilar networks. 9. A backbone network is a network that is used as a backbone to connect several LANs together to form a WAN. 10. GSM stands for Global System for Mobile Communications. GSM is a technique that uses narrowband TDMA (Time Division Multiple Access) to allow eight simultaneous calls on same radio frequency.
11. CDMA stands for Code Division Multiple Access which is a digital cellular technology that uses spread spectrum technique. Spread-spectrum is a technique in which data is sent in small pieces over a number of discrete frequencies available for use. Each user’s signal is spread over the entire bandwidth. 12. WLL refers to Wireless in Local Loop. It is a system analogous with local telephone service that provides telephony by deploying a multicity of multichannel transceivers. 13. 3G is a specification for third generation of mobile communications technology. 3G promises bandwidth of up to 384 Kbps when a device is stationary, 128 Kbps in a car and 2 Mbps in fixed applications. EDGE – Enhanced Data rates for Global Evolutionis a radio based high-speed mobile data standardthat allows data transmission speeds of 384 Kbps to be achieved when all eight timeslots are used. 14. Hub is a hardware device used to connect several computers together. Switchis a device used to segment networks into different sub networks called subnets. 15. RJ-45 is short for Registered Jack-45. It is an eight-wire connector, used to connect computers on LAN’s especially Ethernets. 16. Cookies are messages that a web server transmits to a web browser so that the web server can keep track of the user’s activity on a specific web site. 17. The telnet is an internet facility that facilitates remote login. Remove login is the process of accessing a network from a remote place without actually being at the actual place of working. 18. (i) Modulator/DeModulator (ii) File Transfer Protocol 19. A repeater is a device that amplifies a signal being transmitted on the network. It is used in long network lines, which exceed the maximum rates distance for a single run. 20. It is a device that works like a bridge but can handle different protocols. For example, a router can link Ethernet with any other type of network. 21. FTP (File Transfer Protocol) transfers files from one system to another. It defines rules for file transfer both systems.(In which file transfer is taking place) must adhere to. 22. URL refers to Uniform Resource Locator. A URL stores the address of a web page on WWW. 23. HTML–HyperText Markup Language – is a document layout and hyperlink specification language, used for creating web pages. 24. DHTML – Dynamic Hyper Text Markup language refers to web content that is dynamic i.e., changes each time it is viewed. 25. XML is a markup language for creating documents containing structured information. 26. In HTML both tag semantics and tag are fixed but XML specifies neither semantics nor tag sets.Rather it provides facility to define tags and relationships among them. 27. The system designed to prevent unauthorized access to or from a private network is called a firewall. 28. Cookies are messages that a web server transmits to a web browser so that the web server can keep track of the user’s activity on a specific web site. 29. The Crackers are the malicious programmers who break into secure systems whereas Hackers are more interested in gaining knowledge about computer systems and possibly using this knowledge for playful pranks.
30. Cyber Law is a generic term, which refers to all the legal and regulatory aspects of Internet and the World Wide Web. 31. Non-dedicated Servers. It is a workstation on a small network that can double up as a server. 32. Dedicated Server. On bigger networks, a computer is reserved for the cause of serving which is called dedicated server. 33. The 80-20 rule of network says that: 80% of the traffic on a given network segment should be local and not more than 20% of the network trafficshould need to move across a backbone i.e., the spine connecting various subnetworks. 34. Bridge is not a broadcast device, as it filters traffic depending upon the receiver’s MAC address. 35. Characteristic of 2G mobile technology is that it has introduced data services for mobile, starting with text messaging. Characteristics of 3G mobile technology is that it is faster than 2G and supports video calling. 36. Char generally involves one-to-one communication. On the other hand video conferencing means more than two persons are involved in a discussion. 37. General Packet Radio Service 38. Characteristics of Wi-Fi are as follows: (i) It is a wireless solution for getting connected to the internet. (ii) It is handly as well as available throughout the journey. 39. In order to chat, you need have an account on the same service as the person you are chatting with, e.g., on the other hand, in case of e-mail, it is not necessary i.e. you can have an account from any provider and you can establish your own. 40. When two mobiles are connected using Bluetooth to transfer a picture file, PAN (Personal Area Network) is created. 41. Following are the two popular open sources used as operating system. (i) GNU (ii) Open Solaris 42. Two characteristics of cloud computing are as follows: (i) On demand self-services. (ii) It provides the facility to pooled resources together to serve multiple customers with different physical and virtual resources dynamically assigned and reassigned according to the customer demand. 43. (i) Open source software is software whose source code is available for customer and it can be modified and redistributed without any limitations. On the other hand, source code is not available in proprietary software. (iii) open source software are generally free of cost. 44. (ii) Stealing keyboard and mouse from the shop. 45. HTTPis a protocol used to transfer files from a web server onto a browser in order to view a web page that is on the internet. FTP is a protocol used to upload files from a workstation to a FTP server or download files from a FTP server to a workstation. 46. IP address is an identifier for a computer or device on a TCP/IP network. E.g. 1.160.10.240 could be an IP address. A domain name is a name that identifies one or more IP addresses. e.g. the domain name Microsoft.com represents about a dozen IP addresses. 47. Two advantages of using optical fibre cables over an Ethernet cable are as follows:
(i) (ii)
Low power because signals in optical fibres degrade less, low-power transmitters can be used. Digital SignalsOptical fibres are ideal suited for carrying digital information, which is especially in computer networks. 48. Proprietary software can be distributed freely by the permission by the owner. User only purchases the compiled version of this software while the source code for an OSS is open for all, which can be copied, modified for redistributed. 49. (i) Packet Switching In this there us a fixed size of packet. In this, data packets are stored in the main memory. This improves the access time. (ii) Circuit switching In this, firstly complete physical connection between two computers is established. After that data are transmitted from the source computer to the destination computer. E.g. In telephone call, circuit switching is used. 50. (i) (a) HTTP: HyperText Transfer Protocol. (b) VolP: Voice over Internet Protocol. 51. Open Source Internet Browser: Chromium. Open Source Operating System:Linux 52. (ii) Getting into unknown person’s social networking account and start messaging on this behalf. 53. (ii) VoIP 54. Client Side Scripting Language: VB Script Server Side Scripting Language: ASP 55. (i) Stealing a mouse from someone’s computer.
56. Advantage of star topology is as follow: No disruption to the network when connecting or removing devices. 5 computers can be connected with each other using server like as follows: Comp1
Comp3 Server
Comp2
Comp4 Comp5
57. URL http://www.Gabsclassees.com/aboutus Domain name www.Gabsclasses.com 58. (i) Open Office Used to make documents. (iii) LinuxOperating system 59. (i) Operating someone’s Internet banking account, without his knowledge. 60. Advantage of Bus Topology In the bus topology computers can be connected with each other using a single linear cable). Four computers can be connected with each other using server in the following way:
Comp1
Comp3 Server
Comp2
Comp4
60. (i) MS-Office It is used to make a document, presentation, etc. (ii) Tally It is used to maintain accounts. 61. Message Switching In this form of switching, no physical copper path is established in advance between sender and receiver. Instead when the sender has a block of data to be sent, it is stored in first switching office, then forwarded later, i.e. one jump at a time. 62. In star topology, nodes are connected to server individually whereas an bus topology are nodes are connected to server along a single length of cable. 63. Client Side Script Server Side Script Java script ASP VB script JSP 64. (ii) Access to a bank account for getting unauthorized money transaction. 65. Open source software whose source code is available, that can be modified, copied and redistributed. OSS can be free or can be charged for, whereas proprietary software is a computer software licensed under exclusive legal right of the copyright holder. The license gives the right to use the software under certain conditions. 66. LAN is a group of computers and network devices connected together, usually within the same building whereas WAN is not restricted to geographical location, although it might be confined within the bounds of state or country. 67. XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. XML is not a version of HTML. HTML is about displaying information while XML is about describing information. 68. Web 2.0 is associated with web application that facilitate participatory information sharing, interoperability, uses centered and collaboration on the world wide web. It allows user to interact and collaborate with each other in a social media dialogue as creators of user generated in content in a virtual community. 70. Function of modem is to convert analog signals into digital signals and vice-versa. It is used to connect internet. 71. Switch/Hub and Repeaters. 72. Repeater is an electronic device, that receives a signal and transmits It at a high level so that the Signal covers longer distance. It’s required if the distance between source and destination is 90 m
or more. 73. ARPANET (Advanced Research Projects Agency Network). The goal of this project was to connect computers at different universities and US defense. ARPANET started with a handful of computer but it expanded rapidly. 74. (ii) Abps is not unit for data transfer rate. 75. Unlike viruses, Trojan does not replicate them but they can be just a lot destructive. One of the most insidious types of Trojan is a program that claims to rid your computer of viruses but instead introduce viruses onto your computer. 76. Firewall 77. (i) GNU GNU’s NOT UNIX. (ii) XML eXtensible Markup language. 78. (iii) Sbps 79. The main difference between virus and worms is the method by which they reproduce and spread. A virus is dependent upon a boot sector and the transfer of files between machines to spread, while a worm can run completely independently and spread itself through network connections. 80. (i) FSF Free Software Foundation 81. Netscape Navigator and Internet Explorer. 82. Protocol is a set of rules that two or more computers must follow to communicate on network. HTTP(HyperText Transfer Protocol) is used for searching information from internet, using internet browser. 83. Switching techniques used to transfer data between two terminals. (i) Circuit switching (ii) Packet switching 84. LAN The network which is confined to a building or a block is called local area network, e.g. school. WANThe network which is spread across country or continent is called wide area network, e.g. Internet. 85. (i) HTTPHyperText Transfer Protocol. (ii) ARPANETAdvanced Research Projects Agency Network. 86. WebsiteItis a collection of related web pages served from a single web domain. Web browserIt is a software that is used to access and display the web pages. 87. Firewall is a security system that prevents an unauthorized access to a private network. Firewalls can be implemented in both hardware and software or combination of both. 88. The data transmission characteristics of coaxial cable are considerably better than twisted pair but not better in relation to optical fibre. The coaxial cable is being used as a shared cable network, with part of the bandwidth being used for data traffic. Optical fibre is difficult to install because they are fragile and need special care to install. One of the major advantages of optical fibre over coaxial cable is its complete immunity to noise, because the information is travelling on a modulated light beam. 89. Hackers These are the persons who get unauthorized access to the websites and replace them with other websites or unlawful information. Crackers The person by using certain software to track authenticated information or to crack the Security codes such as user names and password to illegally access the information of computers are called crackers. 90. Advantage: We can share resources such as printers and scanners. Can share data and access file from any computer. Disadvantage: Server faults stop applications from being available.
Network faults can cause loss of data. 91. ARPAnet(Advanced Research Project Agency Network is a project sponsored by U. S.
Department ofDefense. NSFnetwas developed by the National Science Foundation which was high capacity network and strictlyused for academic and engineering research. 92. Interspace is a client/server software program that allows multiple users to communicate online with real time audio, video and text chat I dynamic 3D environments. 93The two switching circuits are Circuit Switching Message Switching Circuit Switching - In this technique, first the complete physical connection between two computers is Established and then data are transmitted from the source computer to the destination computer. 94. Communication channel mean the connecting cables that link various workstations. Following are three basic types of communication channels available: a) Twisted-Pair Cables b) Coaxial Cables c) Fiber-optic Cables 95. There are number of factors to consider in before making a choice for the topology, the most important of which are as following : (a) Cost. (b) Flexibility (c) Reliability 96. Similarities: In both Bus and Tree topologies transmission can be done in both the directions, and can be received by all other stations. In both cases, there is no need to remove packets from the medium. Difference: Bus topology is slower as compared to tree topology of network. Tree topology is expensive as compared to Bus Topology 97. Requires more cable length than a linear topology. If the hub, switch, or concentrator fails, nodes attached are disabled. More expensive than linear bus topologies because of the cost of the hubs, etc. 98. Ring topology becomes the best choice for a network when, Short amount of cable is required. No wiring closet space requires 99. Advantage: Easy to connect a computer or peripheral to a linear bus. Requires less cable length than a star topology. Disadvantage : Slower as compared to tree and star topologies of network Breakage of wire at any point disturbs the entire network 100. Advantage: Easy to install and wire. No disruptions to the network when connecting or removing devices. Disadvantage : Requires more cable length than a linear topology. If the hub, switch, or concentrator fails, nodes attached are disabled. 101. Disadvantage : It is not capable to carrying signal to long distance. It connects only up to 100 meters. 102. Remote login: Remote login is the process of accessing a network from a remote place without actually being at the actual place of working. 103. An electronic mail messages is structured very much like a paper letter.
In mail message, there are three parts : The header – is the envelope, The body – is the actual message, The signature – comes at the end. Some common header lines include : To: The recipient(s) of the message. Date: The date the message was sent. From: The person who sent the message. Cc: The people who were mailed copies of the message. 104. A script is a small bit of code that enables web browsers to do something rather than just displaying static results. Scripts are used in web design to create dynamic pages. There are 2 categories of Web script Client Side Script which can be written by using JavaScript, VB Script and Server Side Script which can be written in PHP, JSP
Answers to 4 Marks Questions 1. (i)
ADMIN (due to maximum number of computers) OR ARTS (due to shorter distance from the other buildings)
(ii)
Any one of the following
(iii)
Firewall OR Router
(iv)
c) Video Conferencing
2.
(i) TTC should install its server in finance block as it is having maximum number of computers. (ii) Human Resource Block
Conference Block
Finance Block
The above layout is based on minimum cable length required which is 120 m in the above case. (iii) Satellite Link. (iv) Switch. 3.
(i) TUC should install its server in Human Resource Block as it is having maximum number of computers. (ii)
Conference Block
Human Resource Block
Finance Block The above layout is based on the minimum length of cable required, i.e. 140 m. (iii) Satellite (iv) Switch
4.
(i) Human Resources, because it has maximum number of computer. (ii)
Human Resources
Academics
Administration (iii) Hub/Switch (iv) Satellite
5. (i) EPG should install the server in the faculty studio building as it is having maximum number of computers. (ii)
Finance Building
Administration Building
Faculty Studio Building
(iii) LAN (Local Area Network) (iv) Satellite.
6. (i) The most suitable place to house the server in JAMUNA because it has maximum number of computer. (ii) Faridabad Campus Building RAVIrr3rBUi Building JAMUNA
Building GANGA
(iii)
Switchesare needed in every building as they help share bandwidth in every building.
Repeatersmay be skipped as per above layout(because distance is less than 100m) however if building RAVI and building JAMUNA are directly connected, we can place a repeater there as a distance between these two building is more than 100 m. (iv) Coaxial cable.
7. (i) Building RED is the suitable place to house this because it has maximum number of computers. (ii) Gurgaon Campus Building GREEN
Building RED
Building BLUE (iii) Switches are needed in every building as they help share bandwidth in every building. Repeaters may be skipped as per above layout (because distance is less than 100m) however if building Green and building Red are directly connected, we can place a repeater there as the distance between these two buildings is more than 100 m. (iv) Coaxial cable
8. (i) The most suitable place to install the server is HR Centre as it has a maximum number of computers. (ii) Business Block Technology Block
Law Block (iii) Switch (iv) WAN as it is another city.
HR Centre
9. (i) The most suitable place to install the server is Admin Centre as it has a maximum number of computers. (ii) Business School Technology School
Law School
Admin Centre
(iii) Switch device (iv) WAN as it is outside city. 10. (i) Main Compound
Resource Compound
Finance Compound
Training Compound
(ii) The most suitable place to house the server is Training Compound as it has a maximum number of computers. (iii) Repeater As per one layout (shown in (i)0, the repeater can be avoided as all distances between the compounds are < =100m. Hub/SwitchTraining Compound as it is hosting the server. (iv) Opticalfibre.
11. (i) Resource Building
Main Building
Training Building
Accounts Building
(ii) The most suitable place to house the server for this NGO is Training Building because it has the maximum number of computers. (iii) Repeater Main Building Switch
Training Building Switch
Resource Building Repeater Switch
Accounts Building Switch
(iv)
Opticalfibre
12. (i) Commerce Block
Office Block
Science Block
(ii) The most suitable place to house the server is Science Block as it has maximum number of computers. Thus, reducing the cabling cost and increase efficiency of network. (iii) Switch is the device to be installed in each of the block to connect all the computers. (iv) SatelliteCoonection.
13. (i)
Research Building Academic Block Admin Block (ii) The most suitable place to house the server is Academic Building as it has maximum number of computers. Thus, it decreases the cabling cost and increase efficiency of network. (iii) Switch is to be installed in each of building to connect all the computers. (iv) Satellite connection.
14. (i) Since, the distance between Lib Wing and Admin Wing is small, so type of networking is small i.e. LAN. (ii) Since, maximum numbers of computers are in student Wing, so suitable place to house the server is Student Wing. (iii) Repeater should be installed between Student Wing and Admin Wing as distance is more than60 m. Switch should be installed in each Wing to connect several computers. Repeater Lib Wing
Student Wing Switch
Repeater
Switch
Re pe at er
Admission Wing Switch
Admin Wing Switch
(iv) Broad band connection as it is between economical and speedy.