0% found this document useful (0 votes)
191 views17 pages

Database Exam Instructions

158.337 Database Development - Massey (Manawatu) - Exam - S1 2012 Massey University, NZ, 158.337 , 158.337

Uploaded by

Don
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views17 pages

Database Exam Instructions

158.337 Database Development - Massey (Manawatu) - Exam - S1 2012 Massey University, NZ, 158.337 , 158.337

Uploaded by

Don
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1201/158.

337 SC
MAN NSB
Internal Only

MASSEY UNIVERSITY
MANAWATU CAMPUS

EXAMINATION FOR
158.337 DATABASE DEVELOPMENT

Semester One 2012

Time allowed: THREE (3) hours

There are 100 questions: ALL questions should be attempted

This examination contributes 50 % to the final marks

Questions are of equal value

YOU MAY NOT TAKE ANY BOOKS OR OTHER MATERIALS INTO THE EXAM

Calculators, Dictionaries or any type of electronic assistants ARE NOT ALLOWED.

INSTRUCTIONS FOR CANDIDATES

Scantron Cards
Ensure that your name and identification number are entered on your Scantron card. Record
your answer on your Scantron card by putting a solid horizontal pencil line through the
character representing the ‘best’ answer to the question with a blunt 2B or 3B pencil, please.
The Scantron card will not read properly if you do not follow these instructions. At the
conclusion of the examination hand in the Scantron Card separately.

NSB – No Script Book Required


A blue answer book is not required for this question paper.

Page 1 of 17
1201/158.337 SC
MAN NSB
Internal Only
1. The set of possible values for an attribute is a ____.
a. domain
b. range
c. set
d. key

2. How is the relational model implemented at the physical level?


a. As tables linked by foreign keys
b. As a set of files
c. As a B-tree
d. It is not implemented at the physical level

3. A table that has all key attributes defined, has no repeating groups, all its attributes are
dependent on the primary key, and has no partial dependencies is said to be in ____.
a. 1NF
b. 2NF
c. 3NF
d. 4NF

4. The syntax for the UNION query is ____.


a. query + query
b. UNION (query, query)
c. UNION: query query
d. query UNION query

5. Which of the following refers to a READ ONLY argument in a list of arguments


passed to a PL/SQL stored procedure?
a. IN
b. IN OUT
c. OUT
d. REF

Page 2 of 17
1201/158.337 SC
MAN NSB
Internal Only
6. Consider a table called PRODUCT with following attributes:

Prod_Code Prod_Description Prod_Price

The SQL query - SELECT Prod_Code, Prod_Description FROM Product - is an


example of ____________ operation(s).
a. Cartesian
b. Selection
c. Projection
d. Cartesian, Selection and Projection

7. Transitive dependency is a dependency of


a. one non prime attribute dependent on another prime attribute
b. one non prime attribute dependent on another non prime attribute
c. one prime attribute dependent on another prime attribute
d. one prime attribute dependent on another non prime attribute

8. To automatically increment the value of an integer primary key each time a row is
added to an Oracle table,...
a. You should use an autonumber
b. You should use a sequence
c. You should use the SQL Increment function
d. The only way is to write and store your own function

9. A parameter with the ___________ mode is a write-only value that can appear only on
the left side of an assignment.
a. IN
b. OUT
c. IN OUT
d. WRITE

10. An atomic attribute______________.


a. cannot exist in a relational table
b. is always chosen to be a foreign key
c. cannot be subdivided
d. displays multiplicity

11. Attribute A ____ attribute B if all of the rows in the table that agree in value for
attribute A also agree in value for attribute B.
a. determines
b. derives from
c. controls
d. owns

Page 3 of 17
1201/158.337 SC
MAN NSB
Internal Only
12. Surrogate primary keys are especially helpful when there is no ____ key.
a. candidate
b. natural
c. foreign
d. composite

The following three tables ENROLL, STUDENT and CLASS are used for questions 13-17.

13. Which table represents a bridge entity?


a. CLASS
b. ENROLL
c. STUDENT
d. None of the above

14. If we wanted to create a MY_CLASSES view for the professor containing a column,
CLASS_NUMBERS, showing how many students in each of his/her classes, where
should we store the new attribute?
a. CLASS
b. ENROLL
c. STUDENT
d. None of the above because it’s a derived attribute

15. How would creating an index on PROF_NUM improve the efficiency of generating
the MY_CLASSES view?
a. It would facilitate extracting professors’ names from the PROFESSOR table
b. It would sort the CLASS table by PROF_NUM
c. It would reference all rows in the CLASS table linked to each PROF_NUM
d. It would not be necessary to join the CLASS and ENROLL tables

16. The relationship from ENROLL to STUDENT is most accurately described as…
a. Many to many
b. 0 to many
c. 1 to many
d. 1 to 1

17. If we added the professor’s last name to the CLASS table, what normal form would
the table then be in?
a. 1NF
b. 2NF
c. 3NF
d. BCNF

Page 4 of 17
1201/158.337 SC
MAN NSB
Internal Only
18. Which of the following statements is false?
a. A weak entity produces a strong relationship
b. A strong entity can have either identifying or non identifying relationships
c. A strong relationship between two entities implies that one entity must have a
composite primary key
d. A weak relationship between two entities implies that both entities do not
contain any foreign key

19. Which of the following is not an SQL DML command?


a. SELECT
b. COMMIT
c. DROP
d. UPDATE

20. Which SQL statement will compile with no errors and display the correct result?
a. SELECT * FROM staff WHERE (st_position = 'Manager' OR st_position =
'Supervisor') AND st_birthdate IS NULL
b. SELECT * FROM staff WHERE (st_position IS 'Manager' OR st_position IS
'Supervisor') AND st_birthdate IS NULL
c. SELECT * FROM staff WHERE (st_position = 'Manager' OR st_position =
'Supervisor') AND st_birthdate = NULL
d. SELECT * FROM staff WHERE (st_position = 'Manager' OR st_position =
'Supervisor') AND st_birthdate = ‘’

21. An explicit cursor is NOT required if a SELECT statement in a PL/SQL block returns
_________ in the resulting set.
a. less than 10% of the total records
b. a single row
c. an indexed column
d. a dynamic function value

22. Which of the following is an example of structured data?


a. A web page
b. An email
c. A memo
d. A spreadsheet

23. A ____ occurs when you have one entity in two 1:M relationships to other entities,
thus producing an association among the other entities that is not expressed in the
model.
a. M:N relationship
b. redundancy
c. design trap
d. fan trap

Page 5 of 17
1201/158.337 SC
MAN NSB
Internal Only
24. The Crow’s foot symbol with two parallel lines indicates _________ cardinality.
a. (0, N)
b. (1, N)
c. (1,1)
d. (0, 1)

25. A(n) ___________ cannot accept input parameters.


a. anonymous PL/SQL program
b. stored PL/SQL procedure
c. PL/SQL function
d. All of the above can accept input parameters

26. When you issue the DELETE FROM tablename command without specifying a
WHERE condition, ____.
a. the first row will be deleted
b. no rows will be deleted
c. all rows will be deleted
d. the table will be deleted

27. The ____ constraint can be placed on a column to ensure that every row in the table
has a value for that column.
a. HAS VALUE
b. NOT NULL
c. DEFAULT
d. NOT EMPTY

28. In SQL, SUM( ) is ...


a. an anonymous PL/SQL program
b. a stored PL/SQL procedure
c. a SQL function
d. an aggregate function

29. Which statement about materialised views is false?


a. View materialisation stores view as temporary table when view is first queried
b. Queries based on materialised view can be faster than recomputing view each
time
c. A materialised view can be based upon another view
d. View materialisation facilitates maintaining the currency of view while base
tables(s) are being updated

30. Which of the following would NOT be found in a data dictionary?


a. TABLE
b. INDEX
c. QUERY
d. SEQUENCE

Page 6 of 17
1201/158.337 SC
MAN NSB
Internal Only
31. Which of the following statements about network databases is false?
a. Can be modelled in an ERD
b. Can represent M:N relationships
c. Supports structural independence
d. Cannot support ad hoc querying

32. The ____ operator could be used in place of INTERSECT if the RDBMS does not
support it.
a. IN
b. JOIN
c. AND
d. UNION

33. If one exists, a data modeller uses a ____ as the primary key of the entity being
modelled
a. foreign key
b. composite key
c. surrogate key
d. natural identifier

34. Which statement about database triggers is true?


a. Are defined when a table is created
b. Can only be executed in response to an UPDATE or INSERT event
c. May execute a database query
d. Can only execute once in response to a triggering event

35. Which statement about dynamic SQL is false?


a. SQL statement is not known in advance, but instead is generated at run time
b. Allows variables to be inserted into a statement that are only instantiated at
run-time
c. Tends to be much slower than static SQL
d. Requires less computer resources

36. In the __________ model, the basic logical structure is represented by an upside-down
tree.
a. hierarchical
b. network
c. relational
d. entity relationship

37. The relationships depicted within the ____ are sometimes described in terms of “is-a”
relationships
a. subtype discriminator
b. inheritance
c. specialization hierarchy
d. entity supertype

Page 7 of 17
1201/158.337 SC
MAN NSB
Internal Only
38. In the relational model, ____ are important because they are used to ensure that each
row in a table is uniquely identifiable
a. Relations
b. Keys
c. Indexes
d. Attributes

39. In a RDBMS, _______ are important because they are used to ensure that primary key
values are unique.
a. Data Types
b. Foreign Keys
c. Indexes
d. Triggers

40. In which clause of a legal SELECT query would you not find a subquery?
a. FROM
b. WHERE
c. GROUP BY
d. HAVING

41. In ORACLE, the _________________ function converts a date to a character string.


a. CONVERT( )
b. TO_CHAR( )
c. TO_DATESTRING( )
d. TO_STRING( )

42. You can use the _____________ clause to create a search condition in a query that
contains a grouping condition.
a. GROUP BY
b. IN
c. SEARCH BY
d. HAVING

43. Which of the following is false in relation to the syntax of SELECT statements?
a. SELECT clause must contain at least one column from every table named in
FROM clause
b. All column names in SELECT list must appear in GROUP BY clause unless
name is used only in an aggregate function
c. Aggregate functions can only be used in SELECT and in HAVING clause
d. EXISTS and NOT EXISTS can only be used with subqueries

44. Which of the following can the NULL value NOT represent?
a. An unknown attribute value
b. An empty string value
c. A known, but missing, attribute value
d. A “not applicable” condition

Page 8 of 17
1201/158.337 SC
MAN NSB
Internal Only
45. What is a secondary key?
a. An attribute whose values match primary key values in a related table
b. An attribute or set of attributes that uniquely defines each row but has not been
selected as the primary key
c. An attribute within a composite primary key
d. A key used strictly for data retrieval purposes

46. Which of the following attributes would not normally be represented in a conceptual
model?
a. Derived attribute
b. Foreign key attribute
c. Single-value attribute
d. Multivalued attribute

47. Which of the following assertions about using the UNION statement is false?
a. Each SELECT statement within the UNION must have the same number of
columns.
b. The order of the columns in the tables listed in the FROM clauses does not
matter.
c. The columns listed in each SELECT statement must have similar data types
d. To select only those rows with distinct values, we must use UNION
DISTINCT

48. Which of the following values is not of the varchar(8) type?


a. ‘10’
b. ‘ID618923’
c. ‘Tom Jones’
d. None of the above

49. Which of following is not a relational algebra operator?


a. PRODUCT
b. INTERSECT
c. PROJECT
d. GROUP BY

50. The primary objective of database design is ____.


a. to create the most efficient database possible
b. to create complete, normalized, nonredundant, and fully integrated conceptual,
logical, and physical database models
c. to create the fastest queries
d. to be able to add data quickly

51. The database is loaded during the ____ phase of the SDLC.
a. analysis
b. detailed systems design
c. implementation
d. maintenance

Page 9 of 17
1201/158.337 SC
MAN NSB
Internal Only
52. Creating the conceptual design and selecting DBMS software are part of the ____
phase of the DBLC.
a. database initial study
b. database design
c. implementation and loading
d. testing and evaluation

53. The database initial study phase of the DBLC involves ____.
a. defining objectives
b. introducing changes
c. testing the database
d. installing the DBMS

54. The conceptual design step that defines entities, attributes, and relationships is ____.
a. database analysis and requirements
b. distributed database design
c. data model verification
d. entity relationship modeling and normalization

55. The first step in developing the conceptual model using ER diagrams is to ____.
a. normalize the entities
b. complete the initial ER diagram
c. identify, analyze, and refine the business rules
d. define the attributes, primary keys, and foreign keys for each of the entities

56. The first step in the ER model verification process is to ____.


a. identify each module and its components
b. identify the ER model's central entity
c. verify all processes against the ER model
d. identify each module's internal transaction requirements

57. The maintenance and evolution phase of the DBLC involves ____.
a. defining objectives
b. introducing changes
c. testing the database
d. installing the DBMS

58. The ____ design is the process of selecting the data storage and data access
characteristics of the database.
a. time
b. network
c. logical
d. physical

Page 10 of 17
1201/158.337 SC
MAN NSB
Internal Only
59. During decentralized design, after the ____ process has been completed, all modules
are integrated into one conceptual model.
a. initial
b. verification
c. conceptual
d. logical

60. In the optimistic approach, during the ____ phase, changes are permanently applied to
the database.
a. read
b. validation
c. write
d. shared

61. The ____ approach to scheduling concurrent transactions assigns a global unique
stamp to each transaction.
a. scheduled
b. table-locking
c. unique
d. timestamping

62. A(n) ____ phase in a two-phase lock is when a transaction releases all locks and
cannot obtain any new lock.
a. growing
b. shrinking
c. locking
d. unlocking

63. What is the rule that applies to the two-phase locking protocol?
a. Two transactions cannot have conflicting locks
b. No unlock operation can precede a lock operation in a different transaction
c. No data is affected until all locks are released
d. No data is affected until the transaction is in its locked position

64. A(n) ____ lock exists when concurrent transactions are granted read access on the
basis of a common lock.
a. two-phase
b. exclusive
c. binary
d. shared

Page 11 of 17
1201/158.337 SC
MAN NSB
Internal Only
65. A ____ lock allows concurrent transactions to access different rows of the same table.
a. database-level
b. table-level
c. page-level
d. row-level

66. As long as two transactions, T1 and T2, access ____ data, there is no conflict, and the
order of execution is irrelevant to the final outcome.
a. shared
b. common
c. unrelated
d. locked

67. The information stored in the ____ is used by the DBMS for a recovery requirement
triggered by a ROLLBACK statement, a program’s abnormal termination, or a system
failure such as a network discrepancy or a disk crash.
a. data dictionary
b. metadata
c. rollback manager
d. transaction log

68. ____ means that data used during the execution of a transaction cannot be used by a
second transaction until the first one is completed.
a. Serializability
b. Atomicity
c. Isolation
d. Time stamping

69. All transactions must display ____.


a. atomicity, consistency, and durability
b. durability and isolation
c. consistency, durability, and isolation
d. atomicity, durability, consistency, and isolation

70. On the client side, the objective is to generate a SQL query that returns the correct
answer in the least amount of time, using the minimum amount of resources at the
server end. The activities required to achieve that goal are commonly referred to as
____ tuning.
a. client and server
b. database
c. SQL performance
d. DBMS performance

71. A DBA determines the initial size of the data files that make up the database.
However, as required, the data files can automatically expand in predefined
increments known as ____.
a. procedure cache

Page 12 of 17
1201/158.337 SC
MAN NSB
Internal Only
b. file group
c. data files
d. extends

72. To work with the data, the DBMS must retrieve the data from the ____ and place it in
the ____.
a. data files, procedure cache
b. data files, data cache
c. temporary files, RAM
d. temporary files, procedure cache

73. The ____ table space is used as a temporary storage area for merge, sort, or set
aggregate operations.
a. system
b. user data
c. temporary
d. rollback segment

74. Most DBMSs operate in one of two optimization modes: cost-based or rule-based.
Others automatically determine the ____ based on whether database statistics are
available.
a. data cache
b. SQL cache
c. sort cache
d. optimization mode

75. The ____ must be set large enough to permit as many data requests to be serviced
from cache as possible.
a. data cache
b. SQL cache
c. sort cache
d. optimizer mode

76. ____ is/are the central activity during the parsing phase in query processing.
a. Database statistics
b. Data sparsity
c. SQL query
d. Query optimization

Page 13 of 17
1201/158.337 SC
MAN NSB
Internal Only
77. Knowing the sparsity of a column helps you decide whether the use of ____ is
appropriate.
a. query processing
b. query optimization
c. an index
d. a full table scan

78. If there is no index, the DBMS will perform a ____ scan.


a. loop
b. range
c. row ID table access
d. full table

79. To generate database object statistics manually, you could use the following syntax:
____.
a. ANALYZE <TABLE/INDEX> object_name;
b. CREATE <TABLE/INDEX> object_name;
c. ANALYZE <TABLE/INDEX> object_name COMPUTE STATISTICS;
d. CREATE <TABLE/INDEX> object_name COMPUTE STATISTICS;

80. In the ____ category, the cloud service provider offers the capability to build and
deploy consumer-created applications using the provider’s cloud infrastructure.
a. API as a Service (AaaS) )
b. Infrastructure as a Service (IaaS)
c. Software as a Service (SaaS
d. Platform as a Service (PaaS)

81. Using ____, you can extract data from an XML document and convert it into a text
file.
a. XMLD
b. XSLT
c. DTD
d. XML schema

82. A(n) ____ file provides the composition of the database’s logical model and defines
the syntax rules for an XML document.
a. XMLD
b. HTML
c. DTD
d. Meta

Page 14 of 17
1201/158.337 SC
MAN NSB
Internal Only
83. What is a feature of a Web application server?
a. It is Microsoft’s implementation of a superset of the SQL Access Group CLI
standard for database access
b. It is automatically invoked by the browser when needed
c. It runs on the client machine, freeing server resources
d. It provides an integrated development environment with session management
and support for persistent application variables

84. ____ is a scripting language that allows Web authors to design interactive sites.
a. Visual Basic
b. HTML
c. JavaScript
d. Java

85. When using an Oracle database, your Web-to-database middleware can connect to the
database via ____.
a. ODBX
b. CGI
c. SQLNet
d. SQLPlus

86. What is a disadvantage of using an API Web-server interface?


a. It is slower than CGI
b. It is very inefficient because it uses DLLs
c. You need to run an external program for each request
d. An error can bring down the Web server

87. Which of the following is a well-defined Web-server interface?


a. Common Gateway Interface
b. Disk Operating System
c. Windows 98
d. AppleTalk

88. What is the first step in the exchange between a Web browser and a database?
a. The HTML output is displayed on the client computer’s Web browser
b. The middleware receives the query result and creates the HTML-formatted
page
c. The client’s Web browser requests a page from a Web server
d. The Web-to-database middleware uses ODBC to connect to the database

89. Another name for a database server-side extension is ____.


a. a Web server
b. a Web application server
c. Web-to-database middleware
d. a database application server

Page 15 of 17
1201/158.337 SC
MAN NSB
Internal Only
90. One of the important functions provided by the database ____ is to reserve the
resources that must be used by the database at run time.
a. security component
b. authorization manager
c. initialization parameters
d. administrator

91. A ____ is a named collection of database access privileges that authorize a user to
connect to the database and use the database system resources.
a. user
b. role
c. profile
d. manager

92. In the Oracle Enterprise Manager, a ____ is basically any object created by end users;
for example, tables, views, indexes, stored procedures, and triggers.
a. component
b. database object
c. policy
d. role

93. ____ allows for the translation of the company’s strategic goals into the data and
applications that will help the company achieve those goals.
a. Access Management
b. Business Intelligence
c. Information engineering (IE)
d. MOLAP

94. ____ CASE tools provide support for the planning, analysis, and design phases.
a. Front-end
b. Back-end
c. Vertical
d. Horizontal

95. A(n) ____ data dictionary is automatically updated by the DBMS with every database
access.
a. dynamic
b. active
c. passive
d. static

96. Classifying users into ____ according to common access needs facilitates the DBA’s
job of controlling and managing the access privileges of individual users.
a. policy definitions
b. sections
c. authorization schemes
d. user groups

Page 16 of 17
1201/158.337 SC
MAN NSB
Internal Only
97. Some common physical security practices found in large database installations include
secured entrances, password-protected workstations, ____, closed-circuit video, and
voice-recognition technology.
a. drug testing
b. fingerprinting
c. electronic personnel badges
d. retina scans

98. ____ security breaches include database access by computer viruses and by hackers
whose actions are designed to destroy or alter data.
a. Dangerous
b. Preserving
c. Corrupting
d. Authorized

99. ____ deals with ensuring that data is protected against unauthorized access, and if the
data are accessed by an authorized user, that the data are used only for an authorized
purpose.
a. Integrity
b. Compliance
c. Availability
d. Confidentiality

100. The ____ is responsible for ensuring database security and integrity.
a. database programmer
b. database security officer
c. data administrator
d. systems analyst

++++++++

Page 17 of 17

You might also like