Ans: CREATE DATABASE MYEARTH;
CREATE TABLE CITY
(CITYCODE CHAR(5)PRIMARY KEY,
CITYNAME CHAR(30),
SIZE INT,
AVGTEMP INT,
POPULATIONRATE INT,
POPULATION INT,
);
SECTION C
Each question carries 4 marks.
11. Write queries (a) to (d) based on the tables EMPLOYEE and DEPARTMENT given below:
Table: EMPLOYEE
| EMPID |
NAME |
DOB |
DEPTID |
DESIG |
SALARY |
| 120 |
Alisha |
23-Jan-1978 |
D001 |
Manager |
75000 |
| 123 |
Nitin |
10-Oct-1977 |
D002 |
AO |
59000 |
| 129 |
Navjot |
12-Jul-1971 |
D003 |
Supervisor |
40000 |
| 130 |
Jimmy |
30-Dec-1980 |
D004 |
Sales Rep |
- |
| 131 |
Faiz |
06-Apr-1984 |
D001 |
Dep Manager |
65000 |
Table: DEPARTMENT
| DEPTID |
DEPTNAME |
FLOORNO |
| D001 |
Personal |
4 |
| D002 |
Admin |
10 |
| D003 |
Production |
1 |
| D004 |
Sales |
3 |
(a) To display the average salary of all employees, department wise.
Ans: SELECT AVG(SALARY) FROM EMPLOYEE GROUP BY DEPTID;
(b) To display name and respective department name of each employee whose salary is more than 50000.
Ans: SELECT NAME, DEPTNAME FROM EMPLOYEE, DEPARTMENT WHERE EMPLOYEE.DEPTID=DEPARTMENT.DEPTID AND SALARY>50000;
(c) To display the names of employees whose salary is not known, in alphabetical order.
Ans: SELECT NAME FROM EMPLOYEE WHERE SALARY IS NULL ORDER BY NAME;
(d) To display DEPTID from the table EMPLOYEE without repetition.
Ans: SELECT DISTINCT DEPTID FROM EMPLOYEE;
12. (i) Give two advantages and two disadvantages of star topology.
Ans: Advantages:
(i) Easy to install and manage
(ii) Failure of one node does not affect others
Disadvantages:
(i) Failure of central hub stops entire network
(ii) Expensive due to more cabling
OR
Define the following terms: www , web hosting
Ans: www: The World Wide Web is a system that allows us to open and view websites on the internet using links called URLs.
web hosting: Web hosting is a service that stores a website on a server so that people can access it on the internet.
(ii) How is packet switching different from circuit switching?
Ans: Packet switching sends data in small packets through different paths and used in the Internet., while circuit switching uses a fixed path with a dedicated connection for the entire communication and used in telephone calls.
13. BeHappy Corporation has set up its new centre at Noida, Uttar Pradesh for its office and web-based activities. It has 4 blocks of buildings.
Distance between the various blocks is as follows:
| A to B |
40 m |
| B to C |
120 m |
| C to D |
100 m |
| A to D |
170 m |
| B to D |
150 m |
| A to C |
70 m |
Numbers of computers in each block
| Block A |
25 |
| Block B |
50 |
| Block C |
125 |
| Block D |
10 |
(a) Suggest and draw the cable layout to efficiently connect various blocks of buildings within the Noida centre for connecting the digital devices.
Ans:
(b) Suggest the placement of the following device with justification:
i. Repeater - between C and D as the distance between them is 100 mts.
ii. Hub/Switch - in each block as they help to share data packets within the devices of the network in each block.
(c) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is connected to its head office in Mumbai?
Ans: WAN
(d) Which fast and very effective wireless transmission medium should preferably be used to connect the head office at Mumbai with the centre at Noida?