2 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. ii. iii. Sending device – Device that initiates instruction to transmit data, instructions, or information. Communications channel – Device transmission media on which data, instructions, or information travel. 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 3 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. Jawapan a) i. Peranti penghantar ii. Saluran komunikasi iii. 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 bintang iii. Topologi gelang 2. a) Explain what is meant by the terms virus, worm and trojan horse in the context of computer security risk. b) State the difference between system software and application software. [3 marks] [2 marks] Answer a) 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. Jawapan a) 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. 4 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] Answer a) 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 Recognition iii. Hand Geometry Scanning iv. Iris Scanning v. Retinal Scanning vi. Voice Recognition vii. 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 jari ii. Pengecaman wajah iii. Pengimbas geometri tangan iv. Pengimbas iris v. Pengimbas retina vi. Pengecaman suara vii. 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); i. ii. iii. /* 1 */ Determine the value p. [2 marks] Determine the values of the formal parameters X, Y and Z when the function smallest is called in the line labelled /* 1 */. [3 marks] Determine the value of q. [2 marks] 5 Answer a) int smallest(int X, int Y, int Z) int smallest_value; if(X<Y) { if X<Z) smallest_value else smallest_value } else { if (Y<Z) smallest_value else smallest_value } return smallest_value; } b) i) p p p p = = = = { = X; = Z; = Y; = Z; smallest(a–2 , b+1, c+50) smallest(41-2,75+1, 30+50) smallest(39, 76, 80) 39 ii) (a-c, b-c, c) (41-30, 75-30, 30) (11, 45, 30) x=11, y = 45, z = 30 iii) q = = = q = 5. p + smallest(11, 45, 30) p + 11 39 + 11 50 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; 6 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. (b) Determine the output of the program above. [3 marks] [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 The The The 7. value value value value of of of of v w v h is is is is 7.70 7.70 60.90 60.90 Write single C statement that : a) b) c) d) e) f) g) h) Input integer variable X with scanf. Input integer variable Y with scanf. Initialize integer variable i to 1. Initialize integer variable POWER to 1. Multiply variable power by X and assign the result to POWER. Increment variable Y by 1. Test Y to see if it is less than or equal to X. Output integer variable POWER with printf. [8 marks] Answer a) 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); 7 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] Answer a) #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. c) Initialise all the elements of a one-dimensional 10-element integer array C to 10. [1 marks] [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] 8 Answer a) 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] 9 Answer 1 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=1000 else if (year<20) bonus=2000; else bonus=4000; printf(“\nTotal Bonus Received = %d”,bonus); } a) b) c) d) 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] Write the function declaration. [1 marks] Write the calling of function. [1 marks] Rewrite the whole program complete with the function. [3 marks] Answer a) 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); { 10 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] Answer 0, 0 3, 3 6, 6 9, 9 12, 12 15, 15 11 1. The concept of hypermedia is used to access information on the web. Explain two features of hypermedia. [4 marks] Answer i. 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. Jawapan i. 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] Answer a) 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) b) Jelaskan konsep persidangan video. Nyatakan tiga kemudahan yang diperlukan untuk menjalankan persidangan video. Jawapan a) 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] Answer Corrective 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. Jawapan Penyenggaraan pembetulan – penyenggaraan yang dijalankan untuk membaiki kesilapan dalam reka bentuk sistem. Penyenggaraan Sempurna - penyenggaraan sistem yang bertujuan meningkatkan kemampuan atur cara komputer. 12 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] Answer i. 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. Jawapan i. 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] Answer i. 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. Data Data 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. User User 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. 5. 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. Huraikan komponen-komponen bersepadu bagi sistem pangkalan data. Jawapan i. Perisian Perisian 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. Perkakasan Sistem pangkalan data memerlukan perkakasan untuk melaksanakan perisian. Perkakasan boleh terdiri daripada komputer peribadi atau kerangka utama. iii. Data Data 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 sesebuah sistem. 13 iv. Pengguna Pengguna 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. Prosedur Prosedur 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. marks] b) Explain what is meant by a null value of a relational attribute. marks] c) Explain the meaning and give one example of each of the following types of keys. i. Candidate key ii. Primary key iii. Foreign key [4 [1 [6 marks] Answer a) 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. ii. iii. Candidate key – Attribute or a group of attributes that can be applied to identify every unique record in the relation. Primary key – Candidate key that is chosen to identify a unique record in a relation. 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 41120 Ahmad 41121 Samy 41122 Loreine cus_ic 780922043091 801130045099 771123045044 register_date 12/11/02 13/01/02 4/07/02 agentt_code A01 A05 A03 Candidate key : cus_no, cus_ic Primary key : cus_no Foreign 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 calon ii. kunci primer iii. kunci asing Jawapan a) 1. Susunan lajur (atribut-atribut) adalah tidak relevan. Ini adalah kerana lajur diakses berdasarkan nama lajur, bukan berdasarkan kedudukan relatif lajur dalam sesebuah jadual. 2. Susunan baris (“tuples”) adalah tidak relevan. Ini adalah kerana baris diakses berdasarkan kekunci unik dalam 14 3. 4. 5. setiap rekod, bukan berdasarkan kedudukan relatif dalam sesebuah jadual. Setiap baris dalam jadual mesti mempunyai satu kekunci unik (dipanggil kunci primer) yang mengenalpasti sesuatu rekod itu. Setiap lajur dalam sesebuah jadual mesti mempunyai nama atribut yang unik. 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 41120 Ahmad 41121 Samy 41122 Loreine cus_ic 780922043091 801130045099 771123045044 register_date 12/11/02 13/01/02 4/07/02 agentt_code A01 A05 A03 Kekunci calon : cus_no, cus_ic Kekunci primer: cus_no Kekunci 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] (c) [3 marks] Delete the information about the students with CGPA more than 2.50. 15 (d) List the names of students under Jasmine Kaur. Answer a) CREATE TABLE STUDENT ( StudentNum CHAR(8) NOT NULL StudentName VARCHAR(25) CGPA DECIMAL(4,2) StuffNum CHAR(3) ); 8. b) SELECT * FROM ADVISOR WHERE RoomNum = “B211”; c) DELETE FROM STUDENT WHERE CGPA > 2.50; d) SELECT StudentName FROM STUDENT WHERE StaffNum = “333”; [3 marks] UNIQUE Explain the meaning of information, and state four characteristics of useful information. [5 marks] Answer Information – Processed data that conveys meaning and it useful to people. Characteristic of useful information : 1. Accurate information 2. Verifiable information 3. Timely information 4. Organised information 5. Accessible information 6. Useful information 7. Cost-effective information 8. Jelaskankan maksud maklumat, dan nyatakan empat ciri maklumat yang berguna. Jawapan Maklumat - data yang telah diproses; dapat memberikan makna tertentu dan berguna kepada individu. Ciri-ciri maklumat yang berguna: 1. maklumat yang tepat 2. maklumat yang sah 3. maklumat yang menepati masa 4. maklumat yang tersusun 5. maklumat yang boleh dicapai. 6. maklumat yang berguna 7. 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 DepartmentNo DepartmentName, ManagerName 16 CompanyName Company Address DependantID DependantName a) State the normal form of EMPLOYEE. Give a reason for your answer. b) If EMPLYEE is not in 3NF, normalize it to 3NF and show all the normalised relations. c) State three problems of unnormalised relations. [3 marks] [5 marks] [3 marks] Answer a) 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 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. 17 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) Interview Systems 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) Questionnaire The systems analyst can collect information from a large group of people using a questionnaire. iv) Observation The 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. Jawapan Penyiasatan 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) Temuduga Juruanalisis 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 Selidik Juruanalisis sistem mengumpul maklumat daripada sekumpulan besar individu dengan mengemukakan soalan-soalan soal selidik. iv) Pemantauan Juruanalisis 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. 18 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. b) Indicate the relationships between all the entities. c) Indicate the cardinalities of all the relationships. [5 marks] [2 marks] [2 marks] 19 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. b) Construct a decision table based on the information above. [2 marks] [4 marks] Answer a) 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) Rules Conditions Actions 12. Project < RM 25 000? Good Credit Record? Accepted without deposit Accepted with deposit Will be rejected 1 Y Y 2 Y N 3 N Y 4 N N 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. Jawapan a) 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. 20