THIS PAPER IS NOT TO BE REMOVED FROM THE EXAMINATION HALLS.

Added on - 23 Sep 2019

  • 17

    pages

  • 4197

    words

  • 116

    views

  • 0

    downloads

Showing pages 1 to 4 of 17 pages
UL18/0464Page1of14THISPAPERISNOTTOBEREMOVEDFROMTHEEXAMINATIONHALLS
Question1Acompanyhasalargecentralwarehousenearaportcity,wherebulkshipmentsoftextilesarebroughtbyship.Fromtimetotimeshipmentsoftextilesaresent outtolocalcentresindifferentpartsofthecountry,wheretheyareusedtomakegarments.Thecompany'sdatabasehastableswhichrecordallthevariouskindsoftextilewhichareinthecentralwarehouse,andalsothe textileswhichareinitslocalcentresaroundthecountry.Inresponsetothearrival ofashipmentoftextilesatthecentralwarehouse,thedatabaseisupdatedtoreflecttheincreaseinthekindoftextilewhichhascomein.Whentextilesareshippedoutofthewarehousetolocalcentres,thewarehousetableisupdatedtoreflectthedecreaseintheamountoftextileheldthere.Thetextilesarelistedas'intransit'.When thetextilesarriveatalocalcentre,thetableswhichrecordhowmuchtextileeachlocalcentreisstockingareupdatedtoreflectacorrespondingincrease.Thus, thecompanyalwaysknowshowmanytextilesofeachtypeithas,andwheretheyarelocated.(1)Anewshipmentof severalkindsoftextilearrives.Thecentralwarehousetableisupdated:eachtuplecorrespondingtoaparticularkindoftextilehasits'On-Hand'fieldincreasedbytheamountofthattypeoftextilewhichhasarrived.(2)Whenalocalcentrerequestsashipmentofacertain quantityofacertainkindoftextilefromthe centralwarehouse,thattextile'stupleisaccessed,the'On-Hand'fieldisdecreasedbytheshipmentamount,andthe'In-Transit'fieldisincreasedbythesameamount.Whenthereceivinglocalcentreconfirmsthat theshipmenthasarrived,thevalueofthe'In-Transit'fieldisdecreasedandthe'On-Hand'fieldinthatkindoftextile'stupleinthe'LocalCentre'tableisupdatedtoshowtheincrease.Asampleoftherelevantattributesoftherelationsmightlooklikethis:CentralWarehousePrimaryKey:TexCode
UL18/0464Page 3of14LocalCentrePrimaryKey:CentreNum+TexCodeHereisatypicalsetof SQLstatements,labelled--1to--7,thatthe company'sDatabaseAdministratormightenterduringthecourseofaday,tokeepthe databaseuptodate.I*Atelephonecallfrom theUnloadingDocktellsusthat500metresofDR888 hasjustbeenunloadedandinspectedandisbeingstoredintheCentralWarehouseUpdatethe'OnHand'fieldattheCentralwarehousetoshow this*/--1UPDATECentralWarehouseSETOn-Hand=On-Hand+500WHERETexCode ='DR888';I*Wereceiveanotefrom theShippingDepartmentinformingusthat100metresofGA612hasbeenloadedontotrucksfordeliverytoourlocalcentresinotherpartsofthecountry.Updatethe'OnHand'and'InTransit'fieldsoftheCentralWarehousetoreflect thischange.*/--2UPDATECentralWarehouseSETOnHand=On-Hand-100,In-Transit=ln-Transit+100WHERETexCode='GA612';/*Anemailtellsusthat100metresofBA068hasarrivedatoneofthelocalcentres,453,towhichitwasshipped.Adjustthe databaseaccordingly.Updatethe 'In-Transit'fieldoftheCentralWarehouse,toindicatethat100metresofthisfabricisno longer
UL18/0464Page 3of14intransit...*/--3UPDATECentralWarehouseSETIn-Transit =In-Transit-100WHERE TexCode='BA068';
desklib-logo
You’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document