T490 Fall 2008 Final


Part I, True/False Questions :

1. The ORDER BY clause is used to sort query results based on any column or combination of columns.
True. False.

2. The UNION operator combines two differently structured tables like Animals and Sales, or like Employees and Products in a single table.
True. False.

3. A Tabular Form presents several records in a single screen.
True. False.

4. A reflexive association links a class to itself using two different roles.
True. False.

5. Unlike the INSERT INTO Statement, the contents of VIEW will change in response to changes in the underlying tables.
True. False.

6. In the relational model, composite attributes, multi-valued attributes and sub-tables can all be used in normalized relations.
True. False.

7. The number of records returned by a query joining two tables together may exceed the number of records of the largest of the two tables being joined.
True. False.

8. SELECT *
FROM Employee
GROUP BY DepartmentID;

is a valid SQL query
True. False.

9. A host language allows database application developers to develop user-defined functions and procedures.
True. False.

10. To design a database one MUST start from existing user forms and convert them into a set of tables and then normalize the tables and finally produce the class diagram
True. False.

11. A poorly designed Form can result in inefficient and error prone data entry.
True. False.

12. A table alias is a way to change a column name for presentation purposes.
True. False.

13. The data stored in the database should be organized in a user-friendly way and must match exactly the way it appears to the user in forms and reports
True. False.

14. A Subform is another term used to indicate a Modal Form.
True. False.

15. To develop database applications, one must choose either SQL or a traditional language such as C++ or Java, but not both at the same time
True. False.

16. Business events, data events and user events can all be used in databases to trigger further actions.
True. False.

17. Providing feedback to the database user through multiple means in a form (for example visual, text and sound) is good practice from a human factors design perspective.
True. False.

Use the following to answer questions 18-20:
The following functional dependencies apply to a patient operations relation:
Patient-Operation (PatientID, OperationType, Surgeon, Result)

(PatientID, OperationType) -> Surgeon, Result
Surgeon -> OperationType

18. Given the provided information, can a surgeon perform many operation types?
True. False.

19. Can a patient undergo the same operation type with more than one surgeon?
True. False.

20. Can a single operation type be performed by more than one surgeon?
True. False.

21. There can be no common elements among different subclasses in a Generalization association
True. False.

22. A desirable feature of database technology is the ability to change the storage structures or access techniques in response to changing requirements without having to modify existing applications
True. False.

23. To represent an employee-supervisor situation, we can use a reflexive association to link each employee to his/her supervisor
True. False.

24. The query:
SELECT *
FROM A INNER JOIN B
ON A.w = B.x AND A.y=B.z

is illegal because it will result in joining tables A and B by matching two columns.
True. False.

25. A relation that has a simple primary key (non-composite) is not necessarily in 3NF
True. False.


Part II, Multiple Choice Questions:


26. To which normal form(s) does the following Fathers relation comply?
Fathers (PersonID, PersonName, FatherID, FatherName)
A) 1NF, 2NF
B) 1NF, 2NF, 3NF, BCNF, 4NF
C) 1NF, 2NF, 3NF
D) 1NF

27. Which set of functional dependencies will put the following student course registration table in 3NF?
Student-Course (StudentID, Course, Teacher, Grade)
A) (StudentID, Course) Teacher, Grade
Course Teacher
B) (StudentID, Course) Teacher, Grade
Teacher Course
C) (StudentID, Course) Teacher, Grade
Teacher Grade
D) None of the above

28. Which of the following statements can be used to append one table to another?
A) ADD TABLE ......
B) ADD ROWS ...... TO ......
C) APPEND TABLE ....
D) INSERT ...... INTO .....

29. Which of the following are SQL DDL commands?
A) DROP TABLE, ALTER TABLE, DROP INDEX
B) UNION, INTERSECT
C) All of the above
D) SELECT, DIFFERENCE

30. Specifying CASCADE DELETE results in the following behavior:
A) deleting a record in a table R results in other deletes in the same table
B) all matching records in relation R which contains a foreign key are deleted if a record having a matching primary key value in another related relation S is deleted.
C) all matching records in a relation R are deleted if a record having a matching foreign key in a another related relation S is deleted.
D) None of the above

31. In SQL, the CASE function is used to:
A) map the value of an expression into a set of different values
B) conditionally update the data in the tables
C) test the capitalization of letters
D) change upper case into lower case and vice versa

32. Which SQL operation subtracts (removes) the contents of one table from another?
A) OMIT
B) EXCEPT
C) SUBTRACT
D) LEFT JOIN

33. A generalization association is represented by:
A) an open diamond
B) a line which loops back onto the same table
C) a small triangle
D) a closed diamond

34. The type of form that display one record at a time is called a:
A) relational form
B) crosstab form
C) columnar form
D) referential form

35. A Table in not in third normal form (3NF) if:
A) a non-key field depends on another non-key field
B) has a composite key
C) it is in second normal form (2NF)
D) it is in fourth normal form (4NF)

36. To which normal form(s) does the following marriage relation comply?
Marriage(BrideID, GroomID, BrideFirstName, GroomFirstName, MarriageDate)
A) 1NF, 2NF and 3NF
B) 2NF only
C) 1NF and 2NF
D) 1NF only

37. An employee relation is said to be in third normal form when:
A) some employee data are dependent on both the employee ID and another field independently
B) the employee data are not dependent on the employee primary key
C) the employee data are dependent on a field other than the employee ID
D) the employee data are dependent only on the employee ID

38. Which type of JOIN can show all the records in the right most table with only the matching records form the left table?
A) RIGHT JOIN
B) OUTER JOIN
C) INNER JOIN
D) LEFT JOIN

39. A form that mainly contains buttons that open other forms and reports is called a:
A) menu form
B) switchboard form
C) dropdown form
D) popup form

40. Which of the following types of isolation levels provides the MOST protection against concurrency problems?
A) REPEATABLE READ
B) READ COMMITTED
C) SERIALIZABLE
D) READ UNCOMMITTED

41. Text that appears on every page of a report should be placed in the
A) footer
B) report footer
C) appendix object
D) page footer

42. A correlated subquery is:
A) a query whose data is correlated using the correlation function Correlate()
B) a subquery that refers to data rows in the main query.
C) inefficient because calculations in the subquery must be recomputed for each entry in the main table.
D) Both B and C above

43. Choosing an inappropriate numeric data type (i.e., byte, integer, long integer, real number, currency, etc.) results in:
A) inability to handle units in the metric system.
B) incorrect table structure.
C) update anomalies.
D) inefficient data storage.

44. The Unified Modeling Language (UML) is:
A) an international standard language used to write database application programs
B) an important markup language used for developing web sites
C) a general purpose set of standards to visually model various aspects of software systems and business processes.
D) none of the above

45. What is the main advantage of relational databases as compared to hierarchical databases?
A) Relational databases are more flexible in accessing the data
B) Relational databases incur lower overhead associated with maintaining indexes
C) Relational databases are faster than hierarchical databases
D) Relational databases provide higher capacity (holding more data)

46. An aggregation association is represented by.
A) an open diamond
B) a line which loops back onto the same table
C) a closed diamond
D) none of the above

47. The following query is supposed to List the Animals that have sold for the highest price among animals in their Category:
SELECT A1.AnimalID, A1.Name, A1.Category, SaleAnimal.SalePrice
FROM Animal As A1 INNER JOIN SaleAnimal
ON A1.AnimalID = SaleAnimal.AnimalID
WHERE (SaleAnimal.SalePrice =
Which of the following correctly completes this query?
A) (SELECT Max(SaleAnimal.SalePrice)
FROM Animal INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalID
WHERE (Animal.Category = Animal.Category) ) );
B) (SELECT Max(SaleAnimal.SalePrice)
FROM Animal AS A1 INNER JOIN SaleAnimal
ON A1.AnimalID = SaleAnimal.AnimalID WHERE (A2.Category = A1.Category) ) );
C) (SELECT Min(SaleAnimal.SalePrice)
FROM Animal AS A2 INNER JOIN SaleAnimal ON Animal.AnimalID = SaleAnimal.AnimalID
WHERE (Animal.Category = Animal.Category) ) );
D) (SELECT Max(SaleAnimal.SalePrice)
FROM Animal As A2 INNER JOIN SaleAnimal
ON A2.AnimalID = SaleAnimal.AnimalID
WHERE (A2.Category = A1.Category) ) );

48. Which of the following statements apply to foreign keys?
A) A Foreign key is not unique-valued and may have duplicate values
B) A table may contain only a single foreign key
C) A Foreign key cannot consist of more than one attribute
D) Foreign keys cannot have null values

49. Assume you are creating a database to handle the data associated with employees in a company. What is the most appropriate special association to represent the details of employees of different types (for example: accountants, engineers, workers, .. .)?
A) reflexive association
B) n-ary association
C) aggregation association
D) generalization association

50. Assume you are dealing with a purchasing database involving a single table. This table contains information on the customer, sale, and items purchased, where the sales order number is the primary key. If you remove all orders involving a given product, you also lose all information on that product. This is an example of:
A) a deletion anomaly
B) referential data integrity
C) a hidden dependency
D) an update anomaly

Quiz script provided by
JavaScriptKit.com