5
Name: Section.: Faculty Name: Schedule (Time/Day) GENERAL INSTRUCTIONS: 1. Follow all instructions carefully. Failure to do so will warrant a substantial deduction from your final score. 2. Write everything in non-red ink. No borrowing of pens, calculators, etc. 3. You are not allowed to leave your seat unless you are through with the exam. If you have any questions, just raise your hand and the instructor or proctor will attend to you. 4. Talking to or looking at your seatmate (and his/her paper) is automatically considered as cheating which is subject to very serious sanctions as stipulated in the student handbook. GOOD LUCK ! ! ! TEST I. MULTIPLE CHOICE . Directions: Choose the correct answer that will best identify the following statements. Write the corresponding letter (uppercase) on the space provided on the attached answersheet. STRICTLY: NO ERASURES OR ALTERATIONS allowed. (30 pts, 1 pt each) 1. Which of the following is a reason for creating a list instead of creating a database? A. to prevent data inconsistency B. to prevent data redundancy C. to make it easier to share data in a central location D. to organize data for simple tasks 2. Which of the following is NOT an effect of data redundancy in a database? A. increased loss of data B. wasted time entering data C. increased likelihood of a mistake D. inconsistent data 3. All of the following are advantages of using a database, EXCEPT: A. data redundancy. B. data integrity. C. flexible use of data. D. information sharing. 4. In a database, a field is a: A. label. B. table of information. C. group of related records. D. category of information. 5. Each field in a database is identified by a: A. field name. B. key name. C. field type. D. field code. 6. A telephone number would be stored in a____________ field in a database. A. character B. varchar2 C. number D. date 7. A picture would be stored in a(n)____________ field in a database. A. character B. varchar2 1TSY2012-2013 ITED123/ITD102 - CANSINO Page 1 of 5 MIDTERM EXAMINATION DATABASE MANAGEMENT SYSTEM ITED123/ITD102

1tsy2012-2013 Midterm Exam Ited123 Itd102

Embed Size (px)

Citation preview

Page 1: 1tsy2012-2013 Midterm Exam Ited123 Itd102

Name: Section.:

Faculty Name: Schedule (Time/Day)

GENERAL INSTRUCTIONS:1. Follow all instructions carefully. Failure to do so will warrant a substantial deduction from your final score.2. Write everything in non-red ink. No borrowing of pens, calculators, etc.3. You are not allowed to leave your seat unless you are through with the exam. If you have any questions, just raise your hand

and the instructor or proctor will attend to you.4. Talking to or looking at your seatmate (and his/her paper) is automatically considered as cheating which is subject to very

serious sanctions as stipulated in the student handbook.GOOD LUCK ! ! !

TEST I. MULTIPLE CHOICE . Directions: Choose the correct answer that will best identify the following statements. Write the corresponding letter (uppercase) on the space provided on the attached answersheet. STRICTLY: NO ERASURES OR ALTERATIONS allowed. (30 pts, 1 pt each)

1. Which of the following is a reason for creating a list instead of creating a database?A. to prevent data inconsistencyB. to prevent data redundancyC. to make it easier to share data in a central locationD. to organize data for simple tasks

2. Which of the following is NOT an effect of data redundancy in a database?A. increased loss of dataB. wasted time entering dataC. increased likelihood of a mistakeD. inconsistent data

3. All of the following are advantages of using a database, EXCEPT:A. data redundancy.B. data integrity.C. flexible use of data.D. information sharing.

4. In a database, a field is a:A. label.B. table of information.C. group of related records.D. category of information.

5. Each field in a database is identified by a:A. field name.B. key name.C. field type.D. field code.

6. A telephone number would be stored in a____________ field in a database.A. characterB. varchar2C. numberD. date

7. A picture would be stored in a(n)____________ field in a database.A. characterB. varchar2C. objectD. hyperlink

8. A group of related fields in a database is called a(n):A. record.B. object.C. memo.D. table.

9. A group of related records in a database is called a(n):A. column.B. object.

1TSY2012-2013 ITED123/ITD102 - CANSINO Page 1 of 4

MIDTERM EXAMINATIONDATABASE MANAGEMENT SYSTEM

ITED123/ITD102

Page 2: 1tsy2012-2013 Midterm Exam Ited123 Itd102

C. key.D. table.

10. The purpose of the primary key in a database is to:A. unlock the database.B. uniquely identify a record.C. provide a map of the data.D. establish constraints on database operations.

11. In a relational database, tables are logically linked to each other by a:A. key.B. hyperlink.C. field type.D. field size.

12. Which of the following is NOT one of the four main functions of a database management system (DBMS)?A. creating databases and entering dataB. viewing and indexing dataC. querying dataD. programming data

13. Another name for the data dictionary in a database is the:A. validation data.B. relational data.C. database management system.D. database schema

14. If there is a relationship between two tables, this indicates that:A. information from both tables is always used together B. the data contained in the two tables are related to each other in some way C. the data from one table is inherited from the other table D. the structure of the one table is inherited from the other table

15. An n-ary relationship is drawn using which symbol:A. a diamond B. a line with arrows showing direction C. a line without arrows showing direction D. a rectangle

16. . An aggregation association is drawn using which symbol:A. a line which loops back onto the same table B. small closed diamond at the end of a line connecting two tables C. small open diamond at the end of a line connecting two tables D. small triangle at the end of a line connecting the aggregated item and multiple component items

17. A generalization association is drawn using which symbol: A. a line which loops back onto the same table B. small closed diamond at the end of a line connecting two tables C. small open diamond at the end of a line connecting two tables D. small triangle at the end of a line connecting the aggregated item and multiple component items

18. Assume you are creating a database to handle the data associated with instruction at a university. What is the most appropriate special association to model that a student's schedule consists of multiple classes?

A. aggregation association B. generalization association C. n-ary association D. reflexive association

19. Assume you are creating a database to handle the data associated with instruction at a university. What is the most appropriate special association to model the different elements contained in each classroom (i.e., projection equipment, blackboard type, computer support, etc)?

A. composition association B. generalization association C. n-ary association D. reflexive association

20. A Gender field can hold only the values M or F. This is an example of: A. key integrity B. domain integrity C. referential integrity D. logical integrity

21. The EmployeeID field in an employee table cannot be left blank. This is an example of: A. key integrity B. domain integrity C. referential integrity D. logical integrity

22. The DeptID field in an employee table must match the DeptID of an existing record in the department table. This is an example of: A. key integrity B. domain integrity C. referential integrity D. logical integrity

1TSY2012-2013 ITED123/ITD102 - CANSINO Page 2 of 4

Page 3: 1tsy2012-2013 Midterm Exam Ited123 Itd102

23.To add a new record to a database table you would use: A. DML B. DDL C. DBA D. CASE

24 . Which language is used by the DBMS to physically establish those record types, fields, and structural relationships in a relational database? A. DML B. DDL C. DBA D. DCL

25. Which language is used by the DBMS to create, read, update, and delete records in the database and to navigate between different records and types of records? A. DML B. DDL C. CASE D. DCL

26. The physical, relational database implementation of a data model is known as a: A. scenario B. role model C. schema D. primary data model

27. Which of the following is NOT a high-performance relational DBMS? A. Oracle B. IBM DB2 C. Microsoft SQL Server D. Microsoft Access

28. No two records in an employee table can have the same value for EmployeeID. This is an example of:

A. key integrity B. domain integrity C. referential integrity D. logical integrity

29. Appropriate controls must be designed to ensure that no field takes on a value that is outside of the range of legal values. This refers to: A. referential integrity B. domain integrity C. key integrity D. data integrity

30. The foreign key value in one table must have a matching primary key value in the related table. This refers to: A. referential integrity B. domain integrity C. key integrity D. data integrity

TEST II. ER DIAGRAMMING

Alice has a large DVD movie collection. Her friends like to borrow her DVD's, and she needs a way to keep track of who has what. She maintains a list of friends, identified by unique FID's (friend identifiers) and a list of DVD's, identified by DVDID's (DVD identifiers). With each friend is the name and the all-important telephone numbers which she can call to get the DVD back. With each DVD is the star actor name and title. Whenever a friend borrows a DVD, Alice will enter that fact into her database along with the date borrowed. Whenever the DVD gets returned, that fact, too, gets noted along with the date returned. Alice wants to keep a complete history of her friends' borrowing habits so that she can ask favors of the heavy borrowers (or perhaps refuse to make further loans to those who habitually don't return them quickly). (30 pts, 2 pts each)

Below is an E-R diagram for a database to help Alice out. Provide appropriate names for entities E1,E2; attributes A1, A2,….A5; multi-value attribute A6, relationship R1, and cardinality constraint C1min, C1max, C2min and C2max.

Entity E1 : Key K1 : Attribute A1 : Attribute A2 :

Entity E2 : Key K2 : Attribute A5 : Multi-value Attribute A6 : ___

Relationship R1: __ Attribute A3 : _____ Attribute A4 : __

Cardinality C1 min : ___ C1 max : _____ C2 max : __ C2 min : ______________

1TSY2012-2013 ITED123/ITD102 - CANSINO Page 3 of 4

E1 E2R1A1

A2 A3 A4

A53

A6

K2K1

C1min, C1max C2man, C2min

Page 4: 1tsy2012-2013 Midterm Exam Ited123 Itd102

TEST III. NORMALIZATION.Consider the Students table, with the primary key underlined, and the following data:

Students:Alpha Name Email Courses GradePoints100111 John Doe [email protected] NN204, SI204, IT221 2,3,3092244 Matt Smith [email protected] SM223, EE301 4,4113221 Melinda Black [email protected] SI204 3090112 Tom Johnson [email protected] NN204, SI204, IT221 4,2,3

a) Is the Students table in 1NF? Why?b) If the table is not in 1NF, redesign the Students table to be in 1NF. Give the table name, column names, primary keys and

foreign keys for each of the resulting tables. c) Produce the 3NF.

****** END OF TEST ********

1TSY2012-2013 ITED123/ITD102 - CANSINO Page 4 of 4