T490 Fall 2007 Final


Part I, True/False Questions :

1. All queries can be designed to avoid subqueries.
True. False.

2. If you use a GROUP BY command, you can not see the non aggregated data in the same query.
True. False.

3. To use the SQL HAVING keyword you must also use the GROUP BY keyword.
True. False.

4. The relational database model is the predominant method of storing data today.
True. False.

5. It is possible to use a WHERE if the query contains a GROUP BY.
True. False.

6. Network database systems tend to be more flexible in their ability to access data than Hierarchical database systems.
True. False.

7. Many to Many associations create problems and should be avoided in database designs.
True. False.

8. DBMS stores data efficiently with little wasted space.
True. False.

9. A reflexive join means that a table is joined to itself.
True. False.

10. A benefit of database systems is that applications outside of the DBMS can gain access to the data.
True. False.

11. Using an IN operator is an alternative to using a group of OR clauses in a WHERE statement.
True. False.

12. If a table is in 3NF, it is also in 2NF.
True. False.

13. A subquery uses the same syntax as a regular query.
True. False.

14. Including the DISTINCT operator in a query will always result it more than or equal to the number of records returned when the DISTINCT operator is not used.
True. False.

15. In a university database, the normal multiplicity for a relationship between courses and students would be one to many.
True. False.

16. SQL does not permit a given table from being included in a query more than once.
True. False.

17. The employee – manager association is an example of a reflexive relationship.
True. False.

18. The solution to the problems created with a correlated subquery is to reference previously-saved data rather use a subquery.
True. False.

19. It is always possible to properly design a database and avoid using composite keys.
True. False.

20. It is a good idea to wait until data is entered into the database before normalizing the tables.
True. False.

21. A good choice for a primary key for the university's student database is the student phone number.
True. False.

22. If a table does not have a composite key, then it is in 2NF.
True. False.

23. Specifying a zero (0) for the lower bound for the association multiplicity on a class diagram indicates that the item is required.
True. False.

24. Database systems are traditionally designed to support the individual user (in contrast to multiple, simultaneous users).
True. False.

25. The primary key must be unique for a given table.
True. False.

Part II, Multiple Choice Questions:


26. To implement a join where records in two tables are linked based on one value falling within a range of values rather than exactly matches between the two tables, you would use a(n) ________________.
A) Outer Join
B) Equi-Join
C) Reflexive Join
D) Inequality Join

27. The primary difference between the Relational Data Base (RDB) and Object Oriented Data Base (OODB) models is ____________________.
A) OODB supports multiple objects in the same database while RDB only supports a single table per database
B) RDB supports indexes, while OODB does not support indexes
C) OODB incorporates methods in with the definition of the data structure, while RDB does not
D) RDB allows the definition of the relationships between the different tables, while OODB does not allow the relationships to be defined between objects

28. The modern database report writer __________________.
A) provides the tools for database designer to display information in the desired format
B) provides the tools for the database administrator to monitor and report on database use and activity
C) provide limited control over how information is displayed and reported.
D) is a career path that focuses on creating, managing and supporting the reports generated from databases

29. Not all queries can be constructed in a single SELECT statement. They have to be built up using the results of one query as building blocks for the larger query. What is the term used for these smaller queries that are integrated together to build the final query?
A) Query By Example
B) Sub-Schema
C) Schema
D) Subquery

30. How does an outer join differ from an inner join?
A) Inner joins involve only one table while an outer join involves multiple tables.
B) Inner joins only connects records that have matching values in each table, where as an outer join includes records without a match in the other table
C) Inner joins connect tables within the database while outer joins forms a connect to a table outside the database
D) Inner joins are processed with the inner most command first, while the outer join processes the outer most command first.

31. The type of form that acts like a meny and directs the user to other forms and reports is called a
A) Dropdown form
B) Menu form
C) Popup form
D) Switchboard form

32. In a university environment, what is the appropriate multiplicity for an association linking courses with their list of pre-requisite courses? Focus on the numbers placed next to the 'Pre-requisite courses' side of the association.
A) 1..*
B) 0..1
C) 1..1
D) 0..*

33. Referential Integrity Constraints are used to ________________.
A) enforce one to many relationships
B) enforce the uniqueness of the values entered as primary keys
C) ensure that foreign keys can be entered only if the corresponding value exists in the originating table
D) ensure that values entered for a certain property (i.e., table column) are appropriate

34. What is the benefit of using a query language rather than a natural language to get information out of a database?
A) Query languages are more flexible than natural language
B) There is no benefit of query languages over natural languages for getting information out of a database.
C) Query languages allow the user to pose unstructured, open ended queries
D) Query languages are more precise so there is less room for misinterpretation

35. Which SQL command would you use to match field values to a template value (i.e., finding all customers with a last name starting with “G”)?
A) MASK
B) STARTS WITH
C) LIKE
D) HAVING

36. The ability to modify the data structure and not have to change the programs using that data is called _____________________.
A) data integrity
B) data dictionary
C) referential integrity
D) data independence

37. The role of the query system is to __________________.
A) support data integrity
B) retrieve and manipulate data
C) present the data in a user friendly format
D) provide data security

38. What is the purpose of the SQL operator IN?
A) Specifies that the sort order should be increasing
B) Used in the GROUP BY statement to indicate sub-groups
C) Used to test if one value appears in a set of values
D) Indicates which table each field can be found

39. The command that indicates that a transaction has successfully completed and that changes must now be made permanent is: _________.
A) COMMIT
B) END TRANSACTION
C) EXECUTE
D) UPDATE

40. What is the special association that indicates that one object can be broken down into multiple special cases?
A) generalization association
B) n-ary association
C) reflexive association
D) composition association

41. When creating a query, what is the purpose of including a column Alias?
A) To control the sort order
B) To maintain anonymity
C) The real name is not known
D) To give the query designer control over the column name

42. If you wanted to determine which customers have not bought anything from you in the last month, you could do a ___________ JOIN between Sales and Customers, and then sum up all sales to each customer for the desired time period?
A) REFLEXIVE
B) EQUI-
C) RIGHT
D) INNER

43. The purpose of an N-Ary association is _______________.
A) to deal with one to many relationships
B) to represent an inheritance relationship
C) to capture a parent-child relationship
D) to deal with relationships that involve more than two tables

44. Tables in third normal form (3NF) _______________.
A) have a composite key
B) have all non-key fields depend on nothing but the primary key
C) eliminate the possibility of a insertion anomalies
D) do not have any repeating groups

45. What does a Null value represent in a database?
A) Missing data
B) A negative or false value
C) A text string full of spaces
D) An error, such as 'illegal value'

46. Assume you want to create a contact list, and include all your contact's phone numbers, which fall into different categories (i.e., home/work, primary/secondary/emergency, mobile/pager/voice/fax). Not all contacts have all categories.The following Contact table is in what normal form? Contact (ID, Name, Hphone1, Hphone2, Hfax1, Hfax2, MobilePhone, MobilePhoneCompany, Pager, Wphone1, Wphone2, Wfax1, Wfax2, EmergencyPhone)
A) First Normal only
B) First, Second & third Normal Form
C) Second Normal Form only
D) First & Second Normal Form

47. Assume that you have a Customer table and an Order table, where Referential Integrity constraints require that a customer record be entered before an order can be entered. Also Cascade on delete is enforced. If you delete a Customer record, ______________.
A) the system will prevent you from deleting the customer until the orders placed by that customer are deleted first by the user.
B) nothing will happen to the order table (it will be unchanged)
C) orders by that customer will be deleted
D) the Customerid in the order table will be set to null for those records which previously referred to the now deleted customer

48. If you wanted to include a signature block at the very end of a report, this would be placed in the ________________
A) Appendix object
B) footer
C) Page footer
D) Report footer

49. What is the special association that combines different items from multiple classes to build a new object?
A) reflexive association
B) n-ary association
C) composition association
D) generalization association

50. When creating a query, what is the purpose of assigning a table Alias?
A) To maintain anonymity
B) To prevent correlated sub queries
C) To distinguish between two instances of the same table
D) The real name is not known

Quiz script provided by
JavaScriptKit.com