Data 210 book questions
Why is it important that a DBMS has a good query optimizer?
(DBMS) must be able to execute queries quickly and effectively, which is why DBMSs come equipped with query optimizers. -The query optimizer determines the best query execution plan among various query execution plans by evaluating their costs. • a good query optimizer results in low response and an accurate estimation of costs in terms of response time,
What concept specifies the various data items, their characteristics, and relationships, constraints, storage details, etc. and is specified during the database design? a. Database model. b. Catalog. c. Database state. d. None of the above.
a
Which statement is correct? Statement A: The middle layer of the three-layer architecture consists of both the conceptual data model and the logical data model. The logical data model is physically implemented in the internal layer. Statement B: The top level of the three-layer architecture is the external layer. Views for one or more applications always offer a window on the complete logical model. a. Only sentence A is right. b. Only sentence B is right. c. Sentences A and B are right. d. Neither A nor B is right.
a
Which statement is not correct? a. In a database approach, applications don't have their own files, but all applications access the same version of the data by interfacing with the DBMS. b. In a database approach, the data definitions or metadata are stored in the applications accessing the data. c. In a database approach, there is typically less storage needed compared to the file approach. d. In a database approach, maintenance of data and metadata is easier.
a
A composite aggregation... a. has a maximum multiplicity of 1 and a minimum multiplicity of 0 or 1 at the composite side. b. has a maximum multiplicity of n and a minimum multiplicity of 0 at the composite side . c. has a maximum multiplicity of n and a minimum multiplicity of 0 or 1 at the composite side. d. has a maximum multiplicity of 1 and a minimum multiplicity of 1 at the composite side.
a a composite aggregation has a maximum multiplicity of 1 and a minimum multiplicity of 0 or 1 at the composite side. Hence, option a is the correct answer.
Complete this sentence: In the three-layer architecture, between the external layer and the conceptual/logical layer, there is ... a. physical data independence. b. logical data independence. c. no independence, they are basically the same thing. d. the internal layer.
b Logical data independence is the ability to modify the middle layer of the DBMS without affecting the highest-level schemas. This exists between external layer and the conceptual layer.
Which statement is not correct? a. The changeability property specifies the type of operations that are allowed on either variable values or links. b. OCL constraints are defined in a procedural way. c. OCL constraints can be used for various purposes, such as to specify invariants for classes, to specify pre- and post-conditions for methods, to navigate between classes or to define constraints on operations. d. In UML, dependency defines a "using" relationship that states that a change in the specification of a UML modeling concept may affect another modeling concept that uses it.
b defined in a declarative way
Which variable types are not directly supported in UML? a. Composite variables. b. Multi-valued variables. c. Variables with unique values (similar to key attribute types in the ER model). d. Derived variables.
c
Which of the following statements is correct? a. An aggregation cannot have attribute types. b. An aggregation cannot participate in a relationship type. c. An aggregation should both have attribute types and participate in one or more relationship types. d. An aggregation can have attribute types and participate in relationship types.
d
Which of these is not part of the storage manager in the DBMS architecture? a. Connection manager. b. Transaction manager. c. Buffer manager. d. Recovery manager.
A
How can DBMSs be categorized in terms of the following? data model degree of simultaneous access architecture usage
-can be categorized into hierachal DBMS, network, relational, OO, etc. - can be a single-user, but then only one user can work on it at a time. DBMS should be a multi-user system, which allows users to simultaneously interact with the database - multiple types of architectures: n-tier DBMS, cloud, federated, client server. - usage is based on On-line transaction processing DBMS and On-line analytical processing DBMS. also hav noSQL and multimedia DBMS
What are the advantages of database systems and database management?
-data independence -managing data redundancy, -managing structured or unstructured data, -concurrency control, - backup and recovery facilities -data security and performance utilities
What is the difference between procedural and declarative DML?
-procedural DML: will navigate and locate the data in DBMS.AKA record-at-a-time DML. First this DML find the data from the specific record, navigate it using memory pointers. no query processor. -declarative: more efficient, pecify which data should be retrieved or what changes should be made, rather than how this should be done. set-at-a-time
Which statement(s) is/are correct? Statement A: The DDL compiler compiles data definitions specified in DDL. It is possible that there is only one DDL with three instruction sets. Statement B: The first step of the DDL compiler is to translate the DDL definitions. a. Only A b. Only B. c. A and B. d. Neither A nor B
A
Which statement(s) is/are correct? Statement A: Native XML DBMSs map the hierarchical structure of an XML document to a physical storage structure, because they are able to use the intrinsic structure of an XML document. Statement B: XML-enabled DBMSs are able to store XML data in an integrated and transparent way, because they are able to use the intrinsic structure of an XML document. a. Only A. b. Only B. c. A and B. d. Neither A nor B.
A
Which statement(s) is/are correct? Statement A: There is no query processor available in procedural DML. Statement B: With procedural DML, the DBMS determines the access path and navigational strategy to locate and modify the data specified in the query. a. Only A. b. Only B. c. A and B. d. Neither A nor B.
A B is wrong bc first the DML finds the data from the specific record, navigate it using memory pointers. • Databases which have procedural DML has no query processor
Which statement(s) is/are correct? Statement A: In a hierarchical DBMS, DML is declarative and set-oriented with a query processor. Statement B: In a relational DBMS, there is data independence between the conceptual and internal data model. a. Only A. b. Only B. c. A and B. d. Neither A nor B
B
Which statement regarding the database state is correct? a. The database state represents the data in the database when the database is first created. b. The database state changes when data are updated or removed. c. The database state specifies the various data items, their characteristics, and relationships, and is specified during the database design. d. The database state is stored in the catalog.
B (database model is stored in catalog, not state)
Which statement(s) is/are correct? Statement A: The query parser optimizes and simplifies a query and then passes it on to the query executor. Statement B: In the DBMS architecture, the storage manager takes care of concurrency control. a. Only A. b. Only B. c. A and B d. Neither A nor B.
B A is incorrect since Query parser parses the query into a format known as internal representation which can be evaluated by the system
Which statement is not correct? a. In a conceptual data model, the data requirements from the business should be captured and modeled. b. A conceptual data model is implementation-dependent. c. A logical data model translates the conceptual data model to a specific implementation environment. d. Examples of implementations of logical data models are hierarchical, CODASYL, relational, or object-oriented models.
B implementation independent
Which of the following DBMS types is not a classification based on a data model? a. Hierarchical DBMS. b. Network DBMS. c. Cloud DBMS. d. Object-relational DBMS.
C
Which statement(s) is/are correct? Statement A: An OLTP system is able to cope with real-time, simultaneous transactions that the database server is able to process in a large volume. Statement B: An OLAP system uses large amounts of operational data to run complex queries on and provide insights for tactical and strategic decision-making. a. Only A. b. Only B c. A and B. d. Neither A nor B.
C
2.5. Evaluate the following statements: 1. Record-at-a-time DML means that the query gets recorded from the user at the time the user inputs the query and then gets processed. 2. Record-at-a-time DML means that navigating the database starts with positioning on one specific record and going from there onwards to other records. 3. Set-at-a-time DML means that the query gets set beforehand and then gets processed by the DBMS. 4. Set-at-a-time DML means that many records can be retrieved in one DML statement. a. 1 and 3 are right. b. 2 and 3 are right. c. 1 and 4 are right. d. 2 and 4 are right.
D
Fill in the gaps in the following sentences: When, during crash recovery, aborted transactions need to be undone, that is a task of the ...A... The part of the storage manager that guarantees the ACID properties is the ...B... a. A: lock manager, B: recovery manager. b. A: lock manager, B: lock manager. c. A: recovery manager, B: buffer manager. d. A: recovery manager, B: transaction manager.
D
Which statement(s) is/are correct? Statement A: The impedance mismatch problem can be solved by using middleware to map data structures between the DBMS and the DDL statements. Statement B: An object-oriented host language such as Java combined with a document-oriented DBMS such as MongoDB does not require mapping objects to documents and vice versa. a. Only A. b. Only B. c. A and B. d. Neither A nor B.
D B is incorrect bc object-oriented programming does not have impedance mismatch.
If you want to use a DBMS architecture that can access multiple data sources itself and provides a uniform interface hiding the low-level details, the most appropriate DBMS would be a(n)... a. n-tier DBMS. b. cloud DBMS. c. client-server DBMS. d. federated DBMS.
D a Federated DBMS gives a uniform interface to multiple data sources like: DBMSs, File systems, document manager, etc
Give some examples of DBMS utilities and interfaces.
DBMS utilities can include things like loading, reorganization, performance monitoring, user management, and backup and recovery DBMS interfaces can include things like web-based interfaces, graphical user interfaces (GUIs), application programming interfaces (APIs), and network interface
What are the key differences between the file-based and database approaches to data management?
The file-based approach holds a strong application-data dependence. allows for applications to be independent from data definitions -database approach uses a centralized database that can be accessed by multiple users, while a file-based approach uses individual files that are accessed by a single user.
. Which statement is correct? a. In the case a ternary relationship type is represented as three binary relationship types, then semantics will get lost. b. A ternary relationship type can always be represented as three binary relationship types without loss of semantics. c. Three binary relationship types between three entity types can always be replaced by one ternary relationship type between the three participating entity types. d. A ternary relationship type cannot have attribute types.
a
Complete the following sentence, choosing the right words in positions A and B. A(n) ...A... data model is the mapping of a(n) ...B... data model to a model that describes which data are stored where and in what format. a. A: internal, B: logical. b. A: conceptual, B: internal. c. A: logical, B: internal. d. A: logical, B: conceptual.
a
Which statements are correct? a. A weak entity type can only have one attribute type. b. A weak entity type is always existence-dependent. c. An existence-dependent entity type is always a weak entity type. d. An existence-dependent entity type always participates in a 1:1 relationship type.
b
Consider this rule: "An employee of a department can never earn more than the manager of the department." This is an example of a: a. syntactical integrity rule. b. semantical integrity rule.
b -Semantical integrity rule deals with the meaning of the data
Which statement is not correct? a. In a file-based approach, every application has its own query and access procedures, even if they want to access the same data. b. SQL is a database language to manage DBMSs without having to write a substantial amount of programming code. c. SQL is a database language that focuses on how to access and retrieve the data. d. SQL is a database language that allows different applications to access different subsets of the data necessary for each application.
c SQL is a database language, which only focuses on what data is to be retrieved, not how to access and retrieve the data.
Which statement is correct? Statement A: Physical data independence implies that neither the applications nor the views or logical data model must be changed when changes are made to the data storage specifications in the internal data model. Statement B: Logical data independence implies that software applications are minimally affected by changes in the conceptual or logical data model. a. Only A. b. Only B. c. A and B. d. Neither A nor B.
c, both are correct
What are the key components of a DBMS architecture and how do they collaborate?
connection manager: provides facilities to set up data-base connection security manager: verifies if use has right priveleges to execute database actions required DDL compiler: compiles defs specified in DDL. should have one for each data model query processor: most important! helps with retreuval, insertion, update and removal of data. -also key: -various database utilities -storage manager
Which statement is correct? a. An association is an instance of a link. b. Only binary associations are supported in the UML class diagram. c. An association is always bidirectional. d. Qualified associations can be used to represent weak entity type
d
Which statement is correct? a. A class is an instance of an object. b. A class only has variables. c. Inheritance is not supported in object orientation. d. Information hiding (also referred to as encapsulation) states that the variables of an object can only be accessed through either getter or setter methods.
d
Which statement is not correct? a. The file-based approach to data management causes the same information to be stored separately for different applications. b. In a file-based approach to data management, the data definitions are included in each application separately. c. In a file-based approach to data management, different applications could be using older and newer versions of the same data. d. In a file-based approach to data management, a change in the structure of a data file is easily handled because each application has its own data files.
d
Which statement is correct? Statement A: DDL is the language used to define the logical data model, but no other data models. Statement B: SQL is a DML language to retrieve, insert, delete, and modify data. It is stored in the catalog. a. Only A. b. Only B. c. A and B. d. Neither A nor B.
d A is wrong bc External, logical and internal data models can be defined with the help of this language. B is wrong since that is the definition of a DML
Which of the following statements is not correct? a. In UML, access modifiers can be used to specify who can have access to a variable or method. b. A private access modifier (denoted by the symbol "-") is used in the case that the variable or method can only be accessed by the class itself. c. A public access modifier (denoted by the symbol "+") is used in the case that the variable or method can be accessed by any other class. d. A protected access modifier (denoted by the symbol "#") is used in the case that the variable or method can be accessed by both the class and its superclasses.
d subclasses, not super
Discuss examples of database applications.
ii) Banking System: In this, DBMS is used to keep track of customers' account, various day to day transactions and much more. 2) walmart database system: store enormous amt of data like: which customer bought what products, in what quant, at what time, etc
Discuss the elements of a database system.
• Database model: description of the database data ( data items, characteristics and relationships of the data, storage details, etc.) It is specified during the database design. • Database state: data in the database at a particular moment data model: provides a clear description of the data items and their relationships • Catalog: It is the most important part of the DBMS. It includes the definitions of the views, internal and logical data models, and coordinates among them for better management of the DBMS. • Database Users: the users which interact with the database. Examples: information architect design the conceptual model, • Database Languages: The various Database languages include DDL (Data Definition Language), DML (Data Manipulation Language)