158.337 Database Development - Massey - Exam - S1 2011

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

1101/158.

337 SC
MAN/ ALB NSB
Distance /Internal

MASSEY UNIVERSITY
MANAWATU CAMPUS

EXAMINATION FOR
158.337 DATABASE DEVELOPMENT

Semester One 2011

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.

Page 1 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
SECTION A [60 MARKS]
Attempt all the following questions. There is one (1) correct answer.
Record the answer that applies best on your Scantron card
The Scantron Card has five options. Ignore the fifth option (e)

1. In most modern relational DBMSs, a new database implementation requires the


creation of special storage-related constructs to house the end-user tables.
a. True
b. False

2. The SQL execution activities are performed by the query optimizer.


a. True
b. False

3. Indexes do not facilitate join operations.


a. True
b. False

4. A DDBMS governs the storage and processing of logically related data over
interconnected computer systems.
a. True
b. False

5. Normalizing fact tables improves data access performance and saves data storage
space.
a. True
b. False

6. To optimise database performance, a secondary index should be created for every


table column.
a. True
b. False

7. The creation and management of user interfaces and database connectivity are not
affected by the Web’s existence.
a. True
b. False

8. SQL functions and aggregate functions are interchangeable.


a. True
b. False

Page 2 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
9. SELECT ALL * is a valid SQL clause.
a. True
b. False

10. Data processing can be as simple as organizing data to reveal patterns.


a. True.
b. False.

11. Metadata present a more complete picture of the data in the database than the data
itself.
a. True
b. False

12. The DBMS reveals much of the database’s internal complexity to the application
programs and users.
a. True
b. False

13. One disadvantage of the DBMS is that it increases the risk of data security breaches.
a. True
b. False

14. A data model is usually graphical.


a. True
b. False

15. Within the database environment, a data model represents data structures with the
purpose of supporting a specific problem domain.
a. True
b. False

16. In an SQL-based relational database, each table is dependent on another.


a. True
b. False

17. In the ____ model, each parent can have many children, but each child has only one
parent.
a. hierarchical
b. network
c. relational
d. entity relationship

Page 3 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
18. A(n) ____ enables a database administrator to define schema components.
a. extensible markup language (XML)
b. data definition language (DDL)
c. unified modeling language (UML)
d. query language

19. One of the limitations of the ____ model is that there is a lack of standards.
a. hierarchical
b. network
c. relational
d. entity relationship

20. When you can change the internal model without affecting the conceptual model,
you have ____________________ independence.
a. data
b. entity
c. logical
d. physical

21. An ERM is dependent on the database type.


a. True
b. False

22. The ER diagram represents the conceptual database as viewed by the end user.
a. True
b. False

23. Attributes are types of entities.


a. True
b. False

24. A weak entity has a primary key that is partially or totally derived from the parent
entity in the relationship.
a. True
b. False

25. The ERD represents the ____ database as viewed by the end user.
a. condensed
b. physical
c. logical
d. conceptual

Page 4 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
26. The set of possible values for an attribute is a ____.
a. domain
b. range
c. set
d. key

27. Ideally, an entity identifier is composed of ____ attribute(s).


a. zero
b. one
c. two
d. six

28. The ____ attribute(s) make up the primary key in the table definition:
CLASS (CRS_CODE,CLASS_SECTION, CLASS_TIME, CLASS_ROOM, PROF_NUM)
a. CRS_CODE
b. CLASS_SECTION
c. CRS_CODE and CLASS_SECTION
d. There is no primary key

29. A ____ attribute is one that cannot be subdivided.


a. Composite
b. Simple
c. single-valued
d. multi-valued

30. The ____ type of attribute cannot be created in a DBMS.


a. derived
b. multi-valued
c. simple
d. composite

31. Entity supertypes and subtypes are organized in a specialization hierarchy


a. True
b. False

32. At the implementation level, the supertype and its subtype(s) depicted in the
specialization hierarchy maintain a 1:1 relationship
a. True
b. False

Page 5 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
33. 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

34. One important inheritance characteristic is that all entity subtypes inherit their ____
key attribute from their supertype
a. primary
b. natural
c. foreign
d. surrogate

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

36. The ____ characteristic of a primary key states that:


The PK must uniquely identify each entity instance. A primary key
must be able to guarantee unique values. It cannot contain nulls
a. unique values
b. nonintelligent
c. preferably single-attribute
d. security compliant

37. Composite primary keys are particularly useful as identifiers of composite entities,
where each primary key combination is allowed only once in the ____ relationship
a. 0:1
b. 1:1
c. 1:M
d. M:N

38. Surrogate primary keys are especially helpful when there is no ____ key.
a. primary
b. natural
c. foreign
d. composite

Page 6 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
39. Normalisation is a very important database design ingredient and the highest level is
always the most desirable
a. True
b. False

40. Normalization works through a series of stages called normal forms. For most
purposes in business database design, ____ stages are as high as you need to go in
the normalization process
a. Two
b. Three
c. four
d. five

41. Repeating groups must be eliminated by making sure that each column defines a
single entity
a. True
b. False

42. A table that displays data redundancies yields ____.


a. consistencies
b. anomalies
c. fewer attributes
d. more entities

43. A ____ exists when there are functional dependencies such that Y is functionally
dependent on X and Z is functionally dependent on Y, and X is the primary key.
a. partial dependency
b. repeating group
c. atomic attribute
d. transitive dependency

44. 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

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

Page 7 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
46. Data type selection is usually dictated by the nature of the data and by the intended
use
a. True
b. False

47. The SQL command that lets you permanently save data changes is ____.
a. SAVE
b. SELECT
c. COMMIT
d. UPDATE

48. To list all the contents of the PRODUCT table, you would use ____.
a. LIST * FROM PRODUCT;
b. SELECT * FROM PRODUCT;
c. DISPLAY * FROM PRODUCT;
d. SELECT ALL FROM PRODUCT;

49. UPDATE tablename ***** WHERE conditionlist.


a. The ____ command replaces the ***** in the syntax of the UPDATE
command, shown above.
b. SET columnname = expression
c. columnname = expression
d. expression = columnname
e. FOR columnname = expression

50. The ____ command is used to restore the table’s contents to their previous
values.
a. RESTORE;
b. BACKUP;
c. ROLLBACK;
d. UNCOMMIT;

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

52. Which of the following is used to select some rows in a table?


a. SELECT * FROM [Table name]
b. SELECT * FROM [Table name] HAVING [condition list]
c. SELECT ALL * FROM [Table name] WHERE [condition list]
d. SELECT [column(s)]FROM [Table name]

Page 8 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
53. Which query will output the table contents when the value of V_CODE is no more
than 21344?
a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM
PRODUCT WHERE V_CODE <> 21344;
b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM
PRODUCT WHERE V_CODE = 21344;
c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM
PRODUCT WHERE V_CODE <= 21344;
d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE FROM
PRODUCT WHERE V_CODE < 21344;

54. Which query will use the given columns and column aliases from the PRODUCT
table to determine the total value of inventory held on hand and display the results in
a column labeled TOTVALUE
a. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE AS
TOTVALUE FROM PRODUCT;
b. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE AS
TOTVALUE FROM PRODUCT;
c. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE AS
TOTVALUE FROM PRODUCT;
d. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE AS
TOTVALUE FROM PRODUCT;

55. SQL supports the conditional execution of procedures (if..then...else statements) that
are typically supported by a programming language.
a. True
b. False

56. Stored procedures must have at least one argument.


a. True
b. False

57. The syntax for the UNION query is ____.


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

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

Page 9 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
59. When using a(n) ____ join, only rows that meet the given criteria are returned.
a. Full
b. Inner
c. Outer
d. Set

60. If you wish to create an inner join, but the two tables do not have a commonly
named attribute, you can use a(n) ____ clause.
a. OF
b. USING
c. HAS
d. JOIN ON

Page 10 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
SECTION B [40 MARKS]
This Section contains 40 questions.
Each question carries one (1) mark.
Answer all questions in this Section.

61. The first step in developing the conceptual model using ER diagrams is ____.
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

62. 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

63. ____ coupling describes the extent to which modules are independent of one
another.
a. Verification
b. Process
c. Module
d. Cohesive

64. 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

65. ____ allow(s) physical access to areas by authorized personnel only.


a. Physical security
b. Password security
c. Access rights
d. Data encryption

66. Once the data has been loaded into the database, the ____ tests and fine-tunes the
database for performance, integrity, concurrent access, and security constraints.
a. A: programmer
b. B: manager
c. C: database administrator
d. D: systems administrator

Page 11 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
67. There are ____ classical approaches to database design.
a. two
b. three
c. four
d. five

68. 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

69. A transaction is a ____ unit of work that must be either entirely completed or
aborted.
a. timed
b. practical
c. logical
d. physical

70. A consistent database is ____.


a. One in which all tables have foreign keys
b. One in which all data integrity constraints are satisfied
c. One in which all tables are normalized
d. One in which all SQL statements only update one table at a time

71. ____ requires that all operations of a transaction be completed.


a. Specificity
b. Atomicity
c. Durability
d. Time stamping

72. ____ 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

73. All transactions must display ____.


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

Page 12 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
74. A single-user database system automatically ensures ____ of the database, because
only one transaction is executed at a time.
a. serializability and durability
b. atomicity and isolation
c. serializability and isolation
d. atomicity and serializability

75. ANSI defines four events that signal the end of a transaction. Of the following
events, ____&nbsp; is defined by ANSI as being equivalent to a COMMIT.
a. Five SQL statements are executed.
b. The end of a program is successfully reached.
c. The program is abnormally terminated.
d. The database is shut down for maintenance.

76. ANSI defines four events that signal the end of a transaction. Of the following
events, ____ is defined by ANSI as being equivalent to a ROLLBACK.
a. Five SQL statements are executed.
b. The end of a program is successfully reached.
c. The program is abnormally terminated.
d. The database is shut down for maintenance.

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. ____ is/are the central activity during the parsing phase in query processing.
a. Database statistics
b. Data sparsity
c. SQL query
d. Query optimization

79. When setting optimizer hints, ____ instructs the optimizer to minimize the overall
execution time, that is, to minimize the time it takes to return all rows in the query
result set. This hint is generally used for batch mode processes.
a. ALL_ROWS
b. FIRST_ROWS
c. INDEX(P_QOH_NDX)
d. OPTIMIZATION_ROWS

Page 13 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
80. When setting optimizer hints, ____ instructs the optimizer to minimize the time it
takes to process the first set of rows, that is, to minimize the time it takes to return
only the first set of rows in the query result set. This hint is generally used for
interactive mode processes.
a. ALL_ROWS
b. FIRST_ROWS
c. INDEX(P_QOH_NDX)
d. OPTIMIZATION_ROWS

81. When setting optimizer hints, ____ forces the optimizer to use the P_QOH_NDX
index to process this query.
a. ALL_ROWS
b. FIRST_ROWS
c. INDEX(P_QOH_NDX)
d. OPTIMIZATION_ROWS

82. 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

83. The majority of primary memory resources will be allocated to the ____ cache.
a. data
b. SQL
c. sort
d. optimizer

84. The ____ cache stores the most recently executed SQL statements.
a. data
b. SQL
c. sort
d. optimizer

85. _____ is a Web application server that provides database access to the Web.
a. Access
b. ColdFusion
c. FoxPro
d. dBase

Page 14 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
86. A feature of a Web application server is ____.
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.

87. The XML metalanguage allows the definition of new ____, such as <ProdPrice>, to
describe the data elements used in an XML document.
a. elements
b. tags
c. C: schemas
d. D: DTDs

88. Every XML document has a ____.


a. A: root element
b. B: base tag
c. C: schema
d. D: DTD

89. 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

90. The ____<b> </b>is an advanced data definition language that is used to describe
the structure (elements, data types, relationship types, ranges, and default values) of
XML data documents.
a. XHTML
b. HTML schema
c. TD
d. XML schema

91. 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

Page 15 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
92. DBMS vendors can publish ____ to facilitate data exchanges and the creation of
data views from multiple applications: hierarchical, relational, object-oriented,
object-relational, or extended-relational.
a. meta-dictionaries
b. database support
c. Web pages
d. XML databases

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

94. ____ CASE tools provide support for the coding and implementation phases.
a. Front-end
b. Back-end
c. Vertical
d. Horizontal

95. The ____ component of a CASE tool produces the information system's input/output
formats.
a. analysis
b. graphics
c. program document generator
d. screen painter and report generator

96. ____ refers to the Oracle processes running in memory that are associated with the
ORALAB database instance.
a. OracleServiceORALAB
b. OracleOraDbg_homeTNSListener
c. OracleServiceORCL
d. OracleStartORCL

97. The Oracle service ____ processes the end-user connection requests over the
network.
a. OracleServiceORALAB
b. OracleOraDbg_homeTNSListener
c. OracleServiceORCL
d. OracleStartORCL

Page 16 of 17
1101/158.337 SC
MAN/ ALB NSB
Distance /Internal
98. If the user named SYSTEM creates a VENDOR table, the table will belong to the
SYSTEM ____.
a. index
b. page file
c. schema
d. tablespace

99. A ____ is a uniquely identifiable object that allows a given person to log on to the
database.
a. user
b. role
c. profile
d. manager

100. 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

++++++++

Page 17 of 17

You might also like