Get the step-by-step solution for this question inside the Vidyadip app.
Get the answer in the appGenerate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.
Building to Building distances (in Mtrs.)
| FROM | To | Distance |
| Administrative Building | Finance Building | 60 |
| Administrative Building | Faculty Studio building | 120 |
| Finance Building | Faculty Studio building | 70 |
Number of computers in each of the blocks/Center is as follows:
| Administrative Building | 20 |
| Finance Building | 40 |
| Faculty Studio building | 120 |
(a) Suggest the most appropriate building, where EPG should plan to install the server.
(b) Suggest the most appropriate building to building cable layout to connect all three buildings for efficient communication.
(c) Which type of network out of the following is formed by connecting the computers of these three buildings?
LAN, MAN, WAN
(d) Which wireless channel out of the following should be opted by EPG to connect to students of all over the world?
Infrared, Microwave, Satellite
Consider the following tables WORKER and PAYLEVEL and answer (a) and (b) parts of this question:
Relation: WORKER
| ECODE | NAME | DESIG | PAYLEVEL | DOJ | DOB |
| 11 | Radhey Shyam | Supervisor | P001 | 13-Sep-2004 | 23-Aug-1981 |
| 12 | Chander Nath | Operator | P003 | 22-Feb-2010 | 12-Jul-1987 |
| 13 | Fizza | Operator | P003 | 14-June-2009 | 14-Oct-1983 |
| 15 | Ameen Ahmed | Mechanic | P002 | 21-Aug-2006 | 13-Mar-1984 |
| 18 | Sanya | Clerk | P002 | 19-Dec-2005 | 09-June-1983 |
Relation: PAYLEVEL
| PAYLEVEL | PAY | ALLOWANCE |
| P001 | 26000 | 12000 |
| P002 | 22000 | 10000 |
| P003 | 12000 | 6000 |
(a) Write SQL commands for the following statements:
(i) To display the details of all WORKERs in descending order of DOB.
(ii) To display NAME and DESIG of those WORKERs whose PLEVEL is either P001 or P002.
(iii) To display the content of all the WORKERs 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.plevel and w.ecode <13;
(iv) Select plevel, pay+allowance from paylevel where plevel=’p003 ’;
Write SQL commands for (a) to (f) and write the outputs for (g) on the basis of tables FURNITURE and ARRIVALS
Table: FURNITURE
| NO | ITEMNAME | TYPE | DATEOFSTOCK | PRICE | DISCOUNT |
| 1 | White lotus | Double Bed | 23/02/2002 | 30000 | 25 |
| 2 | Pink feather | Baby cot | 20/01/2002 | 7000 | 20 |
| 3 | Dolphin | Baby cot | 19/02/2002 | 9500 | 20 |
| 4 | Decent | Office Table | 01/01/2002 | 25000 | 30 |
| 5 | Comfort zone | Double Bed | 12/01/2002 | 25000 | 25 |
| 6 | Donald | Baby cot | 24/02/2002 | 6500 | 15 |
| 7 | Royal Finish | Office Table | 20/02/2002 | 18000 | 30 |
| 8 | Royal tiger | Sofa | 22/02/2002 | 31000 | 30 |
| 9 | Econo sitting | Sofa | 13/12/2001 | 9500 | 25 |
| 10 | Eating Paradise | Dining Table | 19/02/2002 | 11500 | 25 |
Table: ARRIVALS
| NO | ITEMNAME | TYPE | DATEOFSTOCK | PRICE | DISCOUNT |
| 1 | Wood Comfort | Double Bed | 23/03/2003 | 25000 | 25 |
| 2 | Old Fox | Sofa | 20/02/2003 | 17000 | 20 |
| 3 | Micky | Baby cot | 21/02/2003 | 7500 | 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 date of stock is before 22/01/2002 from the FURNITURE table in descending order of ITEMNAME.
(d) To display ITEMNAME and DATEOFSTOCK of those items, in which the discount t 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,“Valvet touch ”, “Double bed ”, {25/03/03}, 25000,30
(g) Give the output of following SQL statement
Note: Outputs of the above mentioned queries should be based on 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 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;
For example:If the list CITIES contains[“AHMEDABAD”,”CHENNAI”,”NEW DELHI”,”AMRITSAR”,”AGRA”]The following should get displayedAHEMDABADAMRITSARAGRA
Write a script to create a list of 10 random integers and display it. Then input an integer from the user and check whether it is present in the list (use in operator). If it is present in the list, then remove it from the list. If the element is present in the list multiple times then all its occurrences should be removed. (use remove() method). If the element is not present, then display an appropriate message.
Table: DEPT
| DCODE | DEPARTMENT | LOCATION |
| D01 | INFRASTRUCTURE | DELHI |
| D02 | MARKETING | DELHI |
| D03 | MEDIA | MUMBAI |
| D05 | FINANCE | KOLKATA |
| D04 | HUMAN RESOURCE | MUMBAI |
Table: EMPLOYEE
| ENO | NAME | DOJ | DOB | GENDER | DCODE |
| 1001 | George K | 2013-09-02 | 1991-09-01 | MALE | D01 |
| 1002 | Ryma Sen | 2012-12-11 | 1990-12-15 | FEMALE | D03 |
| 1003 | Mohitesh | 2013-02-03 | 1987-09-04 | MALE | D05 |
| 1007 | Anil Jha | 2014-01-17 | 1984-10-19 | MALE | D04 |
| 1004 | Manila Sahai | 2012-12-09 | 1986-11-14 | FEMALE | D01 |
| 1005 | R SAHAY | 2013-11-18 | 1987-03-31 | MALE | D02 |
| 1006 | Jaya Priya | 2014-06-09 | 1985-06-23 | FEMALE | D05 |
Note: DOJ refers to date of joining and DOB refers to date of Birth of employees.
(i) To display Eno, Name, Gender from the table EMPLOYEE in ascending order of Eno.
(ii) To display the Name of all the MALE employees from the table EMPLOYEE.
(iii) To display the Eno and Name of those employees from the table EMPLOYEE who a born between ‘1987‐01‐01 ’and ‘1991‐12‐01 ’.
(iv) To count and display FEMALE employees who have joined after ‘1986‐01‐01 ’.
(v) Select count(*),dcode from employee group by dcode having count(*)>1;
(vi) Select distinct department from dept;
(vii) Select name, department from employee e, dept d where e.dcode=d.dcode and en0 <1003;
(viii) select max(doj), min(dob) from employee;