DIPLOMA IN INFORMATION SYSTEM & COMPUTER SCIENCE Mid Semester Test IT244 – Database Management System TIME ALLOWED: 1 hour 5 minutes QUESTION AND ANSWER BOOKLET INSTRUCTIONS: 1. Answer ALL questions on this paper. 2. This paper is divided into TWO Sections: A: Multiple Choice ………………….. 20 marks B: Short and Long Answers …………………. 30 marks TOTAL: 50 marks Student Name: ____________________________ Student Number: _____________________ Study Program (CS or IS): _____________ Page 1 of 9 SECTION 1: MULTIPLE CHOICES: Circle the one and only best answer. 1. Database: A. Is a self describing of data. B. Is a basement for storing data. C. Is the collection of data about related sets of things. D. Is a program to help users to make decision. 2. The smallest unit in database structure is: A. Object B. Field C. Character D. Element 3. DBMS is the___________________ to manage the collected data. A. Software B. Freeware C. Shareware D. Hardware 4. Database have the following characteristics: A. They represent same aspects of the real world B. The are logically coherent and have some meaning C. The are created for specific purposes D. All of the above 5. Data types for Credit Limit should be: A. Text B. Currency C. Character D. Integer 6. Repetition of Data leads to: A. Data Faulty B. Data Inconsistency C. Data Overhaul D. Data Manipulation 7. Data are all in one database but kept in a separate units or ____________: A. Tables. B. Fields C. Objects D. Platform 8. Entering data into the database is known as A. Database populating B. Database building C. Database feeding D. Database striking Page 2 of 9 9. Concurrent Access means: A. Access now B. Multiple access C. Access one by one D. Access everything 10. The advantage of DBMS over Traditional File Management System is ____________ to manage stored data. A. Durability B. Flexibility C. Responsibility D. Validity 11. Row in a relational Database Table is referred to as A. Relation B. Table C. Tuple D. Attribute 12. System Maintenance In Database Planning is: A. Enhancement. B. Entertainment C. Encouragement D. Enrichment 13. DBMS expectations are to: A. Create data B. Store Data C. Query Data and D. Control Access to Data E. All of the above 14. Fields in Relational Database terminology mean: A. Attributes B. Records C. Element D. Data 15. Oracle and Access are examples of : E. Relational F. Network G. Object Oriented H. Environment 16. SQL stands for: F. Semi Query Language G. Structured Query Language H. Strict Query Language I. Sum Query Language Page 3 of 9 Use this information to answer question 17 to 19 A. B. C. D. E. Department (Dept#, Name, MgrEmp#, MgrStartDate) Dept_Location( Dept#,Location#) Employee (Emp#, Name, Salary, BDate, Dept#) Project (Proj#, Name, Budget) Works_On (Emp#, Proj#, Hours, PerformanceRating) 17. Which component shows a Primary Key A. A B. AB C. ABC D. ABCD E. ABCDE 18. Which component has two primary keys A. A&B B. B&C C. C & D D. B & E E. D&E 19. Emp# is a foreign key in A. A B. B C. C D. D E. E 20. A. B. C. D. Logical Database design phase focus on the: Attributes for each Entity E/R Diagram for the Database Data Types of each Attributes Relationships among each Entity Page 4 of 9 SECTION 2: Shirt and Long Answers 30 marks 1. What is DBMS and its three main components? (3) DBMS is the is a software system designed to allow the definition, creation, querying, update, and administration of databases. Well-known DBMSs include MySQL, PostgreSQL, SQLite, Microsoft SQL Server, Microsoft Access, Oracle, Sybase, dBASE, FoxPro, and IBM DB2. A database is not generally portable across different DBMS, but different DBMSs can inter-operate by using standards such as SQL and ODBC or JDBC to allow a single application to work with more than one database. Any Three of Hardware, Software, People Data and Procedure 2. Define DDL and DML with their roles in Database Design. (2) Data definition language - defines data types and the relationships among them Data manipulation language - performs tasks such as inserting, updating, or deleting data occurrences 3. Give one entity with two attributes that likely to be found in a Hospital Database System. (2) Doctors with name and DOB Wards with number and name 4. What are the two rules of thumb to help in identifying Entity and Relationships (2) Two rules of “thumb” to help in identifying Entity and Relationship type are: - An Entity type corresponds to NOUN - A Relationship type corresponds to VERB 5. Explain the structure of a Client-Server Systems.(1) In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. Computer transactions using the client/server model are very common. For example, to check your bank account from your computer, a client program in your computer forwards your request to a server program at the bank. That program may in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance. The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer, which displays the information for you. Page 5 of 9 6. Define with examples the term Composite Attributes. (2) Attributes which composed of several basic attributes are composite. Address Street Address Number City District Street Name 7. There are few requirements that we should consider in Good Database Design. Name two. (3) FAITHFULLNES: • The design should be faithful to the specifications of the application. – That is, the entity sets and their attributes should reflect reality. • You can’t attach an attribute number-of-cylinders to Stars although that attribute could make sense for an entity set Automobiles. AVOIDING REDUNDANCY • Everything one only -Two representations of the same thing take more space, when the data is stored, than either representation alone Whatever can go wrong will go wrong. forget to update all available copies will cause problems. SIMIPLICITY COUNTS Avoid introducing more elements into your design than is absolutely NOT necessary CHOOSING THE RIGHT RELATIONSHIPS • Entity sets can be connected in various ways by relationships. However, adding to our design every possible relationship is not often a good idea because:it can lead to redundancy the resulting database could require much more space to store redundant elements and modifying the database could become too complex. 8. Explain with an example what Database Integrity mean to you. (2). Database integrity ensures that data entered into the database is accurate, valid, and consistent. Any applicable integrity constraints and data validation rules must be satisfied before permitting a change to the database. Three basic types of database integrity constraints are: Entity integrity, not allowing multiple rows to have the same identity within a table. Domain integrity, restricting data to predefined data types, e.g.: dates. Page 6 of 9 Referential integrity, requiring the existence of a related row in another table, e.g. a customer for a given customer ID. 9. Define Primary Key Attributes with an example (2) Keys are attributes or sets of attributes that uniquely identify an entity within its entity set. Gives you unique access to a record in a table Eg. Student (Student ID, FName, LName, DOB, PhoneNo, Gender, Village,) 10. What is Weak Entity Sets? (1) A weak entity type has partial key which is the set of attributes that can identify weak entities that belongs to the same parent (owner) entity. In the example not two dependents of the same employee have the same name so that DependentName becomes the partial key. An entity type that does not have a primary key of it own Consider the entity type DEPENDENT which is related to EMPLOYEE DEPENDENT (DependentName, Birth Date, Sex, Relationship) 11. Outline with example the process of Normalization up to 3 normal form.(3) (Exclude as we have not covered this topics)…bonus marks. 12. Give 2 operational benefits of having special Data Entry Forms. (2) Control data collection and Entry User Friendly Promote Accuracy No technology is capable of recognizing data characters as well as the human eye. In fact, "accuracy" rates in the data conversion business are typically determined by comparing the results of a conversion process with a visual examination of the source documents. Simply put, the most accurate data detection device is the human eye. Consequently, keying is the ideal form of data entry. Keying provides assurance that your data is reliable because you can specify a guaranteed accuracy level for your information. The accuracy of information becomes increasingly important as the size and volume of information resources increases. Page 7 of 9 13. Describe with example the concept Faithfullness Constraints. (2) FAITHFULLNES: • The design should be faithful to the specifications of the application. – That is, the entity sets and their attributes should reflect reality. • You can’t attach an attribute number-of-cylinders to Stars although that attribute could make sense for an entity set Automobiles. 14. Identify and describe the three database anomalies. Give examples to back your explanations. (3) Database anomalies are the problems in relations that occur due to redundancy in the relations. These anomalies affect the process of inserting, deleting and modifying data in the relations. Some important data may be lost if a relations is updated that contains database anomalies. It is important to remove these anomalies in order to perform different processing on the relations without any problem. Types of Anomalies. Different types of database anomalies are as follows: Insertion Anomaly.The insertion anomaly occurs when a new record is inserted in the relation. In this anomaly, the user cannot insert a fact about an entity until he has an additional fact about another entity. Deletion Anomaly.The deletion anomaly occurs when a record is deleted from the relation. In this anomaly, the deletion of facts about an entity automatically deleted the fact of another entity. Modification Anomaly. The modification anomaly occurs when the record is updated in the relation. In this anomaly, the modification in the value of specific attribute requires modification in all records in which that value occurs. Database anomalies, are really just unmatched or missing information caused by limitations or flaws within a given database. Databases are designed to collect data and sort or present it in specific ways to the end user. Entering or deleting information, be it an update or a new record can cause issues if the database is limited or has ‘bugs’. Modification anomalies or Update anomalies are data inconsistencies that resulted from data redundancy or partial update. The Problems resulting from data redundancy in database table are known as update anomalies. If a modification is not carried out on all the relevant rows, the database will become inconsistent. So any database insertion, deletion or modification that leaves the database in an inconsistent state is said to have caused an update anomaly. Insertion anomalies are issues that come about when you are inserting information into the database for the first time. To insert the information into the table, we must enter the correct details so that they are consistent with the values for the other rows. Missing or incorrectly formatted entries are two of the more common insertion errors. Most developers acknowledge that this will happen and build in error codes that tell you exactly what went wrong. Page 8 of 9 Deletion anomalies are obviously about issues with data being deleted, either when attempting to delete and being stopped by an error or by the unseen drop off of data. If we delete a row from the table that represents the last piece of data, the details about that piece are also lost from the Database. These are the least likely to be caught or to stop you from proceeding. Because many deletion errors go unnoticed for extended periods of time, they could be the most costly in terms of recovery. Database anomalies are a fact; we will all face them in one form or another in life. The importance of backing up, storing offsite and data consistency checks come into full focus when you consider what could be lost. End of Test Page 9 of 9