Выбрать главу

148. In a relational database management system, which one of the following types of security locking mechanisms best achieves the concept of fine-grain locking?

a. Row-level locking

b. Table-level locking

c. Block-level locking

d. File-level locking

148. a. A security locking mechanism prevents one transaction from reading or updating a record before another transaction has released its locks on those records. Row-level locks are used for data tables and indexes, which can prevent performance degradation when the database is modified by many users at the same time. The other three choices are incorrect because they offer coarse-grain security locking mechanisms. This is because a row is the smallest level in the database.

149. Which of the following is a disadvantage of distributed database management systems when compared to centralized database management systems?

a. Autonomy

b. Reliability

c. Flexibility

d. Data backup

149. d. Distributed database management systems are complex to develop and maintain and mission critical data may need to be placed centrally to use backup facilities typically available at a central location. These are some disadvantages of being distributed.

The other three choices are incorrect. Autonomy and better control are provided to local management. Reliability is increased; that is, if one server goes down, most of the data remains accessible. Flexibility is provided; that is, users tend to request locally created and maintained data more frequently than data from other locations. These are advantages of being distributed.

150. Which one of the following data models is suitable for predetermined data relationships?

a. Hierarchical data model

b. Network data model

c. Relational data model

d. Distributed data model

150. a. The hierarchical data structures are suitable for predetermined data relationships, so frequently found, that have a superior/inferior connotation, as parents to child, manager to subordinate, whole to parts, and so on. Despite this naturalism, this model requires the user to understand fairly complex arrangements when a large, diverse database is assembled with it. Depending on the DBMS implementation, this model can be efficient in saving storage and in processing high volume, routine transactions while accessing records one at a time. It has proven also to be an effective model for query techniques that operate on sets of records.

The network model provides somewhat more general structures than the hierarchical, for relating diversified data with concern for saving storage. The resulting database may be complex, and the user, normally a programmer, must carefully track the current reference position among the data occurrences. For this reason, the network structure is said to induce a navigational approach in processing transactions. The network model is capable of high efficiency in performance and storage use. Query facilities, although available, are less developed for this model than for the other models.

The relational model is widely accepted as the most suitable for end users because its basic formulation is easily understood, and its tabular data structure is obvious and appealing to laymen. Query language innovations are most pronounced for this model over others.

The distributed model can be thought of as having many network nodes and access paths between the central and local computers and within the local computer sites. Database security becomes a major issue in a truly distributed environment, where data itself is distributed and there are many access paths to the data from far-flung locations.

151. A restart and recovery mechanism for a database management system (DBMS) would not include which of the following?

a. Rollback approach

b. Reorganization

c. Shadowing approach

d. Versioning facility

151. b. Reorganization of a database occurs at initial loading and any subsequent reloading. Reorganization eliminates unused space between the valid records as a result of a deletion of some records. Besides reclaiming unused space, reorganization can arrange the records in such a way that their physical sequence is the same or nearly the same as their logical sequence. Reorganization has nothing to do with restart and recovery.

The DBMS must have a comprehensive and reliable recovery system that uses either the rollback approach in which invalid or incomplete transactions and database images are backed up; or the shadowing approach with journaling (or transaction recording) and recovery by reapplying transactions against a previous version of the database. These facilities should also accommodate selected recovery for specific files, records, or logical records.

In addition, the DBMS should also have a versioning facility to track and record changes made to data over time through the history of design changes. The version management system should track version successors and predecessors. Although the rollback approach uses before images, the roll-forward approach uses after images. Both of these images are stored on a log tape. If a database is damaged, the after image copies can be added to a backup copy of the database. The database is rolled forward from a point in time when it is known to be correct to a later time.

152. Which of the following statements is true with respect to data dictionaries?

a. A data dictionary must always be active to be useful.

b. An active data dictionary must be dependent on database management systems.

c. A passive data dictionary is an important feature of database management systems.

d. A data dictionary can exist only with a database system.

152. b. In the case of an active data dictionary, there is no option, meaning that the data dictionary and the database management system go together; they need each other to function effectively.

The other three choices are not correct because (i) both active and passive data dictionaries are useful, (ii) a passive data dictionary may or may not require a check for currency of data descriptions before a program is executed, and (iii) nondatabase systems can have data dictionaries.

153. Deadly embraces or deadlock situations in a database can best be handled through which of the following?

a. Prevention

b. Detection

c. Correction

d. Ignoring

153. a. There are two general methods of handling deadlocks. The preferred method involves detecting the probability of deadlock and preventing its occurrence. The other method involves detecting the deadlock when it occurs and doing something to correct it. Deadlocks can be prevented through good database design, especially with physical design efforts. Deadlock situations are too common to ignore. Consistent use of the database can minimize the chances of deadlock.

154. Which of the following is not an example of a first line-of-defense?