web views05. t10. hard disk. 4500. s03 (c) write the output of the following sql commands (1 to 4):...

47
QNo. 5 SQL 2014 Q.Paper (a) Explain the concept of Union between two tables, with the help of appropriate example. Note: Answer the questions (b) and (c) on the basis of the following tables STORE and ITEM Table: STORE SNo SName Area S01 ABC Computronics GK II S01 ALL Infotech Media CP S02 Tech Shoppe Nehru Place S04 Geeks Tecno Soft Nehru Place S05 Hitech Tech Store CP Table: ITEM INo IName Price SNo T01 Mother Board 12000 S01 T02 Hard Disk 5000 S01 T03 Keyboard 500 S02 T04 Mouse 300 S01 T05 Mother Board 400 S03 T06 Key Board 400 S03 T07 LCD 6000 S04 T08 LCD 5500 S05 T09 Mouse 350 S05 T10 Hard Disk 4500 S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000; 2) SELECT AREA, COUNT(*) FROM STORE GROUP BY AREA; 3) SELECT COUNT(DISTINCT AREA) FROM STORE; 4) SELECT INAME, PRICE*0.05 DISCOUNT FROM ITEM WHERE SNO IN (‘S02’,’S03’); [2+1+1+1+1+2=8] (b) Write the SQL queries(1 to 4)

Upload: ngodieu

Post on 31-Jan-2018

246 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

QNo. 5 SQL

2014 Q.Paper

(a) Explain the concept of Union between two tables, with the help of appropriate example.Note:Answer the questions (b) and (c) on the basis of the following tables STORE and ITEMTable: STORE

SNo SName Area

S01 ABC Computronics GK II

S01 ALL Infotech Media CPS02 Tech Shoppe Nehru Place

S04 Geeks Tecno Soft Nehru Place

S05 Hitech Tech Store CPTable: ITEM

INo IName Price SNo

T01 Mother Board 12000 S01T02 Hard Disk 5000 S01T03 Keyboard 500 S02T04 Mouse 300 S01T05 Mother Board 400 S03

T06 Key Board 400 S03T07 LCD 6000 S04

T08 LCD 5500 S05

T09 Mouse 350 S05

T10 Hard Disk 4500 S03

(c) Write the output of the following SQL commands (1 to 4):1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;2) SELECT AREA, COUNT(*) FROM STORE GROUP BY AREA;3) SELECT COUNT(DISTINCT AREA) FROM STORE;4) SELECT INAME, PRICE*0.05 DISCOUNT FROM ITEM WHERE SNO IN (‘S02’,’S03’);[2+1+1+1+1+2=8](b) Write the SQL queries(1 to 4)

1) To display IName and Price of all the Items in ascending order of their price.2) To display SNo and SName of all Stores located in CP.3) To display Minimum and Maximum Price of each IName from the table Item.4) To display IName, Price of all items and their respective SName where they are

available.

Page 2: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

ANSWERS

(a) The UNION query of SQL combines row results from one table with rows of another table (vertically). Both the tables should contain same number of fields and same types of fields.  

Example- 

                 SELECT * FROM Emp1                  UNION                  SELECT * FROM Emp2;

    (b)

         (i)   Select IName, Price               From Item               Order By Price Asc;           (ii) Select SNo, SName               From Store               Where Area=”CP”;             (iii)  Select IName, Max(Price), Min(Price)                From Item

GROUP BY Iname;

Page 3: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

 (iv)  SelectIName, Price

               From Store, Item               Where Store.SNo=Item.INo;(c)

(i) 

IName

Hard Disk

LCD

Mother Board

   (ii) 

Area Count

CP 2

GK II 1

Nehru Place 2

  (iii)  

Count

3

 (iv)  

IName discount

Keyboard 25

Motherbaord 650

Page 4: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Key Board 20

Hard Disk 225

      

Q PAPER2013

Question 5 :(a) Explain the concept of the candidate keys with the help of an appropriate example.NOTE:Write SQL queries for (b) to (g) and write the outputs for the SQL queries mentioned in (h1) to (h4) parts on the basis of tables; PRODUCTS and SUPPLIERS.Table: PRODUCTS

PID

PNAME

QTY

PRICE COMPANY SUPCOD

E

101 DIGITAL CAMERA 14X 120 12000 RENIX S01

102 DIGITAL PAD 11i 100 2200 DIGI POP S02

104 PEN DRIVE 16 GB 500 1100 STOREKING S01

106 LED SCREEN 32 70 28000 DISPEXPERT

S S02

105 CAR GPS SYSTEM 60 12000 MOVEON S03

Table: SUPPLIERS

SUPCODE SNAME CITY

S01 GET ALL INC KOLKATAS03 EASY MARKET CORP DELHIS02 DIGI BUSY GROUP CHENNAI

(10 Marks)

Page 5: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(b) To display the details of all the products in the ascending order of the product names (i.e., PNAME).

(c) To display the product name and the price of all those products, whose price is in the range of 10,000 and 15,000 (both values inclusive).

(d) To display the number of products, which are supplied by each supplier, i.e., the expected output should be:

S01 2S02 2S03 1

(e) To display the price, product name and quantity (i.e., qty) of those products that have quantity more than 100.(f) To display the names of those suppliers, who are either from DELHI or from CHENNAI.(g) To display the names of the companies and the products in the descending order of the company names.(h) Obtain the outputs of the following SQL queries based on the data given in the tables; PRODUCTS and SUPPLIERS, above.(h1) SELECT DISTINCT SUPCODE FROM PRODUCTS;(h2) SELECT MAX(PRICE), MIN(PRICE) FROM PRODUCTS;(h3)SELECT PRICE*QTY AMOUNTFROM PRODUCTS WHERE PID=104;(h4) SELECT PNAME, SNAMEFROM PRODUCTS P, SUPPLIERS SWHERE P.SUPCODE=S.SUPCODE AND QTY>100;[2+1+1+1+1+1+1+2 = 10]

ANSWERSAnswer 5 : (10 Marks)

Page 6: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(a). Candidate key: A candidate key is a single field or the least combination of fields other than the primary key that uniquely identifies each record in the table.In the table below, the StudentId is working as a primary key, where as we can define the firstName as the candidate key to uniquely identify the record.

(b) SELECT * FROM PRODUCTSORDER BY PNAME ASC;

(c)  SELECT PNAME, PRICE FROM PRODUCTSWHERE PRICE BETWEEN 10000 AND 15000;

(d)SELECT PRODUCTS.SUPCODE, COUNT (SUPCODE)FROM PRODUCTS, SUPPLIERSGROUP BY PRODUCT.SUPCODE;HAVING PRODUCTS.SUPCODE=SUPPLIERS.SUPCODE;

(e) SELECT PRICE, PNAME, QTYFROM PRODUCTSWHERE QTY>100;

Page 7: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(f) SELECT PNAMES FROM PRODUCTS P, SUPPLIERS SWHERE P.SUPCODE=S.SUPCODE ANDCITY IN (DELHI, CHENNAI);

(g) SELECT COMPANY, PNAMEFROM PRODUCTSORDER BY COMPANY DESC;

(h)(h1)

(h2)MAX(PRICE) MIN(PRICE)

28000 1100

(h3)AMOUNT

550000

(h4)

PNAME SNAME

DIGITAL CAMERA 14X GET ALL INC

PEN DRIVE 18 GB GET ALL INC

Q PAPER 2012

SUPCODE

S01

S02

S03

Page 8: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Question 5 : a) Give a suitable example of a table with sample data and illustrate Primary and Alternate Keys in it.

Consider the following tables CARDEN and CUSTOMER and answer (b) and (c) parts of this question:

Table: CARDEN

Table: CUSTOMER

(8 Marks

)

Ccode CarName Make Color Capacity Charges

501 A-star Suzuki RED 3 14

503 Indigo Tata SILVER 3 12

502 Innova Toyota WHITE 7 15

509 SX4 Suzuki SILVER 4 14

510 C Class Mercedes RED 4 35

Page 9: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

b) Write SQL commands for the following:(i) To display the names of all the silver colored Cars.(ii)To display the name of the car,

make and capacity of cars in descending order of their sitting capacity.(iii)To display the highest charges at which vehicle can be hired from CARDEN.(iv) To display the customer name and the corresponding name of the cars hired by them.c) 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;[2+4+2 =8]

ANSWERSAnswer 5 : (8 Marks)(a).Primary Key – A primary key is a candidate key that is most appropriate to be the main reference key for the table. Primary keys are mandatory for every table.Alternate Key – We can define more than one primary key in a table. All these keys are collectively known as candidate keys. Out of which one who is selected as the primary key but those who are not selected are known as secondary keys or alternative keys.

CCode Cname Ccode

1001 Hemant Sahu 501

1002 Raj Lal 509

1003 Feroza Shah 503

1004 Ketan Dhal 502

Page 10: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

For example, in the above table showing the studentId would be the most appropriate for a primary key leaving the other candidate key as secondary or alternative key.(b). (i)SELECT CarName FROM CARDEN WHERE Color = “SILVER”;(ii) SELECT CarName, Make, Capacity FROM CARDEN ORDER BY Capacity desc;(iii) SELECT MAX(Charges) AS “Highest Charges” FROM CARDEN(iv)  SELECT CName, CarName FROM CUSTOMER, CARDEN WHERE CUSTOMER.CCode = CARDEN.Ccode(c) 

Page 11: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Q PAPER 2011Question 5 : a) What do you understand by Selection & Projection operations in relational algebra? 

Consider the following tables EMPLOYEE and SALGRADE and answer (b) and (c) parts of this questions:Table : EMPLOYEE

ECODE NAME DESIG SGRADE DOJ DOB101 Abdul

AhmadEXECUTIVE S03 23-Mar-

200313-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 : SALGRADESGRADE SALARY HRA

S01 56000 18000S02 32000 12000

Page 12: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

S03 24000 8000b) Write SQL commands for the following statements: 

(i) To display the details of all EMPOYEEs in descending order of DOJ.(ii) To display NAME and DESIG of those EMPLOYEEs, whose SALGRADE is either S02 or S03.(iii) To display the content of all the EMPLOYEEs table, whose DOJ is in between ’09-Feb-2006’ and ’08-Aug-2009’.(iv) To add a new row with the following :109, ‘Harish Roy’, ‘HEAD-IT’, ‘S02’, ’09-Sep-2007’, ’21-Apr-1983’c) 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’;[ 2+4+2 = 8]

ANSWERSAnswer 5 : (8 Marks)(a) The select operation selects tuples(horizontal subset) from a relation that specify a given condition. It is denoted by a lowercase Greek letter ( ) known as “sigma”.The project operation yields a “vertical” subset of a given relation in contrast to the “horizontal” subset returned by select operation. It is denoted by Greek letter ( ) known as “pi”.(b)

(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 (ECODE,NAME,DESIG,SGRADE,DOJ,DOB) Values(109, ‘Harish Roy’, ‘Head-IT’,’S02’, ’09-Sep-2007’, ’21-Apr-1983’);

(c)(i)

COUNT SGRADE2 S032 S021 S01

Page 13: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(ii)        DOB               DOJ       22-Jul-1987    12-Feb-2010

(iii)               NAME         SALARY

          Abdul Ahmad     24000          Ravi Chander     32000 (iv)             SGRADE      SALARY

                S02             44000

QPAPER 2010Question 5 :a) What do you understand by Candidate Keys in a table? Give a suitable example of candidate keys from a table containing some meaningful data. (2)b) Consider the following tables STORE and SUPPLIERS and answer b1 and b2 part of this question.Table: STORE

Item No.

Item Scode Qty Rate LastBuy

2005 Sharpener Classic 23 60 8 31-Jan-09

2003 Ball Pen 0.25 22 50 25 01-Feb-10

2002 Gel Pen Premium 21 150 12 24-Feb-10

2006 Gel Pen Classic 21 250 20 11-Mar-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

Table : SUPPLIERSScode Sname

(8 M

Page 14: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

21 Premium Stationary

23 Soft Plastic22 Tetra Supply

b1) Write SQL commands for the following statements: (4)

i. To display details of all the items in the Store table in ascending order of LastBuy.

ii. To display the Item No and Item name of those items from store table whose Rate is more than 15 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 Suppliers individually as per Scode from the table Store.

b2) Give the output of the following SQL queries: (2)i) SELECT COUNT(DISTNICT Scode) FROM Store;ii) SELECT Rate *Qty FROM Store WHERE Item No=2004;iii) SELECT Item, Sname FROM Store S, Suppliers P WHERE S.Scode=P.Scode AND Item No=2006;iv) SELECT MAX(LastBuy) FROM Store;

A ANSWERS

Answer 5 : (8 Marks)a) A table may have more than one such attribute/group of attributes that identifies a tuple uniquely, all such attributes are known as candidate key. For example

Table: Item Ino Item Qty

I01I02I04I09I05I03

PenPencilCDLong FileEraserDuster

560780450350250128

Page 15: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

From above table Ino and Item are treated as the candidate keys. b) b1) 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 Scode MIN ( Rate ) From STORE GROUP BY Scode ;b2) i) COUNT ( DISTINCEScode )                  3ii) Rate * Qty        880

iii) Item                         Sname    Gel Pen Classic          Premium Stationary                   iv)MAX ( LastBuy )     24-Feb-10

 Q PAPER2009

Question 5 :a) What do you understand by Primary key? Give a suitable example of Primary key from a table containing some meaningful data. (2)b) Consider the following tables STOCK and DEALERS and answer (b1) and (b2) parts of this question.Table: STOCKItem No.

Item Scode Qty Rate LastBuy

(8 Marks)

Page 16: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

5005 BallPen 0.5 102 100 16 31-Mar-10

5003 Ball Pen 0.25 102 150 20 01-Jan-10

5002 GelPen Premium

101 125 14 14-Feb-10

5006 Gel Pen Classic 101 200 22 01-Jan-09

5001 Eraser Small 102 210 5 19-Mar -09

5004 Eraser Big 102 60 10 12-Dec-09

5009 Sharpener Classic

103 160 8 23-Jan -09

Table: DEALERSDcode Dname101 Reliable Stationers

103 Classic Plastics

102 Clear Deals

b1) Write SQL commands for the following statements: (4)i) To display details of all the Items in the Stock table in ascending order of StockDate.ii) To display ItemNo and Item name of those items from Stock table whose UnitPrice is more than Rupees 10.iii) To display the details of those items whose dealer code(Dcode) is 102 or Quantity in Stock(Qty) is more than 100 from the table Stock.iv) To display Minimum UnitPrice of items for each dealer individually as per Dcode from the table Store.

b2) Give the output of the following SQL queries: (2)i) SELECT COUNT(DISTNICT Dcode) FROM Stock;ii) SELECT *QtyUnitPrice From Stock WHERE Item No=5006;iii) SELECT Item, Dname FROM Stock S, Dealers DWHERE S.Dcode=D.Dcode AND ItemNo=5004;iv) SELECT MIN(StockDate) FROM Stock;

Page 17: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

ANSWERS

a) An attribute or set of attributes which are used to identify a tuple uniquely is known as Primary Key. For Example: let us consider a table Dept with following tuples and data.

Table: Dept        From above table Deptno is the

Primary Key.b) b1) i) SELECT * FROM STOCK ORDER BY StockDate;           ii) SELECT ItemNo, Item FROM STOCK WHERE UnitPrice> 10;          iii) SELECT * FROM STOCK WHERE Dcode=102 OR Qty> 100;

       iv) SELECT Dcode, MIN(UnitPrice) FROM STORE GROUP BY Dcode;b2) i) COUNT(DISTINCE Dcode)               3ii) QTY * UNITPRICE            4400                        iii) ITEM                                             DNAME     Eraser Big                                   Clear Dealsiv)MIN(STOCKDATE)                          01-JAN-09

 Q PAPER 2008

Question 5 : (a) Differentiate between candidate key and primary key in context of RDBMS. [2](b) Consider the following tables Product and Client. Write SQL commands for the statement (i) to (iv) and give output for SQL

queries (v) to (viii). [6]TABLE: PRODUCT

P_ID Product Name Manufacturer PriceTP01 Talcum powder LAK 40FW05 Face wash ABC 45BS01 Bath soap ABC 55SH06 Shampoo XYZ 120FW12 Face wash XYZ 95

TABLE: CLIENTC_ID Client Name City P_ID01 Cosmetic shop Delhi FW0506 Total health Mumbai BS01

Deptno Dname LOC101102104109105103

ComputersEnglishBiologyPhysicsChemistryMaths

Ist FloorII FloorIII FloorIV FloorV FloorVI Floor

Page 18: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

12 Live life Delhi SH0615 Pretty women Delhi FW1216 Dreams Bangalore TP01

(i) To display the details of those clients whose city is Delhi.(ii) To display the details of products whose price is in the range of 50 to 100(Both values included)(iii) To display the client name, city from table Client and product name and price from table Product with their corresponding matching P_ID.(iv) To increase the price of all the products by 10.(v) SELECT DISTINCT Address FROM Client;(vi) SELECT Manufacturer, MAX(Price), Min(Price), Count(*)FROM Product GROUP BY Manufacturer;(vii) SELECT Client Name, Manufacturer Name

FROM Product, ClientWHERE Client.Prod_Id=Product.P_Id;(viii) SELECT Product Name, Price*4;FROM Products;

ANSWERS

Answer 5 : (8 Marks)(a) Candidate Key - A candidate key can be any column or a combination of columns that can qualify as unique key in database.

There can be multiple candidate keys in one table.Primary Key - A primary key is a column or a combination of columns that uniquely identify a record. Only one candidate key can be primary key.One needs to be very careful in selecting the primary key as an incorrect selection can adversely impact the database architect and future normalization. For a candidate key to qualify as a primary key, it should be non-null and unique in any domain.E.g.,In customer table, every customer will have a customer ID and also a contact number. Customer ID will be unique for every customer and Contact number is also unique as every telephone number is different. Both fulfill the criteria for candidate keys. 

Consider if a customer does not want to share his contact number, then contact number will be null. Since, primary key has a constraint of non-null values, contact number cannot be used as primary key(even though it satisfies uniqueness criteria). Customer Id can be used as primary key as it satisfies uniqueness as well as non-null criteria.

(b) (i) Select * from Client             Where City=”Delhi”;           (ii) Select * from Product          Where Price BETWEEN ( 50 AND 100);        (iii) Select ClientName, City, Product Name, Price           From Client, Product;     (iv) UPDATE Product           SET Price= Price + Price*.10;     (v)  City(Distinct)            Delhi           Mumbai           Bangalore     (vi) Manufacturer       Max(Price)       Min(Price)       Count(*)             LAK                          40                    40             1       `  ABC                         55                    45             2           XYZ                        120                   95             2     (vii)  Client Name              Manufacturer Name               Cosmetic shop          Face wash             Total health             Bath soap             Live life                   Shampoo             Pretty women           Face wash

Page 19: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

             Dreams                   Talcum powder     (viii) Product Name              Price*4              Talcum powder             160            Face wash                  180            Bath soap                   220            Shampoo                    480            Face wash                  380

Q NO. 7 NETWORKING

Q. PAPER 2014

Question 7 :(a) Write one characteristics each of 2G and 3G Mobile Technologies.(b) What is the difference between Video Conferencing and Chat?(c) Expand the following:

GPRSCDMA

(d) Which type of network ( out of LAN, PAN and MAN ) is formed, when you connect two mobiles using Bluetooth to transfer a picture file.(e) Trine Tech Corporation ( TTC ) is professional consultancy company. The company is planning to set up their new offices in India with its hub at Hyderabad. As network adviser, you have to understand their requirement and suggest them the best available solutions. Their queries are mentioned as (i) to (iv) below.Physical Location of the blocks of TTC:

Block to Block distances( in Mtrs.)Block(From) Block(To) DistanceHuman Resource Conference 110Human Resource Finance 40Conference Finance 80

(10 Marks)

Page 20: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Expected Number of Computers to be installed in each blockBlock Computers

Human Resource 25Finance 120Conference 90(i) What will the most appropriate block, where TTC should plan to

install their server?(ii) Draw a block to cable layout to connect all 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.

Satellite LinkInfraredEthernet Cable

(iv) Which of the following device will be suggested by you to connect each computer in each of the buildings?

SwitchModemGateway

(f) Write names of any two popular Open Source Software, which are used as operating system.(g) Write any two important characteristics of Cloud Computing.

[1+1+1+1+1+1+1+1+1+1=10]ANSWERS

Answer 7 : (10 Marks)(a) Characteristic of 2G Mobile Technologies-

      2G Mobile technology allows the dial–up data calls digitally, so that the network’s switching station receives actual ones and zeroes rather than the screech of an analog modem.Characteristic of 3G Mobile Technology-

       3G mobile communication technology is a broadband, packet-based transmission of media files at data rates up to 2Mbps, offering a consistent set of services to mobile computer and phone users no matter where they are located in the world.

(b) The video conferencing is a two-way videophone conversation (where participants are visible to each other) among multiple participants at a time where as, chatting is an online textual talk in real time.(c)       GPRS- General Packet Radio Service       CDMA- Code Division Multiple Access

(d) PAN (Private Area Network) will be formed, when we connect two mobiles using Bluetooth.

 (e)(i) Finance is the most appropriate block, where TTC should plan to install their server  (ii)    

Page 21: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(iii) Ethernet cable(iv) Switch

 (f) The two popular Open Source Softwares used as operating system are-       Linux       OpenSolaris

 (g) Two important characteristics of cloud computing-

       In cloud computing price of deploying applications in the cloud results in lower hardware costs.       Cloud computing allows a business to use, access and pay only for what they use, with a fast

implementation time.

Q. PAPER 2013Question 7 :(a) Write the two advantages of using an optical fibre cable over an Ethernet cable to connect the two service stations, which are 200 m away from each other.

(b) What is the difference between HTTP and FTP?

(c) Rovenza Communications International (RCI) is an online corporate training provider company for IT related courses. The company is setting up their new campus in Kolkata. You,

(8 Marks)

Page 22: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

as a network expert, have to study the physical locations of the various blocks and the number of computers to be installed. In the planning phase, provide the best possible answer for the queries (i) to (iv) raised by them.

Block to Block distance( in Mtrs.)From To DistanceAdministrative Block Finance Block 60Administrative Block Faculty Recording Block 120Finance Block Faculty Recording Block 70

Expected Computers to be installed in each block

Block Computers

Administra 30

Page 23: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

tive BlockFinance Block 20

Faculty Recording Block

100

(i) Suggest the most appropriate block, where RCI should plan to install the server.

(ii) Suggest the most appropriate block to block cable layout to connect all the three blocks for efficient communication.

(iii) Which type of network, out of the following, is formed by connecting the computers of these three blocks?. LAN. MAN. WAN

(iv) Which wireless channel, out of the following, should be opted by RCI to connect to students from all over the world?. Infrared. Microwave. Satellite(d) Write the two advantages of using open source software over proprietary software.

(e) 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

Page 24: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

and start messaging on his behalf. [1+1+4+1+1 = 8]ANSWERS

Answer 7 : (8 Marks)(a).  The advantages of using the fibre optic cables over the Ethernet cables are as follows:1. The fibre optic cables have the faster data transmission  rates over the Ethernet cables whereas an Ethernet uses either a bus or star topology and supports the data transfer rates of up to 10 Mbps. 2. The fibre optic cables are immune to the electrical and  magnetic interference because the information travelling through them travels on a modulated light beam.(b) The differences between HTTP and FTP are:

HTTP FTPIt is an abbreviated form ofHypertext Transfer Protocol. It is a protocol that is used to upload files from a workstation to an FTP server.

It is an abbreviated form of File Transfer Protocol. It is a protocol that is used to transfer the files from a Web server onto a browser to view a Web page.

It supports hypertext or hypermedia files such as multimedia documents that contain links to images, sounds or other multimedia documents on the World Wide Web.

It supports text and binary files that are organised in a hierarchical structure, much like a family tree.

(c)(i) Faculty recording building(ii)  Finance building(iii) MAN(iv) Satellite

Page 25: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(d) The advantages of proprietary software over open source software are as follows:

              Open source Proprietary software

They are the software distributed under a licensing agreement, which allow the source code to be shared, viewed and modified by the other users and organisations.

They are the software distributed under a licensing agreement to the authorised users with the private modification, copying and republishing restrictions.

They are available free of cost.

The user has to pay the amount defined to get such software.

(e) (i) Stealing keyboard and mouse from a shop.Q PAPER 2012

Question 7 :a) What out of the following, will you use to have an audio-visual chat with an expert sitting in a far-away place to fix-up a technical issue?(i) VoIP(ii)email(iii)FTPb) Name one server side scripting language and one client-side scripting language. c) Which out of the following comes 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 with his/her permission.d) Write one advantage of Bus topology of network. Also, illustrate how 4 computers can be connected with each other using star topology of network.

e) Workalot Consultants are setting up a secured network for their office campus at Gurgoan for their day-to-day office and

(10 Marks)

Page 26: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

web-based activities. They are planning to have connectivity between 3 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:

Distances between various buildings

Building “GREEN” to Building “RED” 110m

Building “GREEN” to Building “BLUE”

Building “BLUE” to Building “RED”

Building Campus to Head Office 1760km

Number of ComputersBuilding “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 give a reason to justify your

Page 27: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

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:1. Switch2. Repeater(iv)The organization is planning to provide a high speed link with its head office situated in MUMBAI using a wired connection. Which of the following cables will be most suitable for this job?1) Optical Fiber2) Co-axial cable3)Ethernet cablef) Give one suitable example of each URL and Domain Name.g) Name two Proprietary softwares along with their applications. [1+1+1+1+4+1+1 = 10]

ANSWERS

Answer 7 : (10 Marks)(a).  (ii) VoIPVoice over IP (VoIP) commonly refers to the communication protocols which consist of the transmission techniques involved in the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. (b). One client side scripting is Java Script.One server side script is JSP (Java Server Page).

       (c). (i) Operating someone’s Internet banking account, without his knowledge.

(d). The advantage of Star Topology of network:

In bus topology all the nodes are connected in a linear fashion with a single continuous cable.The main advantage of a Bus Topology is that, the Bus Topology is easy to set-up and easy to extend the nodes in a network.

 The four computers can be connected with each other using Star Topology of network. In which one computer would be the central

Page 28: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

node which will work as a server. The other three computers would be connected to the central node called server. The communication between each node will take place through the server.(e)(e1)  Building “RED” is the most suitable place for the server as it contains maximum numbers of computers.(e2) We can use any of the following topology to design the layout:Bus Topology: In bus topology all the nodes are connected in a linear fashion with a single continuous cable.Star Topology: In star topology all the nodes are connected to a central hub/switch to form a network.(e3) Switch- Every Building will need 1 switch, to send signals to all the workstations connected to it.Repeater - A repeater should be placed when the distance between any two connecting computers exceeds 70m.

(e4)(i) Optical Fiber can be used for a high speed link.(f) URL- www.yahoo.com, www.google .com etc    Domain Names - .com, .gov, .edu etc(g) Proprietary softwares are softwares that are exclusive property of their developers or publishers, and they cannot be copied or distributed without complying with their licensing agreements.

Page 29: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

The Two Proprietary software’s are:(i) Microsoft Windows – Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft.(ii) Adobe Flash Player - The Adobe Flash Player is software for viewing animations and movies using computer programs such as a web browser.

Q PAPER 2011

Question 7 : a) In Networking , what is WAN ? How is it different from LAN? 

b) Differentiate between XML and HTML.

c) What is WEB 2.0?d) Out of the following, identify client-side script(s) and server-side script(s).i) Javascriptii) ASPiii) vbscriptiv) JSPe) Great Studies University is setting up its Academic schools at Sunder Nagar and planning to set up a network. The university has 3 academic schools and one administration center as shown in the diagram below:Center to center distances between various buildings is as follows:

Law School to Business School 60 mLaw School to Technology School 90 mLaw School to Admin Center 115 mBusiness School to Technology School 40 mBusiness School to Admin Center 45 mTechnology School to Admin Center 25 m

Number of Computers in each of the Schools/Center is follows:

Law School 25Technology school 50Admin Center 125Business School 35

(10 Marks)

Page 30: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(i)Suggest the most suitable place (i.e. Schools/Center) to install the server of this university with a suitable reason.

(ii) Suggest an ideal layout for connecting these schools/center for a wired connectivity.

(iii) Which device will you suggest to be placed/installed in each of these schools/center to efficiently connect all the computers within these schools/center ?

(iv) The university is planning to connect its admission office in the closest big city, which is more than 350 km from theuniversity. Which type of network out of LAN, MAN or WAN will be formed? Justify your answer.f) Compare Open Source Software and Proprietary Software.g) What are cookies?[1+1+1+1+4+1+1 = 10]

ANSWERSAnswer 7 : (10 Marks)(a) A computer network that spans over a relatively large geographical area. Typically, a WAN consists of two or more local-area networks (LANs). A LAN is computer network that spans over a relatively small area. Most LANs are confined to a single building or group of buildings.Computers connected to a wide-area network are often connected through public networks, such as the telephone system. They can also be connected through leased lines or satellites. The largest WAN in existence is the Internet.(b) XML-eXtensible Markup Language: Is a markup language for documents containing structured information.HTML-HyperText Markup Language: Document-layout and hyperlink-specification language.(c) Web 2.0 refers to a new generation of applications that are social in nature. They allow for collaboration, information exchange, and are user-oriented. Facebook and MySpace are prime examples of Web 2.0 sites.(d)  Client-Side Script — Javascript , vbscript      Server-Side Script — ASP, JSP(e)

Page 31: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(i) Admin Center(ii) STAR Topology(iii) Hub/Switch(iv) WAN(Wide Area Network)  

The connection between admission office to the closest big city will be through WAN. It is span over a larger distance so dedicatedlines are not possible. Here connections are made using radio waves or satellites.  (f) Open source software is free to download therefore lower in cost, whereas, Proprietary software is computer software licensed under exclusive legal right of the copyright holder. The licensee is given the right to use the software under certain conditions, but restricted from other uses, such as modification, further distribution, or reverse engineering.(g) Cookies are the bits of data put on a hard disk when someone visits certain websites. The cookie on the hard disk has the username and password in it, so people don’t have to log in.

Q.PAPER 2010

Answer 7 : Question 7 :

a) What was the role of APARENT in Computer Networking? (1)b) Which of the following is not a unit for data transfer rate? (1)i) mbpsii) kbpsiii) sbpsiv) gbpsc) What is the difference between Virus and Worms in the computers? (1)d) What term do we use for a hardware/software 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 all (in and out) computer traffic between different security domains based upon a set of rules and other criteria. (1)e) ”Vidya For All” is an educational NGO. It is the setting up its new campus at Jaipur for its web based activities. The campus has four buildings as shown in the diagram below: (4)

(10 Marks)

Page 32: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Center to center distances between various Compounds as per architectural drawings (in metres) is as follows:

Main Building to Resource Building 120m

Main Building to Training Building 40m

Main Building to Accounts Building 135m

Resource Building to Training Building 125mResource Building to Accounts Building 45m

Training Building to Accounts Building 110m

Expected Number of Computers in each Building is as follows:Main Building 15Resource Building 25Training Building 250Accounts Building 10

e1) Suggest a cable layout of connections between the buildings.e2) Suggest the most suitable place (i.e., building) to house the server for this NGO. Also, provide a suitable reason for your suggestion.e3) Suggest the placement of the following devices with justification:

i) Repeateri) Hub/Switch

e4) The NGO is planning to connect its international office

Page 33: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

suitable in Delhi. Which, out of the following wired communication link, will you suggest for very high speed connectivity?

i) Telephone Analog Lineii) Optical Fibreriii) Ethernet Cable

f) Write the null form of the following:f1) FTPf2) FSFg) Name any two web browsers. AnswerS

(10 Marks)a) The first computer network was jointly designed by the Advanced Research Projects Agency (ARPA) and department of Defence (DOD) of United States in 1969 and was called ARPANET. It was an experimental project which connected a few computers from some of the reputed universities of USA and DOD. APRANET allowed access to computer resource sharing projects. This ARPANET was handed over to Defence Communication Agency (DCA) for further development.b) (iii)sbpsc) VIRUS: Virus is a malicious program that damages data and files and causes harm to computer system.WORM: A computer worm is a program which copies itself across a network. A computer worm differs from a computer virus in that a computer worm can run itself. A virus needs a host program to run and the virus code runs as part of the host program. A computer worm can spread without a host program, although some modern computer worms also use files to hide inside.d) Firewall

Page 34: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

e) e1) The cable network layout is as follows:

e2) Training Building as it contains maximum numbers of computers.e3) i) A repeater should be placed when the distance between any two connecting computers exceeds 70m.ii) Every Building will need 1 hub/Switch, to send singles to all the workstations connected to it.e4) (ii) Optical Fibref) f1) File Transfer Protocol   f2) Free Software Foundationg) Web Browser:i) Internet Explorerii) Mozilla Firefox

Q PAPER 2009

Page 35: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

Question 7 :a) What is the difference between LAN and WAN? [ 1](b) Expand the following abbreviations: [1](i) HTTP(ii) ARPANET( c) What is protocol? Which protocol is used to copy a file from/to a remotely located server? [1]

(d) Name two switching techniques used to transfer data between two terminals (computers). [1]

(e) Eduminds University of India is starting its first campus in a small town Parampur of Central India with its center admission office in Delhi. The University has 3 major buildings comprising of Admin Building, Academic Building and Research Building in the 5 KM area Campus. 

As a network expert, you need to suggest the network plan as per (E1) to (E4) to the authorities keeping in mind the distances and other given parameters.

Expected Wire distances between various locations:Expected numbers of computers to be installed at various locations in the university are as follows:

Research Building to Admin Building 90 mResearch Building to Academic Building 80 mAcademic Building to Admin Building 15 mDelhi Admission Office to Parampur Campus 1450 km

Expected numbers of computers to be installed at various locations in the university are as follows:

Research Building 20Academic Building 150Admin Building 35Delhi Admission Office 5

(E1) Suggest to the authorities, the cable layout amongst various buildings inside the university campus for connecting the buildings. [1]E2) Suggest the most suitable place (i.e. building) to house the server of this organization, with a suitable reason. [1 ]

(8 Marks)

Page 36: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

(E3) Suggest an efficient device from the following to be installed in each of the buildings to connect all the computers: [1](i) GATEWAY(ii) MODEM(iii) SWITCH

(E4) Suggest the most suitable (very high speed) service to provide data connectivity between Admission Building located in Delhi and campus located in Parampur from the following options: [ 1]

Telephone lineFixed-Line Dial-up connectionCo-axial Cable NetworkGSMLeased lineSatellite connection

ANSWERSAnswer 7 : (8 Marks)(a) There are two basic types of network, LAN and WAN.LAN stands for Local Area Network, while WAN stands for Wide Area Network.

Local Area Networks are smaller networks, usually within an office base. Connections between the workstations are physical with cables and all the office resources are shared and distributed between the network workstations.

WAN or Wide Area Networks, are broader geographic networks, like one city to another. They are more of a collection of interconnected LAN networks.

The main difference between LAN and WAN is in their data transfer rate. LANs are faster, with 10Gbit data transfer rates.

(b)   HTTP: Hyper Text Transfer ProtocolARPANET: Advanced Research Projects Agency Network

(c) A protocol is a set of rules that end points in a telecommunication connection use when they communicate. Protocols exist at several levels in a telecommunication connection. For example, there are protocols for the data interchange at the hardware device level and protocols for data interchange at the application program level. File Transfer Protocol (FTP) is used to copy a file from/to a remotely located computer.

(d)   The two types of switching techniques used to transfer data between two terminals are:

Circuit Switching: This method involves the physical interconnection of two devices. A good example of circuit switching involves the public phone network.

Packet Switching: Packet Switching techniques switch packets of data between destinations. Traditionally, this applied to X.25 techniques, but this also applies to TCP/IP and IPX/SPX routers. Proprietary Frame Relay switches can switch voice signals.

(E1)

Page 37: Web viewS05. T10. Hard Disk. 4500. S03 (c) Write the output of the following SQL commands (1 to 4): 1) SELECT DISTINCT INAME FROM ITEM WHERE PRICE>=5000;

 (E2)  The most suitable place to house the server of this organization is Academic Building, as this location has maximum number of computers installed. This will reduce the network traffic, as most of the traffic will be local and also decrease the cost.

(E3) SWITCH

(E4) Satellite connection is required to provide data connectivity between Admission Building located in Delhi and Parampur because they are very far located from each other.