T490 Summer 2007 Final


Part I, True/False Questions :

1. Procedural code is often placed within forms and reports.
True. False.

2. The goal of the feasibility study is to determine whether a proposed project is worth pursuing.
True. False.

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

4. UML diagrams are very similar to ER (Entity Relation) diagrams, but are superior in several ways.
True. False.

5. Page headers are important sections for both reports and forms.
True. False.

6. A table alias is a way to change table names for presentation purposes in reports only but is not essential to answer any type of query
True. False.

7. DML is a set of commands that are used to define data.
True. False.

8. Abstract data types and sub-tables are relational features that are related to the object-oriented approach.
True. False.

9. The process of creating well-behaved sets of tables to efficiently store data, and minimize redundancy is called data integrity.
True. False.

10. A class diagram is a graph of classes connected together through relationships.
True. False.

11. Aggregated functions are SQL functions that operate across the selected rows like Between, IN, and LIKE.
True. False.

12. An alias is a temporary name for a table or a column, often used when you need to refer to the same table more than once.
True. False.

13. WHERE is a SQL clause used with the Group By statement. It restricts the output to only those groups that meet the specified condition.
True. False.

14. The ASC and DESC keywords control the sort order of SQL query results.
True. False.

15. The primary key can have any value including a null value
True. False.

16. A tabular Form presents a single record at a time.
True. False.

17. A form that takes priority on the screen and forces the user to deal with it before continuing is known as modal form.
True. False.

18. The definition of inheritance in a class hierarchy means each new class inherits methods from the prior classes and can override these definitions and assign a new method with the same name to the new class.
True. False.

19. A function is a procedure designed to perform a specific computation.
True. False.

20. A relation is in 3NF if and only if it is in 1NF and some keys are dependent on the primary key.
True. False.

21. As long as you create all the indexes you need, a Hierarchical database systems will provide you with all the answers and information you are searching for.
True. False.

22. A relational database system can easily support many-to-many relationship between two tables.
True. False.

23. All the changes defined in a transaction must be made together.
True. False.

24. Long trigger chains are usually difficult to debug, might loop on themselves, and can slow down the system.
True. False.

25. According to human factors design, the user must NOT be given control over the system and shouldn't be able to customize it. Otherwise, the stability of the system will be lost.
True. False.


Part II, Multiple Choice Questions:


26. A sub form displays data
A) From two tables that have a one-to-many relationship
B) In single records
C) Which direct the user to other forms and reports in the database
D) None of the answers is correct

27. Which of the following statements apply to foreign keys?
A) A Foreign key cannot consist of a composite attribute
B) Foreign keys cannot have null values
C) A table may contain only a single foreign key
D) None of the above

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

29. Which of the following queries lists racing bikes which in 2003 sold more than the average price of racing bikes in 2002?
A) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice, Avg(Bicycle.SalePrice) AS AvgOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2003# And #12/31/2003#) AND Avg(Bicycle.SalePrice> AvgOfSalePrice WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2002#))
GROUP BY Bicycle.SalePrice
ORDER BY Bicycle.SalePrice DESC
B) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice, Max(Bicycle.SalePrice) AS MaxOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))
ORDER BY Bicycle.SalePrice DESC
C) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2003# And #12/31/2003#) AND ((Bicycle.SalePrice)>
(SELECT Avg(Bicycle.SalePrice) AS AvgOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate)
Between #1/1/2002# And #12/31/2002#))
)))
ORDER BY Bicycle.SalePrice DESC;
D) SELECT Bicycle.SerialNumber, Bicycle.ModelType, Bicycle.OrderDate, Bicycle.SalePrice, Max(Bicycle.SalePrice) AS MaxOfSalePrice
FROM Bicycle
WHERE (((Bicycle.ModelType)="race") AND ((Bicycle.OrderDate) Between #1/1/2002# And #12/31/2003#))
GROUP BY Bicycle.SalePrice
ORDER BY Bicycle.SalePrice DESC

30. Study the following class diagram, Which of the following is/are true?


















A) Animal Purchase can only be made by a Supplier
B) Animal Purchase can only be made by a Supplier or by an Employee
C) Animal Purchase can be made by a Supplier, an Employee or by a Customer
D) There is no direct relation between a Customer and an Animal Purchase

31. According to DeMorgan's Law, the Boolean expression NOT (A AND B) is equivalent to:
A) NOT (A AND NOT B)
B) (NOT A) OR (NOT B)
C) (NOT A) AND (NOT B)
D) NOT(A OR B)

32. To which normal form(s) does the following marriage relation comply?
Marriage(BrideID, GroomID, BrideName, BrideBirthDate, GroomName, GroomBirthdate)
A) BCNF
B) 1NF
C) 1NF and 2NF
D) 3NF

33. Review the following class diagram, Which of the following in NOT true?




















A) An order can contain 1 or more items but not zero
B) A customer can buy 1 or more items by placing an order
C) A customer will not exist in the DBMS if he/she has not placed an order
D) A quantity of an item available in store cannot be determined from the above diagram

34. What is the purpose of the serialization process?
A) Forces transactions to run separately so that result consistency is maintained
B) In a two-phase commit scheme, it ensures that everyone has obtained locks on resources before committing to the change.
C) Forces the operations within a transaction to be run in a specific, predefined sequence.
D) Allocates access time to the database to make sure it is fair

35. The type of form that displays data from two tables that have a one-to-many relationship is called a _______________.
A) Relational form
B) Crosstab form
C) Subform
D) Referential form

36. Cascade delete in referential integrity means that:
A) If a record is deleted in the referenced relation, then all matching records in the referring table will be deleted also
B) If a record having a foreign key is deleted, then all matching records in referenced relation are deleted also
C) A delete in the referring relation results in other deletes in the same table
D) None of the above

37. If you want to include the date and time at the top of each printed page in a report, this would be specified in the _____________________.
A) Report gutter
B) Gutter
C) Page header
D) Page setup

38. It is often best to let the DBMS generate unique values
+ Access: AutoNumber
+ SQL Server: Identity
+ Oracle: Sequences (but require additional programming)
Which of the following is true about using above schemes?
A) There are no disadvantages of using unique values
B) Numbers are not related to any business data, so the application needs to hide them
C) User has more control because he/she has to manually generate these unique values
D) B and C

39. The definition of primary and foreign key relationships are set using SQL _________.
A) Rules
B) Keys
C) Assignments
D) Constraints

40. The fields in one table that link to the primary key in another table are called _________:
A) metadata
B) foreign key
C) composite key
D) dependent key

41. A small diamond is used to signify which construct in a class diagram?
A) Composition
B) Reflexive association
C) Aggregation
D) Generalization

42. A simple class diagram for a university database has only three classes: Teachers, Students and Courses. How many binary associations will be sufficient to establish whether Teacher X is teaching Course Y to student Z?
A) 3
B) 1
C) 2
D) None of the above

43. What will the following query produce if it is run against the Employee table shown?

SELECT * FROM Employee WHERE EmpCity = "Muscat" GROUP BY DepartmentID;

Employee(EmployeeID, EmpName, EmpAddress, EmpCity, EmpTel, DepartmentID)

A) Will return the details of every employee is Muscat, grouped by DepartmentID
B) Will provide all details of all employees in Muscat
C) Will not run
D) Will run correctly but will return nothing

44. Which type of query displays only matching rows from the two classes based on the specified attributes Null values are not included?
A) OUTER JOIN
B) FULL JOIN
C) INNER JOIN
D) THETA JOIN

45. Which of the following are not SQL DDL commands?
A) CREATE VIEW
B) CREATE SCHEMA, CREATE TABLE, ALTER TABLE
C) UNION, INTERSECT and EXCEPT
D) DROP TABLE, CREATE
INDEX, DROP INDEX

46. Review the following SQL statement
CREATE TABLE Order
( OID NUMBER(9) NOT NULL,
Odate DATE,
CID NUMBER(9),
CONSTRAINT pk_Order PRIMARY KEY (OID),
CONSTRAINT fk_OrderCustomer
FOREIGN KEY (CID)
REFERENCES Customer (CID)
ON DELETE CASCADE
)
A) If an Order is deleted from Order table, customer information will automatically be deleted by DBMS
B) If a customer is deleted from Customer table, Order information will automatically be deleted by DBMS
C) If the DELETE CASCADE clause was not used, You have to manually delete orders first and then the customer information
D) The delete operation will fail with an error message because of the NOT NULL clause in the Order table

47. What is the problem with the following SQL statement?
SELECT Category, Count(AnimalID) AS CountOfAnimalID
FROM Animal
GROUP BY Category
ORDER BY Count(AnimalID);
A) The above SQL statement is correct
B) The word ASC or DESC is required but missing
C) The ORDER BY clause should appear before GROUP BY clause
D) The GROUP BY clause is not required here

48. Which DBMS component holds the definitions of all data tables?
A) The application generator
B) The query processor
C) The security subsystem
D) The data dictionary

49. Compared to the old file approach, the DBMS offers these unique advantages:
A) Access to data through application programs
B) The ability to store and retrieve data
C) Minimal data redundancy and ease of application development
D) Fastest response time

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

Quiz script provided by
JavaScriptKit.com