MULTIMEDIA COLLEGE JALAN GURNEY KIRI 54100 KUALA LUMPUR FOURTH & FIFTH SEMESTER EXAMINATION, 2011 SESSION DMBW-E-F-3/10, DMBW-E-F-2/10, DMBW-E-F-1/10, DMTW-E-F-2/10, DMTW-E-F-1/10, DMTQ-E-F-1/10 ISD2023 DATABASE MANAGEMENT SYSTEM AISYA SALIMAH CHE ABDUL RAHIM / NUR ETYNA TAWIL 25 NOVEMBER 2011 2.45 PM 5.15 PM (2 ½ Hours) INSTRUCTION TO STUDENT 1. This Examination paper has SIXTEEN (16) printed pages. 2. This question paper consists of THREE (3) sections. Section A : Answer ALL questions. Section B : Answer ALL questions. Section C : Answer ALL questions 3. Please write all your answers in the Answer Booklet provided.
PERATURAN PEPERIKSAAN KOLEJ MULTIMEDIA PENYELEWENGAN AKADEMIK 1. Pelajar tidak boleh melakukan mana-mana penyelewengan di bidang akademik seperti berikut atau sebarang arahan peperiksaan yang dikeluarkan oleh Ketua Pengawas Peperiksaan. HUKUMAN 1.1 Pelajar yang meniru hasil kerja orang lain atau tidak mengiktiraf kerja orang lain (plagiat) untuk tujuan tugasan atau ujian akan dikenakan tindakan tatatertib. 1.2 Pelajar juga tidak dibenarkan bersubahat dalam peniruan atau penipuan yang dinyatakan dalam para 1.1. 1.3 Pelajar perlu juga mematuhi peraturan lain mengenai penilaian yang dinyatakan secara lisan atau bertulis. 1. Sekiranya pelajar didapati telah melakukan pelanggaran mana-mana daripada peraturan peperiksaan ini, setelah dibicara dan sabit kesalahannya, maka Jawatankuasa Disiplin Pelajar boleh mengambil tindakan dari mana-mana satu, atau apa-apa kombinasi yang sesuai dari dua atau lebih hukuman-hukuman berikut:- (a) amaran (b) denda tidak melebihi RM 500 (c) (d) (e) memberi markah '0' kepada peperiksaan akhir bagi mata pelajaran berkenaan atau memberi markah sifar '0' bagi keseluruhan keputusan peperiksaan mata pelajaran yang berkenaan (termasuk kerja kursus) menggantung pengajian pelajar selama tempoh yang difikirkan patut oleh Jawatankuasa Disiplin lain-lain hukuman yang akan ditetapkan oleh Jawatankuasa Disiplin Pelajar Kolej 2. Pelajar yang melanggar peraturan juga boleh diambil tindakan tatatertib mengikut peruntukan yang terdapat dalam Peraturan & Tatatertib Pelajar, Kolej Multimedia, 2000. Dikeluarkan oleh Unit Peperiksaan & Rekod Pelajar, Kolej Multimedia Kuala Lumpur, Julai 2001 ASCAR/NET Page 2 of 16
BAHAGIAN A : SOALAN OBJEKTIF (20 MARKAH) SECTION A : OBJECTIVE QUESTION (20 MARKS) ARAHAN : JAWAB SEMUA SOALAN DIRECTION : ANSWER ALL QUESTIONS 1. Atribut terbitan adalah seperti. A derived attribute can be. A. Nama seorang pekerja/an employee s name B. Tarikh lahir seorang pekerja / An employee s birth date C. Umur seorang pekerja /An employee s age D. Gaji seorang pekerja / An employee s salary 2. Berikut adalah contoh Sistem Pengurusan Pengkalan Data kecuali :- The following below are the example of Database Management System (DBMS) except:- A. Java B. Microsoft SQL Server C. MS Access D. MySQL 3. Pilihkan atribut yang boleh menjadi atribut berbilang bilai. Choose the attribute that can be the multi-valued attribute. A. Jantina / Gender B. Age / Umur C. Nombor telefon / telephone number D. Tempat lahir / Place of birth ASCAR/NET Page 3 of 16
4. Jika seorang pensyarah boleh mengajar banyak subjek, dan sesuatu subjek juga boleh diajar oleh beberapa pensyarah. Apakah jenis perhubungan kejadian ini? If a teacher may teaches many subjects, and a subject may taught by many teachers too. This is an example of which type of relationship? A. Satu-ke-satu / One-to-one B. Satu-ke-banyak / One-to-many C. Banyak-ke-banyak / Many-to-many D. Tiada di atas / None of the above 5. adalah perhubungan yang berlaku serentak di antara tiga entity. is the type of the relationship which involved 3 entities. A. Perhubungan unari / Unary relationship B. Perhubungan binari / Binary relationship C. Perhubungan ternary / Ternary relationship D. Tiada satu pun yang di atas / None of the above 6. Hubungan perduaan wujud apabila entity berhubung A binary relationship exists when entities are associated. A. 1 B. 2 C. 3 D. 4 7. Siapa yang mempunyai kuasa untuk mengawal tahap penggunaan pengguna dalam sesuatu pangkalan data? Who have the authority to control the access authorization of user in a database? A. Pentadbir Pangkalan Data / Database Administrator (DBA) B. Pengaturcara aplikasi / Application Programmer C. Pengguna akhir / End User D. Perekabentuk Pangkalan Data / Database Designer ASCAR/NET Page 4 of 16
8. Penormalan dapat menyelesaikan anomali yang berikut kecuali: Normalization can solve the following anomaly except: A. Tambah anomali / Insertion anomaly B. Hapus anomali / Deletion anomaly C. Tukar anomali / Modification anomaly D. Tiada satu pun yang di atas / None of the above 9. Yang manakah di antara yang berikut tidak merupakan perkataan reserved dalam SQL? Below are the Reserved Words in SQL Except: A. ACCEPT B. SELECT C. VALUES D. DELETE 10. Pilih empat arahan asas dalam manipulasi data. Choose the four basic data manipulation commands. i. INSERT ii. CREATE iii. UPDATE iv. DELETE v. LCASE vi. DROP vii. SELECT A. i, ii, iii, iv B. iv, v, vi, vii C. i, iii, vi, vii D. i, iii, iv, vii ASCAR/NET Page 5 of 16
11. Arahan SQL untuk memasukkan nilai ke dalam jadual CUSTOMER adalah: The command to insert the value to the table 'CUSTOMER' is: A. CREATE CUSTOMER. B. INSERT INTO CUSTOMER C. UPDATE CUSTOMER D. DROP FROM CUSTOMER 12. Kunci utama yang mengandungi lebih daripada satu medan dikenali sebagai kunci. A primary key that consists of more than one field is called a key. A. Komposit / Composite B. Menengah / Secondary C. Asing / Foreign D. Unik / Unique 13. Dalam bentuk penormalan, sebarang sandaran transitif perlu dikeluarkan. In normal form, any transitive dependencies have been removed. A. Tidak Normal / Unnormalized B. Pertama / First C. Kedua / Second D. Ketiga / Third ASCAR/NET Page 6 of 16
13. Apakah maksud arahan SQL di bawah? What does the following SQL statement do? SELECT * FROM Customer WHERE Cust_Type = "Best"; A. Pilih semua medan dari jadual Customer di mana Cust_Type adalah Best / Select all fields from the Customer table for each row with the Cust_Type "Best". B. Pilih semua medan dari jadual Customer di mana Cust_Type adalah * / Select all fields from the Customer table for each row with the Cust_Type "*". C. Pilih medan * dari jadual Customer yang dilabel Best / Select the "*" field from the Customer table for each row with a customer labeled "best". D. Pilih semua medan yang mempunyai * dari jadual Customer / Select all fields with a "*" in them from the Customer table 14. Aplikasi data pangkalan yang boleh digunakan oleh seorang penguna pada satu masa yang sama adalah contoh. An application where only one user accesses the database at a given time is an example of a(n). A. Single-user database application B. Multi-user database application C. E-commerce database application D. Workgroup database application 15. BETWEEN adalah operator istimewa di dalam SQL untuk BETWEEN is the special operator in SQL to A. mendefinisikan julat had / define range limits. B. menyemak samada atribut mempunyai nilai / check whether an attribute has a value. C. menyemak samada nilai atribut adalah null / check whether an attribute value is null D. menyemak retetan perkataan yang sama / check for similar character strings. ASCAR/NET Page 7 of 16
16. Yang manakah adalah arahan untuk memadamkan jadual Employee daripada Pangkalan Data? Which is the command to delete table Employee from the Database? A. DROP EMPLOYEE; B. DELETE TABLE EMPLOYEE; C. DROP TABLE EMPLOYEE; D. DELETE EMPLOYEE; 17. Nilai tarikh paling sesuai dikelaskan sebagai jenis data apa? A date value is best classified as which data type? A. NUMERIC B. DATE C. INT D. CHAR 18. Di dalam Model Chen, perhubungan digambarkan dengan bentuk: In Chen Model, relationship is represented by: A. Square B. Oval C. Rectangle D. Diamond 19. Arahan digunakan untuk menyemak samada nilai atribut adalah tiada nilai. command used to check whether an attribute has no value. A. UPDATE B. VALUE C. NO VALUE D. IS NULL ASCAR/NET Page 8 of 16
20. Arahan yang manakah yang digunakan untuk menyimpan secara kekal kandungan data yang berubah? Which command is used to permanently save data changes? A. ROLLBACK B. COMMIT C. SAVE D. RESTORE ASCAR/NET Page 9 of 16
BAHAGIAN B : SOALAN BETUL ATAU SALAH (10 markah) PART B : TRUE OR FALSE QUESTIONS (10 marks) ARAHAN : Jawab SEMUA soalan. INSTRUCTIONS : Answer ALL questions 1. DMBS mengurangkan ketidakselarasan data jika berbanding dengan konsep fail biasa. DBMS reduces the probability of inconsistent data if compared with File Processing Approach. 2. Penormalan meningkatkan data lewah dalam sesuatu pangkalan data. Normalization increases the data duplication in a database. 3. Untuk mengekalkan entity integrity, nilai null dibenarkan dalam kunci utama. To maintain entity integrity, a null value is permitted in the primary key. 4. Jika data telah dalam bentuk penormalan ketiga, dengan secara langsungnya data tersebut adalah dalam bentuk penormalan pertama dan bentuk penormalan kedua. If data is in the third normal form, it is automatically in the first and second normal forms. 5. Simbol entiti dalam ERD Chen s Model ialah segi empat tepat, manakala simbol entity dalam ERD Crow s Foot Model diwakili dengan symbol bulatan. An entity is represented in the ERD by a rectangle for Chen s Model, but an entity is represented by a round shape for the Crow s Foot Model. 6. EMPLOYEE1 (Emp_ID, Name, Dept, Salary) menjelaskan bahawa terdapat empat lajur dalam satu jadual. EMPLOYEE1 (Emp_ID, Name, Dept, Salary) describes one table with four columns. 7. Pangkalan data teragih adalah kumpulan data yang dihubungkan secara logical tetapi disimpan secara fizikal pada lokasi yang berbeza dalam rangkaian. Distributed database stores logically related data at several independent sites connected via a computer network. ASCAR/NET Page 10 of 16
8. SQL merupakan satu bahasa pengaturcaraan. SQL is a programming language. 9. Arahan DML diguna dalam tarifan data sesuatu pangkalan data. The DML commands are used to define a database. 10. Gunakan arahan ROLLBACK untuk menyimpan penambahan, perubahan dan penghapusan yang dilakukan kepada kandungan jadual. Use the ROLLBACK command to save additions, changes, and deletions made in the table contents. ASCAR/NET Page 11 of 16
BAHAGIAN C : SOALAN PENDEK (70 markah) PART C : SHORT QUESTIONS (70 marks) ARAHAN : Jawab SEMUA soalan. INSTRUCTION : Answer ALL questions. Soalan / Question 1 Berikan definisi bagi perkataan di bawah: Give the definition to terms below: a) Peraturan Integriti Entiti / entity integrity rule b) Peraturan Integriti Rujukan / referential integrity rule c) Bentuk penormalan pertama / First Normal Form (1NF) d) Entiti lemah / Weak entity e) Metadata / Metadata (10 markah /marks) Soalan / Question 2 a) Berikan dua (2) keburukan konsep fail biasa. Give two disadvantages associated with file-based concept. (4 markah /marks) b) Apakah definisi DDL dan nyatakan dua contoh arahan DDL. What is the definition of DDL and give two examples of DDL commands. (3 markah /marks) c) Apakah definisi DML dan nyatakan dua contoh arahan DML. What is the definition of DML and give two examples of DML commands. (3 markah /marks) ASCAR/NET Page 12 of 16
Soalan / Question 3 Diberi business rules berikut, hasilkan gambarajah ER Chen s Model untuk setiap hubungan berikut. Given the following business rules, create Chen s Model ER diagram for each of the specified relationships. a) Setiap artist mempersembahkan banyak lagu dan satu lagu juga boleh dipersembahkan oleh beberapa artist. Each artist performs many songs and each song can performed by few artists. (3 markah /marks) b) Setiap agen boleh mempunyai banyak pelanggan manakala setiap pelanggan hanya ada satu agen. One agent can have many customers but each customer has only one agent. (3 markah /marks) c) Merujuk kepada ER Crow s Foot model yang di bawah, tuliskan business rules yang berkaitan antara Professor, Class dan Student. Refer to the Crow s Foot model ERD below, write out the business rules that governs the relationship amongst Professor, Class and Student. (4 markah /marks) ASCAR/NET Page 13 of 16
Soalan / Question 4 Merujuk kepada jadual UNF yang di bawah, tukarkan perhubungan ini kepada NF yang berkenaan. Refer to the UNF table below, convert them to the specify NF. Stud_ID Stud_Name Tel Program Course Couse_Name Lecturer Lec_room Gred 1001 Ali 1234 DIT IT101 IS102 Intro to IT Info System Azizah Valentine 501 502 A B 1002 Siti 1357 DMG MM100 MT104 Multimedia Mathematics Anthony Wong 501 503 B C a) Daripada UNF di atas, hasilkan jadual yang dalam bentuk penormalan pertama. Refer to the UNF above, create a table that is in First NormalForm (1NF). (6 markah / marks) b) Tukarkan perhubungan ini ke bentuk penormalan kedua, Convert this relationship to Second Normal Form (2NF). (Hint: No need to show every single attribute value in the table, just show the answer in relation diagram, create a table called Regisitration if necessary to show the grade of the student.) Student_Grade (Stud_ID, Stud_Name, Tel, Program, Course, Course_Name, Lecturer, Lec_room, Gred) (6 markah / marks) c) Tukarkan jawapan dari bahagian (b) ke bentuk penormalan ketiga. From your answer in question (b), convert them to Third Normal Form (3NF). (8 markah / marks) ASCAR/NET Page 14 of 16
Soalan / Question 5 Rujuk kepada jadual berikut: Refer to the table below: a) Tuliskan arahan SQL untuk memaparkan hanya maklumat Student_ID, Student_Name, Student_Prog dan LOAN daripada jadual Student yang di atas. Write the SQL command to show only Student_ID, Student_Name, Student_Prog and LOAN from the above table called Student. (5 markah / marks) b) Tuliskan arahan SQL untuk memasukkan maklumat baris yang pertama iaitu maklumat Ali ke dalam jadual Student. Write the SQL command to insert the details of first row (Ali s details) into the Student table. (5 markah / marks) c) Tuliskan arahan SQL untuk menyimpan maklumat jadual Student. Write the SQL code that will save the STUDENT table. (2 markah / marks) d) Tunjukkan hasil yang dipaparkan selepas arahan SQL yang di bawah dilaksanakan. Show the table how the output is after the following SQL command is been executed? SELECT COUNT(LOAN) As MARA FROM Student WHERE LOAN="MARA"; (2 markah / marks) ASCAR/NET Page 15 of 16
e) Tuliskan arahan SQL untuk mengemaskinikan maklumat Stud_ID 1004 di mana status LOAN Fatimah adalah Yayasan. Write the SQL statement to update Stud_ID 1004 (Fatimah) s LOAN status as Yayasan. (5 markah / marks) f) Tuliskan kod SQL yang akan mengembalikan data kepada status asalnya, di mana jadual tersebut mesti mengandungi data yang wujud sebelum perubahan yang anda telah lakukan di dalam (e). Write the SQL code that will restore the data to its original status; that is, the table should contain the data that existed before you made the changes in (e). (1 markah / marks) End of page ASCAR/NET Page 16 of 16