+ All Categories
Home > Documents > xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

Date post: 16-Feb-2018
Category:
Upload: dinhtuyen
View: 228 times
Download: 1 times
Share this document with a friend
23
1. Communications devices are used to transfer data, instructions and information between two or more computers. a) List three types of communications device. [3 marks] b) State the function of each type of communications device in a). [3 marks] c) Name the local area network topologies and draw a diagram for each of them. [6 marks] Answer a) i. Sending device ii. Communications channel iii. Receiving device b) i. Sending device – Device that initiates instruction to transmit data, instructions, or information. ii. Communications channel – Device transmission media on which data, instructions, or information travel. iii. Receiving device – Device that accepts the transmission of data, instructions, or information. c) i. bus topology ii. star topology iii. ring topology Bus Topology Star Topology 2
Transcript
Page 1: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

1. Communications devices are used to transfer data, instructions and information between two or more computers.a) List three types of communications device.

[3 marks] b) State the function of each type of communications device in a).

[3 marks]c) Name the local area network topologies and draw a diagram for each of them.

[6 marks]

Answera)

i. Sending device ii. Communications channel

iii. Receiving device

b)i. Sending device – Device that initiates instruction to transmit data, instructions, or information.

ii. Communications channel – Device transmission media on which data, instructions, or information travel.iii. Receiving device – Device that accepts the transmission of data, instructions, or information.

c)i. bus topology

ii. star topology iii. ring topology

Bus Topology

Star Topology

Ring Topology

2

Page 2: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

1. Peranti komunikasi digunakan untuk memindahkan data, arahan dan maklumat di antara dua atau lebih komputer.a) Senaraikan tiga jenis peranti komunikasi.b) Nyatakan fungsi setiap jenis peranti komunikasi di a).c) Namakan topologi-topologi bagi rangkaian kawasan setempat dan lukis gambarajah untuk setiap topologi terseburt.

Jawapana)i. Peranti penghantarii. Saluran komunikasiiii. Peranti penerima

b)i. Peranti penghantar - Peranti yang memulakan arahan untuk menghantar data, arahan atau maklumat.ii. Saluran komunikasi - Peranti media penghantaran yang merupakan laluan bagi data, arahan atau maklumat.iii. Peranti penerima - Peranti yang menerima penghantaran data, arahan atau maklumat.

c)i. Topologi bas ii. Topologi bintangiii. Topologi gelang

2. a) Explain what is meant by the terms virus, worm and trojan horse in the context of computer security risk. [3 marks]

b) State the difference between system software and application software.[2 marks]

Answera)virus – A program that can pass on the malicious code to other programs by modifying them and can overtake the entire computing system and spread to other systems.

worm – A program that copies and spreads itself through a network.

trojan horse – A program which can perform useful and unexpected action and must be installed by users or intruders before it can affect the system’s assets.

b)System software – System software refers to all programs that help the computer to function properly. Software that is used to control and manage computer devices and operations.

Application software – Application software are all programs that perform specific tasks for users. Software that is used to help a user perform a task and solve a problem.

2. a) Terangkan apa yang dimaksudkan dengan virus, cecacing dan kuda troy dalam konteks risiko keselamatan komputer.

b) Nyatakan perbezaan antara perisian sistem dan perisian aplikasi.

Jawapana)virus - Atur cara yang boleh memindahkan kod jenis berbahaya ke atur cara-atur cara lain dengan mengubahkan atur cara sistem komputer tersebut serta menyebarkannya ke seluruh sistem yang lain.

cecacing - Atur cara yang menyalin dan menyebarkan dirinya melalui rangkaian.

kuda troy - Atur cara yang kononnya boleh melakukan tindakan yang berguna tetapi sebenarnya di letakkan oleh pengguna atau penceroboh sebelum ianya menceroboh keselamatan sistem apabila atur cara tersebut digunakan.

3

Page 3: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

b)Perisian sistem - Perisian sistem merujuk kepada atur cara-atur cara yang dapat membantu komputer berfungsi dengan baik. Perisian tersebut digunakan untuk mengawal dan mengurus operasi peranti-peranti komputer..

Perisian aplikasi - Perisian aplikasi merujuk kepada atur cara-atur cara yang dapat melaksanakan tugas-tugas tertentu untuk pengguna. Perisian ini digunakan untuk membantu pengguna menjalankan tugasannya dan menyelesaikan sesuatu masalah.

3. There are two commonly used authentication method, which are biometric device and callback system. a) Explain what is meant by biometric device and callback system.

[2 marks]b) Give three examples of biometric device.

[3 marks] Answera) Biometric device – A device that translates personal characteristics into a digital code that is compared with a digital

code stored in the database.Callback system – refers to the checking system that authenticates the user.

b)i. Fingerprint Recognition

ii. Facial Recognitioniii. Hand Geometry Scanningiv. Iris Scanningv. Retinal Scanning

vi. Voice Recognitionvii. Signature Verification System

3. Terdapat dua kaedah pengesahan yang biasa digunakan, iaitu kaedah peranti biometrik dan sistem panggilan semula.a) Terangkan apa yang dimaksudkan oleh peranti biometrik dan sistem panggil semula.b) Berikan tiga contoh peranti biometrik.

  Jawapan a) Peranti biometrik - peranti yang menterjemah ciri-ciri peribadi kepada kod digital secara membandingkan kod tersebut dengan kod digital yang terdapat didalam sesebuah pangkalan data.Sistem panggil semula - merujuk kepada sistem pemeriksaan yang mengesahkan seseorang pengguna. b)i. Pengecaman cap jariii. Pengecaman wajahiii. Pengimbas geometri tanganiv. Pengimbas iris v. Pengimbas retinavi. Pengecaman suaravii. Sistem pengesahan tandatangan

4. A function definition statement in C is given as follows.

int smallest(int X, int Y, int Z)

a) Write a code segment in C for the function smallest that returns the smallest value among the integers X, Y and Z. [5 marks]

b) A code segment in C that uses the function smallest is given as follows. int p, q; int a = 41, b = 75, c = 30; p = smallest(a–2 , b+1, c+50); q = p + smallest(a–c, b–c, c); /* 1 */

i. Determine the value p. [2 marks]ii. Determine the values of the formal parameters X, Y and Z when the function smallest is called in the line

labelled /* 1 */. [3 marks]iii.Determine the value of q. [2 marks]

4

Page 4: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

Answera)int smallest(int X, int Y, int Z) {int smallest_value; if(X<Y) { if X<Z) smallest_value = X; else smallest_value = Z; } else { if (Y<Z) smallest_value = Y; else smallest_value = Z; }return smallest_value;}

b)i) p = smallest(a–2 , b+1, c+50) p = smallest(41-2,75+1, 30+50) p = smallest(39, 76, 80) p = 39

ii) (a-c, b-c, c) (41-30, 75-30, 30) (11, 45, 30) x=11, y = 45, z = 30

iii) q = p + smallest(11, 45, 30) = p + 11 = 39 + 11 q = 50

5. Write a program that will accept the BASE and HEIGHT of a triangle and then calculate and display its area with the heading AREA OF THE TRIANGLE IS … SQUARES METERS.

[4 marks]Answer#include <stdio.h>void main(){ int BASE, HEIGHT; float AREA;

printf("BASE : "); scanf("%d", &BASE); printf("HEIGHT : "); scanf("%d", &HEIGHT); AREA = (float) 1/2 * BASE * HEIGHT;

printf("AREA OF THE TRIANGLE IS %.2f SQUARES METERS", AREA);

6. A program in C is given as follows:

#include <stdio.h>

float count(float, int);float w = 0.0;

5

Page 5: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

void main() {

float h = 0.1; int r = 7;

w = count(h, r);printf(”The value of w is %.2f\n”, w);

h = count(w, r);printf(”The value of h is %.2f\n”, h);

}float count(float rate, int cnt)

{ float v;

v = cnt + (rate * cnt); printf(”The value of v is %.2f\n”, v);

return v; }

(a) State the scope of each of the identifiers w, r and v. [3 marks]

(b) Determine the output of the program above. [5 marks]

Answer(a)w is the global variables –The scope of global variable is global.r is the local variables – The scope of local variables is limited to the function in which it is defined.v is the local variables – The scope of local variables is limited to the function in which it is defined

(b)The value of v is 7.70 The value of w is 7.70 The value of v is 60.90 The value of h is 60.90

7. Write single C statement that :

a) Input integer variable X with scanf.b) Input integer variable Y with scanf.c) Initialize integer variable i to 1.d) Initialize integer variable POWER to 1.e) Multiply variable power by X and assign the result to POWER.f) Increment variable Y by 1.g) Test Y to see if it is less than or equal to X.h) Output integer variable POWER with printf.

[8 marks]

Answera) scanf(“%d”, &X); b) scanf(“%d”, &Y);c) i = 1;d) POWER = 1;e) POWER *= X;f) Y++;g) if(Y <= X)h) printf(“%d”, POWER);

6

Page 6: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

8. A bookshop manager updates information about the books in his shop. The information stored consists of the titles, qualities and prices of books. The books are arranged according to tittles to facilities the calculation of the value of the asset. The value of the asset is calculated by summing the product of the quantities and the prices of books. A constant value of LENGTH is the field size to store the title of a book and STOCK is the number of different tittles in the shop. The title, quantity and price of a book are stored in a data structure named struc BKSTOCK.a) Write define statements to declare LENGTH which has a value 50 and STOCK which has a value of 150.

[1 marks]b) Write struc BKSTOCK statement which contains the title, quantity and price of a book.

[2 marks]c) Write a statement to declare book of the type struc BKSTOCK.

[1 marks]d) Write a code segment in C which reads the title, quantity and price of a book. Calculate and print the total asset for

all the book titles in the shop.[6 marks]

Answera)#define LENGTH 50#define STOCK 150

b)struct BKSTOCK { char title[LENGTH]; int quantity; float price;};

c)struc BKSTOCK book[STOCK];

d)

9. An element in an array is referred to by the name of the array followed by a subscript. Thus, the first element of an array has a subscript zero.Write statement(s) in C to accomplish each of the following.a) Print the value of the eighth element of a one-dimensional character array A.

[1 marks]b) Read a value into the eleventh element of a one-dimensional floating point array B.

[1 marks]c) Initialise all the elements of a one-dimensional 10-element integer array C to 10.

[2 marks]d) Copy the elements of an array D into an array E, where each of the arrays is a one-dimensional 12-element integer

array.[2 marks]

e) Find and print the smallest and the largest values in a one-dimensional 30-element integer array F.[5 marks]

7

Page 7: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

Answera)printf(“%c”, A[7]);

b)scanf(“%f”,&B[10]);

c)for (i = 0; i < 10; i++) C[i] = 10;

d)for (j = 0; j < 12; j++) E[j] = D[j];

e)#include <stdio.h>

void main () { int F[30], i, SmallestValue, LargestValue;

for (i=0; i<30; i++) scanf ("%d",&F[i]);

SmallestValue = F[0]; for (i=1; i<30; i++) {

if(SmallestValue > F[i]) SmallestValue = F[i]; } LargestValue = F[0]; for (i=1; i<30; i++) {

if(LargestValue < F[i]) LargestValue = F[i]; } printf("SmallestValue : %d\n", SmallestValue); printf("LargestValue : %d\n", LargestValue);}

10. What does the following program print?

#include <stdio.h>void main(){ int x = 1, total = 0, y;

while (x <= 10) { y = x * x; printf(“%d\n”, y); total += y; ++x;}printf(“Total is %d\n”, total);}

[3 marks]

8

Page 8: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

Answer1 4 9 16 25 36 49 64 81 100 Total is 385

11. This is a C program to determine total bonus that would be received by an employee based on their duration of employment.

void main(){printf(“\nPlease enter employee’s total year of services :”);scanf(“%d”,&year);

if (year<10) bonus=1000else if (year<20) bonus=2000; else bonus=4000;printf(“\nTotal Bonus Received = %d”,bonus);}

a) Create a function prototype (returning a value) to determine total bonus that would be received by an employee. Name your function prototype as CalculateBonus. Pass the year to the function.

[2 marks]b) Write the function declaration.

[1 marks]c) Write the calling of function.

[1 marks]d) Rewrite the whole program complete with the function.

[3 marks]Answera)int CalculateBonus(int year) {

int bonus;

if (year<10) bonus=1000;

else if (year<20) bonus=2000; else bonus=4000;

return bonus; }

b)int CalculateBonus(int);

9

Page 9: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

c)TotalBonus = CalculateBonus(YearServive);

d)#include <stdio.h>

int CalculateBonus(int);int YearServive,TotalBonus;

void main() {

printf("\nPlease enter employee's total year of services :");scanf("%d",&YearServive);

TotalBonus = CalculateBonus(YearServive);printf("\nTotal Bonus Received = %d",TotalBonus); }

int CalculateBonus(int year) { int bonus;

if (year<10) bonus=1000;

else if (year<20) bonus=2000; else bonus=4000;

return bonus; }

12. Write the output for this program :

#include <stdio.h>

void main(void){ int sqrs[6];int i;

for(i=0; i<=5; i++)sqrs[i] = i*3;

for(i=0; i<=5; i++)printf("%d, %d\n", sqrs[i], sqrs[i]);

}[5 marks]

Answer0, 0 3, 3 6, 6 9, 9 12, 12 15, 15

10

Page 10: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

1. The concept of hypermedia is used to access information on the web. Explain two features of hypermedia. [4 marks]

Answeri. Hypermedia lets us add, access, and navigate links in textual and multimedia information. With this

hypermedia features, web applications can provide clearer information, and can be easier and more effective to use than traditional applications.

ii. Multiple methods of navigations, including hyperlinks. Navigation methods may include hyperlinks of words, images, menu, buttons, indexes, maps, tables of content, timelines, and word search functions. The navigation methods used are those that make sense for the content.

1. Konsep hipermedia digunakan untuk mengakses maklumat di laman web. Terangkan dua ciri-ciri hipermedia.

Jawapani. Hipermedia membolehkan kita menambah, mengakses, dan membuat pautan navigasi terhadap maklumat teks

dan multimedia. Ciri-ciri hipermedia ini membolehkan aplikasi web memberikan maklumat yang lebih jelas, lebih mudah dan lebih berkesan untuk digunakan berbanding dengan cara aplikasi tradisional.

ii. Kaedah pelbagai navigasi, termasuklah hiperpautan. Antara kaedah navigasi ini ialah hiperpautan terhadap perkataan, imej, menu, butang, indeks, peta, jadual kandungan, garis masa, dan fungsi carian perkataan. Kaedah navigasi yang digunakan adalah untuk sesiapa yang ingin mengetahui terhadap sesuatu kandungan.

2. a) Explain the concept of videoconferencing. [2 marks]

b) State three facilities needed to conduct videoconferencing. [3 marks]

Answera) A set of interactive telecommunication technologies which allow two or more two or more individuals in different

locations to interact via two-way video and audio transmissions simultaneously. b)

i. Computers with Internet network for the videoconferencing communications. ii. Webcam with microphone / PC Camera with microphone to interact via two-way video and audio

transmissions.iii. Speaker to hear videoconferencing sound.iv. Software for implementing videoconferencing.

2. a) Jelaskan konsep persidangan video.b) Nyatakan tiga kemudahan yang diperlukan untuk menjalankan persidangan video.

Jawapana) Satu set teknologi telekomunikasi yang interaktif dimana ianya membolehkan dua atau lebih individu di sesuatu lokasi yang berlainan untuk berinteraksi melalui video dan audio secara dua hala dan serentak. b)

i. Komputer dengan kemudahan rangkaian internet untuk melaksanakan komunikasi persidangan video.ii. “Webcam” dengan mikrofon/kamera PC dengan mikrofon untuk berinteraksi secara dua hala melalui paparan

video dan audio.iii. “Speaker” untuk mendengar bunyi semasa persidangan video.iv. Perisian untuk melaksanakan persidangan video.

3. After a system is installed, it needs to be maintained regularly during its operation. Explain three main activities in the maintenance phase.

[6 marks]AnswerCorrective maintenance – maintenance performed to repair an error in system design.Perfective maintenance – a system maintenance perform to improve a computer program.Preventive maintenance – a maintenance aimed at the prevention of future breakdowns and failures.

3. Selepas sistem dipasang, sistem tersebut perlu sentisa diselenggarakan sepanjang pengoperasiannya. Terangkan tiga aktiviti utama semasa fasa penyenggaraan.

JawapanPenyenggaraan pembetulan – penyenggaraan yang dijalankan untuk membaiki kesilapan dalam reka bentuk sistem.

11

Page 11: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

Penyenggaraan Sempurna - penyenggaraan sistem yang bertujuan meningkatkan kemampuan atur cara komputer.Penyenggaraan cegah - penyenggaraan yang bertujuan untuk mencegah kerosakan dan kegagalan sistem pada masa hadapan.

4. Give two reasons for system developers to involve users in a system development process. [4 marks]

Answeri. Users are people who use the system; so the users provide information about the detailed function and operations

needed in the system development process.ii. If the system is to be successful, the user must be included in all stages of system development; users are more apt

to accept the system if they involve to in a system development process.

4. Berikan dua sebab untuk seseorang pembina sistem melibatkan pengguna dalam proses pembangunan sistem.

Jawapani. Pengguna adalah merupakan orang yang menggunakan sistem; oleh itu pengguna dapat menyediakan maklumat

mengenai fungsi dan keperluan-keperluan operasi yang dikehendaki dalam proses pembangunan sistem.ii. Jika sesebuah sistem itu hendak berjaya, pengguna perlu dimasukkan ke dalam semua peringkat pembangunan

sistem; pengguna akan lebih cenderung untuk menerima sistem jika mereka dilibatkan dalam proses pembangunan sistem.

5. Describe the integrated components of a database system. [10 marks]

Answeri. Software

Software including DBMS, any networking software if network is used, operating system, application software (written either in C Language, Cobol, VBasic or any others SQL language) and others utility software.

ii. Hardware

Database system and the whole application need hardware to execute the software. Hardware may consist of personal computers or mainframe.

iii. DataData is the main component in the database system. It consists of raw data stored in the file system. Data is a product for the analysis of the organization, which includes entities, attributes and relationships. It also consists of a catalogue system containing data, such as names of authorised users to access a system.

iv. UserUser is the party that involved in the database system. Users can be divided into ordinary end users, upper level end users, programmers, system analysts and database managers.

v. Procedure

Procedure referred to rules and instruction; which explain the design and usage of a database. System users and system operators need the documentation on the procedure of using and operate the system.

5. Huraikan komponen-komponen bersepadu bagi sistem pangkalan data.

Jawapani. PerisianPerisian termasuklah DBMS, perisian untuk rangkaian jika rangkaian digunakan, sistem operasi, perisian aplikasi (ditulis sama ada dalam Bahasa C, Cobol, VBasic atau mana-mana orang lain SQL bahasa) dan lain-lain perisian utiliti. ii. PerkakasanSistem pangkalan data memerlukan perkakasan untuk melaksanakan perisian. Perkakasan boleh terdiri daripada komputer peribadi atau kerangka utama.

iii. DataData merupakan komponen utama dalam Sistem Pangkalan Data. Ia terdiri daripada data mentah yang disimpan dalam fail sistem. Data merupakan produk untuk di analisis sesebuah organisasi, yang meliputi entiti, atribut dan hubungan. Ia juga terdiri daripada sistem katalog yang mengandungi data, seperti nama pengguna yang disahkan untuk mengakses

12

Page 12: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

sesebuah sistem. iv. PenggunaPengguna adalah individu yang terlibat dalam sistem pangkalan data. Pengguna terdiri daripada pengguna akhir yang biasa, pengguna akhir peringkat atas, pengaturcara, penganalisis sistem dan pengurus pangkalan data. v. ProsedurProsedur merujuk kepada peraturan dan arahan; yang menerangkan tentang reka bentuk dan penggunaan pangkalan data. Pengguna sistem dan operator sistem memerlukan dokumentasi yang menerangkan tentang prosedur untuk menggunakan dan mengendalikan sistem.

6. A table is a representation for a relational database model. a) State four characteristics of a relation. [4

marks]b) Explain what is meant by a null value of a relational attribute. [1

marks]c) Explain the meaning and give one example of each of the following types of keys.

i. Candidate keyii. Primary keyiii. Foreign key

[6 marks]Answera)1. The order of columns (attributes) are irrelevant. This is because the columns are accessed by their names, not by

their relative positions in the table.2. The order of rows (tuples) are irrelevant. This is because the rows are accessed by unique key in each record, not by

their relative positions in the table.3. Each row in a table must have a unique key (called primary key) that identifies that record.4. Each column in a table must have a unique attribute name.5. Each relation (table) must have a unique identifier or name.

b) Null value – Entity may not have an applicable value for an attribute.

c)i. Candidate key – Attribute or a group of attributes that can be applied to identify every unique record in the

relation. ii. Primary key – Candidate key that is chosen to identify a unique record in a relation.

iii. Foreign key – Attribute or a group of attributes in a relation, which are similar to the candidate key of other relation.

Example: Customer relation

cus_no cus_name cus_ic register_date agentt_code41120 Ahmad 780922043091 12/11/02 A0141121 Samy 801130045099 13/01/02 A0541122 Loreine 771123045044 4/07/02 A03

Candidate key : cus_no, cus_icPrimary key : cus_noForeign key : agentt_code

6. Jadual merupakan perwakilan bagi model pangkalan data hubungan.a) Nyatakan empat ciri hubungan. b) Jelaskan apa yang dimaksudkan dengan nilai nol bagi suatu atribut hubungan. c) Jelaskankan makna dan berikan satu contoh bagi setiap jenis berikut kunci.

i. kekunci calonii. kunci primer

iii. kunci asing

Jawapana)1. Susunan lajur (atribut-atribut) adalah tidak relevan. Ini adalah kerana lajur diakses berdasarkan nama lajur, bukan

13

Page 13: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

berdasarkan kedudukan relatif lajur dalam sesebuah jadual.2. Susunan baris (“tuples”) adalah tidak relevan. Ini adalah kerana baris diakses berdasarkan kekunci unik dalam

setiap rekod, bukan berdasarkan kedudukan relatif dalam sesebuah jadual.3. Setiap baris dalam jadual mesti mempunyai satu kekunci unik (dipanggil kunci primer) yang mengenalpasti

sesuatu rekod itu.4. Setiap lajur dalam sesebuah jadual mesti mempunyai nama atribut yang unik.5. Setiap perhubungan (jadual) mesti mempunyai pengenalan atau nama yang unik.

b) Nilai nol - Entiti yang tiada nilai untuk diguna pakai oleh sesuatu atribut.

c)

i. Kekunci calon - Atribut atau sekumpulan atribut yang boleh digunakan untuk mengenal pasti setiap rekod unik dalam suatu hubungan.

ii. Kekunci primer – Kekunci calon yang dipilih untuk mengenal pasti rekod unik dalam suatu hubungan.iii. Kekunci asing - Atribut atau sekumpulan atribut dalam suatu hubungan, yang sama dengan kekunci calon

hubungan lain.

Contoh: Customer relation

cus_no cus_name cus_ic register_date agentt_code41120 Ahmad 780922043091 12/11/02 A0141121 Samy 801130045099 13/01/02 A0541122 Loreine 771123045044 4/07/02 A03

Kekunci calon : cus_no, cus_icKekunci primer: cus_noKekunci asing: agentt_code

7. A database system of a college has two relational tables. namely STUDENT and ADVISOR as follows:

Write SQL expressions for the following queries.

(a) Create a table for STUDENT. [3 marks]

(b) List the information about the advisor with room number B211. [3 marks]

14

Page 14: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

(c) Delete the information about the students with CGPA more than 2.50. [3 marks]

(d) List the names of students under Jasmine Kaur. [3 marks]Answera) CREATE TABLE STUDENT ( StudentNum CHAR(8) NOT NULL UNIQUE StudentName VARCHAR(25) CGPA DECIMAL(4,2) StuffNum CHAR(3) );

b) SELECT * FROM ADVISOR WHERE RoomNum = “B211”;

c) DELETE FROM STUDENT WHERE CGPA > 2.50;

d) SELECT StudentName FROM STUDENT WHERE StaffNum = “333”;

8. Explain the meaning of information, and state four characteristics of useful information. [5 marks]

AnswerInformation – Processed data that conveys meaning and it useful to people.Characteristic of useful information :

1. Accurate information2. Verifiable information3. Timely information4. Organised information5. Accessible information6. Useful information7. Cost-effective information

8. Jelaskankan maksud maklumat, dan nyatakan empat ciri maklumat yang berguna.

JawapanMaklumat - data yang telah diproses; dapat memberikan makna tertentu dan berguna kepada individu.

Ciri-ciri maklumat yang berguna:1. maklumat yang tepat2. maklumat yang sah3. maklumat yang menepati masa4. maklumat yang tersusun5. maklumat yang boleh dicapai.6. maklumat yang berguna7. maklumat yang kosnya adalah efektif

9. The relation EMPLOYEE has 13 attributes: EmployeeNo, EmployeeName, EmployeeBirthDate, Street, City, DepartmentNo, DepartmentName, CompanvName, CompanyAddress, Salary, ManagerName, DependantID and DependantName.

Assume that an employee can have more than one dependant. The functional dependencies of EMPLOYEE are shown below.EmployeeNo EmployeeName, EmployeeBirthDate, Street, City, DepartmentNo,

DepartmentName, CompanyName, CompanyAddress, Salary, ManagerName, DependantID, DependantName

15

Page 15: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

DepartmentNo DepartmentName, ManagerName

CompanyName Company AddressDependantID DependantName

a) State the normal form of EMPLOYEE. Give a reason for your answer. [3 marks]

b) If EMPLYEE is not in 3NF, normalize it to 3NF and show all the normalised relations. [5 marks]

c) State three problems of unnormalised relations. [3 marks]

Answera) EMPLOYEE (EmployeeNo, EmployeeName, EmployeeBirthDate, Street, City, DepartmentNo, DepartmentName, CompanyName, CompanyAddress, Salary, ManagerName, DependantID, DependantName)DEPARTMENT (DepartmentNo, DepartmentName, ManagerName)COMPANY (CompanyName, CompanyAddress)DEPENDENT(DependantID, DependantName)

EMPLOYEE relational table is a complex table data structures. So, this relational table must be converted into simpler and stable data structures.

b)

c) Three problems of unnormalised relations :1. More data redundancy in database.2. Some data that used in database are not consistent.3. Not all the attributes in relation will be functionally dependent on the primary key.

9. a) Jadual hubungan EMPLOYEE merupakan jadual struktur data yang kompleks. Jadi, jadual hubungan ini perlu ditukarkan kepada struktur data yang lebih mudah dan stabil.

c) Tiga masalah hubungan yang tidak dinormalkan ialah :1. Terdapat banyak data sama yang berulangan dalam pangkalan data.2. Beberapa data yang digunakan dalam pangkalan data adalah tidak konsisten.3. Tidak semua atribut dalam hubungan akan berfungsi dengan bergantung kepada kekunci primer.

10. The preliminary investigation is an activity in the planning phase of the systems development life cycle (SDLC).

a) State a purpose of the preliminary investigation. [2 mark]

b) List three tasks involved in the preliminary investigation. [3 mark]

c) Give an outcome of the preliminary investigation. [2 mark]

Answer

16

Page 16: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

a) Preliminary investigation – Some time called feasibility study; is an investigation by the systems analyst to analyze and evaluate the current system and determine if the current system needs enhancement or replacement.

b)i) Document review

The systems analyst can review documents to find out how the current system is designed and how it is supposed to operate.

ii) InterviewSystems analysts interview managers, employees, customers, suppliers, and other people to gather information about business processes and problems and to collect ideas and suggestions for system improvement.

iii) QuestionnaireThe systems analyst can collect information from a large group of people using a questionnaire.

iv) ObservationThe systems analyst can watch an employee perform a task, or see how people interact with one another, or observe whether procedures work as expected.

c) An outcome of the preliminary investigation is systems analyst present the feasibility report; contains introduction, existing system, benefit of a new or modified system, feasibility of a new or modified system, and the recommendation.

10. Penyiasatan awal adalah merupakan satu aktiviti dalam fasa perancangan Kitaran Hayat Pembangunan Sistem (SDLC).a) Nyatakan tujuan penyiasatan awal. b) Senaraikan tiga tugas yang terlibat dalam penyiasatan awal.c) Berikan satu hasil daripapa penyiasatan awal.

JawapanPenyiasatan awal – disebut juga sebagai kajian ketersauran; merupakan penyiasatan oleh juruanalisis sistem untuk menganalisis dan menilai sistem semasa dan menentukan sama ada sistem semasa perlu dipertingkatkan keupayaannya atau perlukan penggantian sistem yang baru. b)i) Dokumen kajian semula Juruanalisis sistem menyemak dokumen-dokumen untuk mengetahui bagaimana sistem semasa direka bentuk dan bagaimana ia sepatutnya beroperasi.

ii) TemudugaJuruanalisis sistem menemuduga atau mewawancara pengurus, pekerja, pelanggan, pembekal, dan individu-individu yang terlibat dalam mengumpul maklumat tentang proses-proses perniagaan dan masalah-masalah serta untuk mengumpul idea-idea dan pendapat-pendapat bagi penambahbaikan sistem.

iii) Soal SelidikJuruanalisis sistem mengumpul maklumat daripada sekumpulan besar individu dengan mengemukakan soalan-soalan soal selidik.

iv) PemantauanJuruanalisis sistem boleh memanatau pekerja melaksanakan tugas, atau melihat bagaimana individu berinteraksi antara satu sama lain, atau memerhatikan sama ada prosedur kerja yang dilaksanakan adalah seperti yang diharapkan.

c) Hasil daripada penyiasatan awal, juruanalisis sistem membentangkan laporan ketersauran; yang mengandungi pengenalan, sistem yang sedia ada, faedah yang diperolehi daripada sistem yang baru atau yang diubahsuai, ketersauran sistem yang baru atau yang diubahsuai, dan mengemukakan cadangan.

17

Page 17: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

11. A company which sells various products carries out its operations based on the following business rules.

Construct an entity-relationship (E-R) diagram to represent the operations of the company as follows:

a) Draw all the entities with their attributes, and underline the primary key attribute for each entity. [5 marks]

b) Indicate the relationships between all the entities. [2 marks]

c) Indicate the cardinalities of all the relationships. [2 marks]

18

Page 18: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

12. A soft drink company wishes to offer an advertisement project to a few advertising companies. Bids from advertising companies would be evaluated according to the following conditions.

If the value of the advertisement project is less than RM 25,000 and the client has a good credit record, the bid will be accepted without a deposit. If the value of the project is less than RM 25,000 and the client does not have a good credit record, the bid will be accepted with a deposit.

If the value of’ the project RM 25,000 and above and the client has a good credit record, the hid will he accepted with a deposit. If the value of the project is RM 25,000 and above and the client does not have a good credit record, the bid will be rejected.

a) What is a decision table? Explain the use of a decision table in the analysis phase. [2 marks]

b) Construct a decision table based on the information above. [4 marks]

Answera) Decision table – Table that lists a variety of conditions and the actions that correspond to each condition.

In the analysis phase, the system analyst may use a decision table to show the detail process of new system that consists of many condition or rules.

b)

Rules1 2 3 4

Conditions Project < RM 25 000? Y Y N NGood Credit Record? Y N Y N

Actions Accepted without deposit Accepted with deposit Will be rejected

12. Sebuah syarikat minuman ringan ingin menawarkan projek pengiklanan kepada beberapa syarikat pengiklanan. Tawaran dari syarikat-syarikat pengiklanan akan dinilai mengikut syarat berikut.

Sekiranya nilai projek pengiklanan kurang daripada RM 25,000 dan pelanggan yang mempunyai rekod kredit yang baik, tawaran akan diterima tanpa deposit. Sekiranya nilai projek itu kurang daripada RM 25,000 dan pelanggan tidak mempunyai rekod kredit yang baik, tawaran itu akan diterima dengan deposit.

Sekiranya nilai projek ialah RM 25,000 dan ke atas dan pelanggan yang mempunyai rekod kredit yang baik, tawaran akan diterima dengan deposit. Sekiranya nilai projek RM 25,000 dan ke atas dan pelanggan tidak mempunyai rekod kredit yang baik, tawaran akan ditolak.

a) Apakah jadual keputusan? jelaskan penggunaan jadual keputusan dalam fasa analisis.b) Bina satu jadual keputusan berdasarkan maklumat di atas.

Jawapana) Jadual Keputusan – jadual yang menyenaraikan pelbagai keadaan dan tindakan yang sesuai dengan setiap keadaan tersebut.Dalam fasa analisis, juruanalisis sistem boleh menggunakan jadual keputusan untuk menunjukkan proses sistem baru secara terperinci yang terdiri daripada banyak syarat atau peraturan-peraturan.

19

Page 19: xa.yimg.comxa.yimg.com/kq/groups/23264685/929195129/name/Pa… · Web viewxa.yimg.com

20


Recommended